This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createElement(tag) { | |
return document.createElement(tag); | |
} | |
var addOption = function (combo, text, value, selected) { | |
/* Note by jdopazo: | |
Lazy initialization for the function _add() | |
I create a <select> element that I never attach to the dom | |
and try to attach an <'option'> element to it with try...catch | |
This way I avoid using try...catch every time this function is called */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-field"> | |
<#if form.mode=="view"> | |
<div class="viewmode-field"> | |
<span class="viewmode-label">${field.label?html}:</span> | |
<span class="viewmode-value">${field.value?html}</span> | |
</div> | |
<#else> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
/* https://gist.github.com/jottley/aa482585bd1fb701492b */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
POST /ottleys.net/public/cmis/versions/1.1/browser/root/sites/jared-ottleys-net/documentlibrary/ HTTP/1.1 | |
Authorization: Bearer <The OAuth Token> | |
Content-Type: multipart/form-data; boundary=__X_PAW_BOUNDARY__ | |
Host: api.alfresco.com | |
Connection: close | |
User-Agent: Paw/2.2.2 (Macintosh; OS X/10.10.4) GCDHTTPRequest | |
Content-Length: 1358 | |
--__X_PAW_BOUNDARY__ | |
Content-Disposition: form-data; name="cmisaction" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Schema.DescribeFieldResult fieldResult = Contact.title.getDescribe(); | |
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues(); | |
public Boolean contains(String title) | |
{ | |
for (Schema.PicklistEntry t : ple) | |
{ | |
if (t.getValue().equals(title)) | |
{ | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void init() | |
{ | |
final JobDetail jobDetail = new JobDetail(“StartXMPPClientsJob”, Scheduler.DEFAULT_GROUP, StartClientsJob.class); | |
jobDetail.getJobDataMap().put(“StartXMPPClients”, this); | |
long startTime = System.currentTimeMillis() + 60000L; | |
SimpleTrigger trigger = new SimpleTrigger(“StartXMPPClientsTrigger”, null, new Date(startTime), null, 0, 0L); | |
try | |
{ | |
scheduler.scheduleJob(jobDetail, trigger); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DriveFilesPage page = null; | |
do | |
{ | |
if (page == null) | |
{ | |
page = driveOperations.driveFileQuery().titleIs(folderName).isFolder().parentIs(parentId).getPage(); | |
} | |
else | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2016 Jared Ottley <jared@ottleys.net> | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) 2005-2015 Alfresco Software Limited. | |
* | |
* This file is part of Alfresco | |
* | |
* Alfresco is free software: you can redistribute it and/or modify it under the | |
* terms of the GNU Lesser General Public License as published by the Free | |
* Software Foundation, either version 3 of the License, or (at your option) any | |
* later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) 2005-2015 Alfresco Software Limited. | |
* | |
* This file is part of Alfresco | |
* | |
* Alfresco is free software: you can redistribute it and/or modify it under the | |
* terms of the GNU Lesser General Public License as published by the Free | |
* Software Foundation, either version 3 of the License, or (at your option) any | |
* later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) 2005-2015 Alfresco Software Limited. | |
* | |
* This file is part of Alfresco | |
* | |
* Alfresco is free software: you can redistribute it and/or modify it under the | |
* terms of the GNU Lesser General Public License as published by the Free | |
* Software Foundation, either version 3 of the License, or (at your option) any | |
* later version. | |
* |
OlderNewer