08-07-2020 07:30 PM
I need to select/define tags to apply to a multiple selection of documents in Share (Alfresco 6.2). I have the multiple selection working, invoking my web script where I fixed a tag for testing purposes. This is the relevat code in the YUI js file:
YAHOO.Bubbling.fire("registerAction", { actionName: "onActionMyTags", fn: function tags_onActionMyTags(selectedNodes) { var nodeIDs = ""; var tag = ""; var ii = 0; for (var i=0, ii=selectedNodes.length ; i<ii ; i++){ nodeIDs = nodeIDs + "*" + selectedNodes[i].nodeRef.substring(24); } nodeIDs = nodeIDs.substring(1); tag = "MYTAG"; this.modules.actions.genericAction({ success: { message: this.msg("msg.success") }, failure: { message: this.msg("msg.failure") } }, webscript: { name: "mytagswebscript?nodeRef={nodeRef}&tag={tag}", stem: Alfresco.constants.PROXY_URI, method: Alfresco.util.Ajax.GET, params: { nodeRef: nodeIDs, tag: tag } }, config: { requestContentType: Alfresco.util.Ajax.JSON } }) } });
I need to show the tag selection pop up that the user gets when he associates tags to individual documents in Share and put the selection in a tag array.
As a worst case solution I can settle for a pop up that shows a field where the user could type in tags (would separate with commas). I need for the field content to be available in the YUI js.
How is this done? Any pointers or links to a tutorial are appreciated.
Explore our Alfresco products with the links below. Use labels to filter content by product module.