mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
ALFCOM-2917 - Rules folders showing up in DocLib. Also made treenode data webscript much faster when checking for subfolders.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14477 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -22,8 +22,8 @@
|
|||||||
"onlineEditing": ${doclist.onlineEditing?string},
|
"onlineEditing": ${doclist.onlineEditing?string},
|
||||||
"itemCounts":
|
"itemCounts":
|
||||||
{
|
{
|
||||||
"folders": ${(itemCount.folders!0)?string},
|
"folders": ${(itemCount.folders!0)?c},
|
||||||
"documents": ${(itemCount.documents!0)?string}
|
"documents": ${(itemCount.documents!0)?c}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"items":
|
"items":
|
||||||
|
@@ -23,6 +23,7 @@ function getFilterParams(filter, parsedArgs)
|
|||||||
var filterQuery = "+PATH:\"" + parsedArgs.rootNode.qnamePath + "//*\"";
|
var filterQuery = "+PATH:\"" + parsedArgs.rootNode.qnamePath + "//*\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}thumbnail\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}thumbnail\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\"";
|
||||||
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}systemfolder\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forums\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forums\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forum\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forum\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}topic\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}topic\"";
|
||||||
@@ -75,6 +76,7 @@ function getFilterParams(filter, parsedArgs)
|
|||||||
filterQuery += " -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
|
filterQuery += " -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}thumbnail\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}thumbnail\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}folder\"";
|
||||||
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}systemfolder\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forums\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forums\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forum\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forum\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}topic\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}topic\"";
|
||||||
@@ -107,6 +109,7 @@ function getFilterParams(filter, parsedArgs)
|
|||||||
default:
|
default:
|
||||||
var filterQuery = "+PATH:\"" + parsedArgs.parentNode.qnamePath + "/*\"";
|
var filterQuery = "+PATH:\"" + parsedArgs.parentNode.qnamePath + "/*\"";
|
||||||
filterQuery += " -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
|
filterQuery += " -ASPECT:\"{http://www.alfresco.org/model/content/1.0}workingcopy\"";
|
||||||
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/content/1.0}systemfolder\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forums\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forums\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forum\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}forum\"";
|
||||||
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}topic\"";
|
filterQuery += " -TYPE:\"{http://www.alfresco.org/model/forum/1.0}topic\"";
|
||||||
|
@@ -11,12 +11,12 @@ function getTreenode(siteId, path)
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var items = new Array(),
|
var items = new Array(),
|
||||||
|
hasSubfolders,
|
||||||
ignoredTypes =
|
ignoredTypes =
|
||||||
{
|
{
|
||||||
"{http://www.alfresco.org/model/forum/1.0}forums": true,
|
|
||||||
"{http://www.alfresco.org/model/forum/1.0}forum": true,
|
"{http://www.alfresco.org/model/forum/1.0}forum": true,
|
||||||
"{http://www.alfresco.org/model/forum/1.0}topic": true,
|
"{http://www.alfresco.org/model/forum/1.0}topic": true,
|
||||||
"{http://www.alfresco.org/model/forum/1.0}post": true
|
"{http://www.alfresco.org/model/content/1.0}systemfolder": true
|
||||||
};
|
};
|
||||||
|
|
||||||
// Use helper function to get the arguments
|
// Use helper function to get the arguments
|
||||||
@@ -31,7 +31,13 @@ function getTreenode(siteId, path)
|
|||||||
{
|
{
|
||||||
if (item.isSubType("cm:folder") && !(item.type in ignoredTypes))
|
if (item.isSubType("cm:folder") && !(item.type in ignoredTypes))
|
||||||
{
|
{
|
||||||
items.push(item);
|
hasSubfolders = item.childrenByXPath("*[subtypeOf('cm:folder') and not(subtypeOf('fm:forum')) and not(subtypeOf('cm:systemfolder'))]").length > 0;
|
||||||
|
|
||||||
|
items.push(
|
||||||
|
{
|
||||||
|
node: item,
|
||||||
|
hasSubfolders: hasSubfolders
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,5 +59,5 @@ function getTreenode(siteId, path)
|
|||||||
/* Sort the results by case-insensitive name */
|
/* Sort the results by case-insensitive name */
|
||||||
function sortByName(a, b)
|
function sortByName(a, b)
|
||||||
{
|
{
|
||||||
return (b.name.toLowerCase() > a.name.toLowerCase() ? -1 : 1);
|
return (b.node.name.toLowerCase() > a.node.name.toLowerCase() ? -1 : 1);
|
||||||
}
|
}
|
@@ -3,23 +3,20 @@
|
|||||||
"totalResults": ${treenode.items?size?c},
|
"totalResults": ${treenode.items?size?c},
|
||||||
"items":
|
"items":
|
||||||
[
|
[
|
||||||
<#list treenode.items as t>
|
<#list treenode.items as item>
|
||||||
<#assign hasChildren = false>
|
<#assign t = item.node>
|
||||||
<#list t.children as c>
|
|
||||||
<#if c.isContainer><#assign hasChildren = true><#break></#if>
|
|
||||||
</#list>
|
|
||||||
{
|
{
|
||||||
"nodeRef": "${t.nodeRef}",
|
"nodeRef": "${t.nodeRef}",
|
||||||
"name": "${t.name}",
|
"name": "${t.name}",
|
||||||
"description": "${(t.properties.description!"{}")}",
|
"description": "${(t.properties.description!"")}",
|
||||||
"hasChildren": ${hasChildren?string},
|
"hasChildren": ${item.hasSubfolders?string},
|
||||||
"userAccess":
|
"userAccess":
|
||||||
{
|
{
|
||||||
"create": ${t.hasPermission("CreateChildren")?string},
|
"create": ${t.hasPermission("CreateChildren")?string},
|
||||||
"edit": ${t.hasPermission("Write")?string},
|
"edit": ${t.hasPermission("Write")?string},
|
||||||
"delete": ${t.hasPermission("Delete")?string}
|
"delete": ${t.hasPermission("Delete")?string}
|
||||||
}
|
}
|
||||||
}<#if t_has_next>,</#if>
|
}<#if item_has_next>,</#if>
|
||||||
</#list>
|
</#list>
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user