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:
Erik Winlof
2010-03-28 13:49:48 +00:00
parent 715853507e
commit e3a75701d2
3 changed files with 76 additions and 0 deletions

View File

@@ -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>

View File

@@ -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();

View File

@@ -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>