code
stringlengths
1
2.08M
language
stringclasses
1 value
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2007 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2014 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2014 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
// Copyright 2014 The Closure Library Authors. All Rights Reserved. // // 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 requ...
JavaScript
/* * List all updated content from a date to now * * This web script will return all a list of all content in a specified space * modified after the specified date * * /alfresco/service/updated/in/{path}/since?date={date} * * {path} This is the path to the space that contains the content you want *...
JavaScript
var page = require('webpage').create(), system = require('system'), address, output, size; if (system.args.length < 3 || system.args.length > 5) { console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]'); console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*2...
JavaScript
tinymce.addI18n('sv_SE',{ "Cut": "Klipp ut", "Heading 5": "Rubrik 5", "Header 2": "Rubrik 2", "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Din browser st\u00f6djer inte direkt \u00e5tkomst till klippboken. V\u00e4nligen anv\u00e4nd kortkommando...
JavaScript
/** * Autocompleter * * @version 1.0rc4 * * @license MIT-style license * @author Harald Kirschner <mail [at] digitarald.de> * @copyright Author */ var Autocompleter = {}; Autocompleter.Base = new Class({ options: { minLength: 1, useSelection: true, markQuery: true, inheritWidth: true, maxChoices...
JavaScript
if (!$defined(Element.getText)) { Element.extend( { getText: function() { return this.innerText || this.textContent || ""; } }); } var DatePicker = new Class( { options: { onShow: Class.empty, onHide: Class.empty, readOnly: true, showToday: true, ...
JavaScript
/* * Prerequisites: mootools.v1.11.js */ var OfficeAddin = { ANIM_LENGTH: 500, STATUS_FADE: 10000, LIST_DEF_HEIGHT: 204, defaultQuery: "", init: function() { $('overlayPanel').setStyle('opacity', 0); window.queryObject = OfficeAddin.toQueryObject(document.location.search); ...
JavaScript
/** * External component static wrapper that composes and 'calls' external component methods */ var ExternalComponent = { extender: null, init: function(params, extenderType) { if (typeof extenderType == "undefined") { // MSOffice mode check extenderType = (typeof top.window...
JavaScript
/* * Prerequisites: mootools.v1.11.js * office_addin.js */ var OfficeTags = { /* Scaling for tag clouds - must have supporting CSS classes defined */ SCALE_FACTOR: 5, /* Set to preselect a tag after the tag cloud populated */ preselectedTag: "", init: function() { Offic...
JavaScript
/* * Prerequisites: mootools.v1.11.js * office_addin.js */ var OfficeDocDetails = { init: function() { OfficeDocDetails.setupTabs(); }, setupTabs: function() { var tabs = $$('.tabBarInline li'); var tablinks = $$('.tabBarInline li a'); var panels = $$('.tabPane...
JavaScript
/* * Prerequisites: mootools.v1.11.js * office_addin.js */ var OfficeSearch = { MIN_LENGTH: 3, init: function() { $('searchText').addEvent('keydown', function(event) { event = new Event(event); if (event.key == 'enter') { $("simpleSearch...
JavaScript
/* * Prerequisites: mootools.v1.11.js * autocompleter.js * office_addin.js */ var OfficeMyTasks = { MAX_DESCRIPTION: 100, init: function() { OfficeAddin.sortTasks($('taskList')); OfficeMyTasks.setupEventHandlers(); if (window.queryObject.t) ...
JavaScript
/* * Prerequisites: mootools.v1.11.js * office_addin.js */ var OfficeNavigation = { TOGGLE_AMOUNT: 150, ANIM_LENGTH: 800, CREATE_SPACE_HEIGHT: 108, CREATE_SPACE_TEMPLATE: 16, OVERLAY_ANIM_LENGTH: 300, OVERLAY_OPACITY: 0.7, documentNames: [], init: function() { Offi...
JavaScript
/* * Prerequisites: mootools.v1.11.js * office_addin.js */ var OfficeMyAlfresco = { TOGGLE_AMOUNT: 150, ANIM_LENGTH: 800, taskCount: 0, init: function() { if (OfficeMyAlfresco.taskCount > 0) { OfficeAddin.sortTasks($('taskList')); OfficeMyAlfresco.setupTas...
JavaScript
/* * blogSummary * * Inputs: * nodeRef = blog space nodeRef * * Outputs: * blogSummary - object containing * numUpdates - number of articles updated since being published * numPending - number of unpublished articles */ model.blogSummary = main(args["nodeRef"]); function main(nodeRef) { ...
JavaScript
/* * projectSpace * * Inputs: * mandatory: nodeRef = parent space nodeRef * * Outputs: projectSpace - object containing pproject space details */ model.projectSpace = main(args["nodeRef"]); function main(nodeRef) { var title = ""; var subSpaces = {}; var space = search.findNode(nodeRef); if (sp...
JavaScript
model.tagActions = tagActions(args.a, args.n, args.t); function tagActions(action, nodeId, tagName) { var resultString = "Action failed"; var resultCode = false; var node = null; var newTag = null; var newTagNodeRef = ""; if ((tagName != "") && (tagName != null)) { tagName = tagName.toLower...
JavaScript
/* * colleaguePresence * * Inputs: * mandatory: nodeRef = parent space nodeRef * * Outputs: colleaguePresence - object containing presence data model */ model.colleaguePresence = main(args["nodeRef"]); function main(nodeRef) { var space = search.findNode(nodeRef); var colleagues = {}; if (space != null...
JavaScript
/* * gallerySummary * * Inputs: * nodeRef = gallery space nodeRef * * Outputs: * gallerySummary - object containing * numNew - number of new images in the last 7 days * numTotal - total number of images */ model.gallerySummary = main(args["nodeRef"]); function main(nodeRef) { var numNew...
JavaScript
model.ticket = session.ticket; model.path = url.extension;
JavaScript
/* * forumSummary * * Inputs: * nodeRef = forum space nodeRef * * Outputs: * forumSummary - object containing * numPosts - posts in last 7 days * numTopics - new topics in last 7 days */ model.forumSummary = main(args["nodeRef"]); function main(nodeRef) { var numPosts = 0, numTopi...
JavaScript
/* * calendarSummary * * Inputs: * nodeRef = Calendar space nodeRef * * Outputs: * calendarSummary - object containing * eventsthis - Number of events occuring this * eventsTomorrow - Number of events occuring tomorrow */ model.calendarSummary = main(args["nodeRef"]); function...
JavaScript
/* * emailSummary * * Inputs: * nodeRef = email space nodeRef * * Outputs: * emailSummary - object containing * numToday - number of articles updated since being published * numWeek - number of unpublished articles */ model.emailSummary = main(args["nodeRef"]); function main(nodeRef) { ...
JavaScript
/* * docSummary * * Inputs: * nodeRef = doc space nodeRef * * Outputs: * docSummary - object containing * numNew - number new documents added in the last 7 days * numModified - number of documents modified in the last 7 days */ model.docSummary = main(args["nodeRef"]); function main(nodeRe...
JavaScript
var gallery = search.findNode(url.extension); if (gallery == undefined || gallery.isContainer == false) { status.code = 404; status.message = "Gallery " + url.extension + " not found."; status.redirect = true; } model.gallery = gallery;
JavaScript
/* * blogSpace * * Inputs: * mandatory: nodeRef = parent space nodeRef * optional: n = nodeId for document to action against * a = action * "p" = publish * "u" = update * "r" = remove * * Outputs: blogSpace - object containing node arrays of arti...
JavaScript
function tagQuery() { var rootNode = args.n, maxResults = args.m, sortOrder = args.s, tags = [], countMin = Number.MAX_VALUE, countMax = 0; /* rootNode input */ var node = null; if ((rootNode !== null) && (rootNode !== "")) { node = resolveVirtualNodeRef(rootNode) ...
JavaScript
var node = search.findNode("workspace://SpacesStore/" + url.extension); //TODO: add a privacy check. If a calendar is private then don't display it if (node !== null) { var eventsFolder = node.childByNamePath("CalEvents"); if (eventsFolder !== null) { model.events = eventsFolder.children; } }
JavaScript
function getGUIDFromNodeRef(nodeRef) { var str = "" + nodeRef; if (str.length > 24) { return str.substring(24); } else { return ""; } } function findNodeByNodeRef(nodeRef) { var resultsArray = search.luceneSearch("ID:workspace\\://SpacesStore/" + getGUIDFromNodeRef(nodeRef)); if (resultsArray != n...
JavaScript
var eventId = args.e; var eventNode = search.findNode(eventId); if (eventNode == null) { model.result = "Event not Found"; } else { var response = ""; var _fromDate = eventNode.properties["ia:fromDate"]; var _toDate = eventNode.properties["ia:toDate"]; var _fromMonth = _fromDate.getMonth() + 1; va...
JavaScript
function getGUIDFromNodeRef(nodeRef) { var str = "" + nodeRef; if (str.length > 24) { return str.substring(24); } else { return ""; } } function findNodeByNodeRef(nodeRef) { var resultsArray = search.luceneSearch("ID:workspace\\://SpacesStore/" + getGUIDFromNodeRef(nodeRef)); if (resultsArray != null && resu...
JavaScript
function getGUIDFromNodeRef(nodeRef) { var str = "" + nodeRef; if (str.length > 24) { return str.substring(24); } else { return ""; } } function findNodeByNodeRef(nodeRef) { var resultsArray = search.luceneSearch("ID:workspace\\://SpacesStore/" + getGUIDFromNodeRef(nodeRef)); if (resultsArray != n...
JavaScript
var now = new Date(); var day = now.getDay(); var month = now.getMonth(); var year = now.getYear(); var hour = now.getHours(); var minute = now.getMinutes(); var second = now.getSeconds(); var stamp = day + month + year + hour.toString() + minute + second; logger.log("DATE: " + args.fd + " " + args.ft); ...
JavaScript
function getGUIDFromNodeRef(nodeRef) { var str = "" + nodeRef; if (str.length > 24) { return str.substring(24); } else { return ""; } } function findNodeByNodeRef(nodeRef) { var resultsArray = search.luceneSearch("ID:workspace\\://SpacesStore/" + getGUIDFromNodeRef(nodeRef)); if (resultsArray != n...
JavaScript
function getGUIDFromNodeRef(nodeRef) { var str = "" + nodeRef; if (str.length > 24) { return str.substring(24); } else { return ""; } } function findNodeByNodeRef(nodeRef) { var resultsArray = search.luceneSearch("ID:workspace\\://SpacesStore/" + getGUIDFromNodeRef(nodeRef)); if (resultsArray != n...
JavaScript
var calendar = search.findNode("workspace://SpacesStore/" + url.extension); if (calendar !== null) { var eventsFolder = calendar.childByNamePath("CalEvents"); if (eventsFolder !== null) { model.events = eventsFolder.children.sort(function(a,b) { return a.properties["ia:fromDate"] - b.properties["ia:fromDate"]...
JavaScript
function getGUIDFromNodeRef(nodeRef) { var str = "" + nodeRef; if (str.length > 24) { return str.substring(24); } else { return ""; } } function findNodeByNodeRef(nodeRef) { var resultsArray = search.luceneSearch("ID:workspace\\://SpacesStore/" + getGUIDFromNodeRef(nodeRef)); if (resultsArray != n...
JavaScript
function getGUIDFromNodeRef(nodeRef) { var str = "" + nodeRef; return str.substring(str.lastIndexOf("/")+1); } function findNodeByNodeRef(nodeRef) { var resultsArray= search.luceneSearch("ID:workspace\\://SpacesStore/" + getGUIDFromNodeRef(nodeRef)); if (resultsArray != null && resultsArray.length > ...
JavaScript
model.includeChildren = true; model.includeContent = false; var object = null; var storeId = url.templateArgs["storeId"]; var webappId = url.templateArgs["webappId"]; var path = url.templateArgs["path"]; var storeRootNode = avm.lookupStoreRoot(storeId); if (storeRootNode != null) { var path = storeRootN...
JavaScript
model.command = url.templateArgs["command"]; model.objectType = url.templateArgs["objectType"]; if("browse" == model.command) { if("node" == model.objectType) { var storeType = url.templateArgs["storeType"]; var storeId = url.templateArgs["storeId"]; var nodeId = url.templateArgs["nodeId"]; mode...
JavaScript
model.includeChildren = true; model.includeContent = false; model.isUser = false; model.code = "ERROR"; var object = null; // allow for content to be loaded from id if (args["id"] != null) { var id = args["id"]; object = search.findNode(id); } // if not by id, then allow for user id else if (args[...
JavaScript
// check that search term has been provided if (args.store == undefined || args.store.length == 0 || args.path == undefined || args.path.length == 0 || args.view == undefined || args.view.length == 0) { status.code = 400; status.message = "Mandatory arguments not set - please complete all form field...
JavaScript
/** * Share Generic Component: post new activity */ var m_node = null, m_parentNode = null; /* Posts to the activities service after a Share action */ function postActivity() { var data = {}, type = null, siteId = null, title = null, appTool = null, nodeRef = null, parentNo...
JavaScript
/** * Search Component * * Takes the following object as Input: * params * { * siteId: the site identifier to search into, null for all sites * containerId: the component the search in, null for all components in the site * term: search terms * tag: search tag * ...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js"> function main() { var params = { siteId: (args.site !== null) ? args.site : null, containerId: (args.container !== null) ? args.container : null, repo: (args.repo !== null) ? (args.repo == "t...
JavaScript
/** * User Profile Avatar Upload method * * @method POST * @param username {string} * filedata {file} */ function main() { try { var filename = null; var content = null; var username = null; // locate file attributes for each (field in formdata.fields) { ...
JavaScript
/** * User Profile - Reset user avatar REST method * * Current user can only modify their own settings or an admin can reset all. * * @method PUT */ function main() { // Get the person details and ensure they exist for update var userName = url.extension; var user = people.getPerson(userName); if (...
JavaScript
/** * User Profile REST Update method * * @method POST * @param json {string} * { * username: "username", * properties: * { * "cm:propname": "value" * ... * }, * content: * { * "cm:contentpropname": "contentstringvalue" * ... * ...
JavaScript
/** * User Profile - User avatar GET method * * Returns a user avatar image in the format specified by the thumbnailname, or the "avatar" preset if omitted. * * @method GET */ function getPlaceholder(thumbnailName) { // Try and get the place holder resource for a png avatar. var phPath = thumbnailService...
JavaScript
/** * User Status REST Update method * * @method POST * @param json {string} * { * status: "value" * } */ function main() { model.success = false; if (json.has("status")) { var newStatus = json.get("status"); if (newStatus != null) { var statusTime = new Dat...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.lib.js"> var maxResults = (args.maxResults !== undefined) ? parseInt(args.maxResults, 10) : DEFAULT_MAX_RESULTS; function padZeros(number) { return (number < 10) ? '0' + number : number; } function getContents(user, ty...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-args.lib.js"> /** * Copyright (C) 2005-2010 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 Ge...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/evaluator.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-args.lib.js"> /** * Copyright (C) 2005-2010 Alfresco Software Limited. * * This file is part of Alfresco *...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/evaluator.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/filters.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-ar...
JavaScript
/** * Copyright (C) 2005-2010 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 ...
JavaScript
/** * Copyright (C) 2005-2010 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 ...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-args.lib.js"> /** * Copyright (C) 2005-2010 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 Ge...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/parse-args.lib.js"> /** * Copyright (C) 2005-2010 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 Ge...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/action/action.lib.js"> /** * Copyright (C) 2005-2010 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...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/datalists/action/action.lib.js"> /** * Copyright (C) 2005-2010 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...
JavaScript
/** * Copyright (C) 2005-2010 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 ...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/parse-args.lib.js"> /** * Document List Component: treenode */ model.treenode = getTreeNode(); /* Create collection of folders in the given space */ function getTreeNode() { try { var items = new Array(), ...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/evaluator.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/filters.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/docume...
JavaScript
/** * Document List Component: category node */ model.categorynode = getCategoryNode(); /* Create collection of categories for the given path */ function getCategoryNode() { try { var items = new Array(), hasSubfolders = true, evalChildFolders = args["children"] !== "false"; v...
JavaScript
/** * TODO: This webscript should get all the site's containers and return the Document Library ones. * Unfortunately, there's no way to distinguish them, so we can only return the one called "documentLibrary". */ function main() { // site input var siteId = url.templateArgs.site; siteNode = siteService.ge...
JavaScript
/** * Document List Component: Create New Node - create copy of node template in the Data Dictionary */ function main() { // get the arguments - expecting the "sourceNodeRef" and "parentNodeRef" of the source node to copy // and the parent node to contain the new copy of the source. var sourceNodeRef = json....
JavaScript
const THUMBNAIL_NAME = "doclib", TYPE_SITES = "st:sites", PREF_DOCUMENT_FAVOURITES = "org.alfresco.share.documents.favourites", PREF_FOLDER_FAVOURITES = "org.alfresco.share.folders.favourites", LIKES_SCHEME = "likesRatingScheme"; var Common = { /** * Cache for person objects */ PeopleCache: {...
JavaScript
function main() { // site, component container input var siteId = url.templateArgs.site, containerId = url.templateArgs.container, containerType = args.type; siteNode = siteService.getSite(siteId); if (siteNode === null) { status.setCode(status.STATUS_NOT_FOUND, "Site not found: '" + s...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/parse-args.lib.js"> /** * Main entry point: Retrieve permissions and associated metadata for given node * * @method getPermissions */ function getPermissions() { /** * nodeRef input: store_type, store_id and id...
JavaScript
var Evaluator = { /** * Node Type evaluator */ getNodeType: function Evaluator_getNodeType(node) { var nodeType = ""; if (node.isContainer) { nodeType = "folder"; } else if (node.typeShort == "app:folderlink") { nodeType = "folderlink"; } ...
JavaScript
function main() { // nodeRef input var storeType = url.templateArgs.store_type, storeId = url.templateArgs.store_id, id = url.templateArgs.id, nodeRef = storeType + "://" + storeId + "/" + id; var node = search.findNode(nodeRef); if (node === null) { status.setCode(status.STAT...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/filters.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/parse-args.lib.js"> /** * Main entry point: Create collection of images in the given space (and its subsp...
JavaScript
function main() { // nodeRef input var storeType = url.templateArgs.store_type, storeId = url.templateArgs.store_id, id = url.templateArgs.id, nodeRef = storeType + "://" + storeId + "/" + id; var node = search.findNode(nodeRef); if (node === null) { status.setCode(status.STAT...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/filters.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/parse-args.lib.js"> /** * Main entry point: Return scope of nodeRef * * @method resolvePath */ functio...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/parse-args.lib.js"> /** * Entry point for rmpermissions POST data webscript. * Applies supplied permissions to a node. * * @method main */ function main() { /** * nodeRef input: store_type, store_id and id ...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Copy multiple files action * @method POST */ /** * Entrypoint required by action.lib.js * * @method runAction * @param p_params {object} Object literal containing files array * @retur...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Move multiple files action * @method POST */ /** * Entrypoint required by action.lib.js * * @method runAction * @param p_params {object} Object literal containing files array * @retur...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/parse-args.lib.js"> /** * Document List Component: action * * For a single-asset action, template paramters address the asset. * For multi-asset actions, template parameters address the source or destination node, * ...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Add multiple files as children action * @method POST */ /** * Entrypoint required by action.lib.js * * @method runAction * @param p_params {object} Object literal containing files arra...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Checkout file action * @method POST * @param uri {string} /{siteId}/{containerId}/{filepath} * @param json.destination {string} Optional path to checkout to */ /** * Entrypoint required...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Delete multiple files action * @method DELETE */ /** * Entrypoint required by action.lib.js * * @method runAction * @param p_params {object} Object literal containing files array * @r...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Add / Remove Aspects action * @method POST */ function jsonToArray(p_name) { var array = []; if (json.has(p_name)) { var jsonArray = json.get(p_name); for (var i =...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Cancel checkout file action * @method POST * @param uri {string} /{siteId}/{containerId}/{filepath} */ /** * Entrypoint required by action.lib.js * * @method runAction * @param p_para...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> const VALID_OPERATIONS = { "set": true, "reset-all": true }; /** * Set Permissions on single/multiple files * @method POST */ /** * Entrypoint required by action.lib.js * * @method run...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Delete file action * @method DELETE * @param uri {string} /{siteId}/{containerId}/{filepath} */ /** * Entrypoint required by action.lib.js * * @method runAction * @param p_params {obj...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/action/action.lib.js"> /** * Checkin file action * @method POST * @param uri {string} /{siteId}/{containerId}/{filepath} */ /** * Entrypoint required by action.lib.js * * @method runAction * @param p_params {obje...
JavaScript
/** * Document List Component: activity */ var _regexNodeRef = new RegExp(/^[^\:^ ]+\:\/\/[^\:^ ]+\/[^ ]+$/); postActivity(); function isNodeRef(value) { var result = false; try { result = _regexNodeRef.test(String(value)); } catch (e) { } return result; } /* Posts to the activities s...
JavaScript
/** * Document List Component: Create New Node - get list of available node templates in the Data Dictionary */ function main() { var nodes = search.selectNodes('/app:company_home/app:dictionary/app:node_templates/*[subtypeOf("cm:content")]'); return nodes; } model.nodes = main();
JavaScript
var Filters = { /** * Type map to filter required types. * NOTE: "documents" filter also returns folders to show UI hint about hidden folders. */ TYPE_MAP: { "documents": '+(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")', "folders": '+(TYPE:"folder" OR TYPE:"app:folderlink")',...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/evaluator.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/filters.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/docume...
JavaScript
<import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/evaluator.lib.js"> <import resource="classpath:/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary-v2/parse-args.lib.js"> /** * Main entry point: Return single document or folder given it's nodeRef ...
JavaScript