mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Workflow bugs, themefixes and refactored location display to a js class
- Simple workflow action couldn't re-display its values from the rule edit dialog - New repo doclienst webscript: slingshot/documentlibrary/location.get for resolving a file/folder's repo- (& site-) locations - New class Alfresco.Location that takes a nodeRef and figures out how it shall be displayed regardin to where user is browsing and if folder is in a site or not - Run in background option in rule edit now in right column to save vertical space - The "When" rule config section's select drop down is now wider so its fully readable - Flash upload now looks ok in all themes - Rules list "Inherited from"-link now working correctly - alfresco.js' combinePaths() now handles null values git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19619 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<webscript>
|
||||
<shortname>path</shortname>
|
||||
<description>Document List Component - path resolver</description>
|
||||
<url>/slingshot/doclib/node/{store_type}/{store_id}/{id}/path</url>
|
||||
<format default="json">argument</format>
|
||||
<authentication>user</authentication>
|
||||
<transaction allow="readwrite" buffersize="0">required</transaction>
|
||||
</webscript>
|
@@ -0,0 +1,49 @@
|
||||
<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
|
||||
*/
|
||||
function resolveLocations()
|
||||
{
|
||||
// Use helper function to get the arguments
|
||||
var parsedArgs = ParseArgs.getParsedArgs();
|
||||
if (parsedArgs === null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var libraryRoot = parsedArgs.libraryRoot ? parsedArgs.libraryRoot : companyhome,
|
||||
repoLocation = Common.getLocation(parsedArgs.rootNode, libraryRoot),
|
||||
siteLocation = Common.getLocation(parsedArgs.rootNode, null),
|
||||
fileName = !parsedArgs.rootNode.isContainer ? parsedArgs.rootNode.properties["name"] : null;
|
||||
|
||||
var locations =
|
||||
{
|
||||
repo:
|
||||
{
|
||||
path: repoLocation.path,
|
||||
file: fileName ? fileName : null
|
||||
}
|
||||
};
|
||||
|
||||
if (siteLocation.site)
|
||||
{
|
||||
locations.site =
|
||||
{
|
||||
path: siteLocation.path,
|
||||
file: fileName ? fileName : null,
|
||||
site: siteLocation.site,
|
||||
siteTitle: siteLocation.siteTitle,
|
||||
container: siteLocation.container
|
||||
};
|
||||
}
|
||||
|
||||
return locations;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
model.locations = resolveLocations();
|
@@ -0,0 +1,19 @@
|
||||
<#escape x as jsonUtils.encodeJSONString(x)>
|
||||
{
|
||||
<#if (locations.site??)>
|
||||
<#assign site = locations.site>
|
||||
"site":
|
||||
{
|
||||
<#if (site.file??)>"file": "${site.file}",</#if>
|
||||
"site": "${site.site!""}",
|
||||
"siteTitle": "${site.siteTitle!""}",
|
||||
"container": "${site.container!""}",
|
||||
"path": "${site.path!""}"
|
||||
},</#if>
|
||||
"repo":
|
||||
{
|
||||
<#if (locations.repo.file??)>"file": "${locations.repo.file}",</#if>
|
||||
"path": "${locations.repo.path!""}"
|
||||
}
|
||||
}
|
||||
</#escape>
|
Reference in New Issue
Block a user