mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
ALFCOM-2846 - "Choose from popular tags in this site" not available when tagging documents in Share
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14983 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -39,12 +39,18 @@ function main()
|
||||
// Set passed-in tags
|
||||
if (json.has("tags"))
|
||||
{
|
||||
var tags = String(json.get("tags"));
|
||||
if (tags !== "")
|
||||
// Get the tags JSONArray and copy it to a native JavaScript array
|
||||
var jsonTags = json.get("tags"),
|
||||
tags = [];
|
||||
|
||||
for (var t = 0; t < jsonTags.length(); t++)
|
||||
{
|
||||
// Remove leading, trailing and multiple spaces
|
||||
tags = tags.replace(/^\s+|\s+$/g, '').replace(/\s{2,}/, ' ');
|
||||
node.tags = tags.split(" ");
|
||||
tags.push(jsonTags.get(t));
|
||||
}
|
||||
|
||||
if (tags.length > 0)
|
||||
{
|
||||
node.tags = tags;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user