From 446dce1fbb3fff30253aa89dfe9d65d8095fc86a Mon Sep 17 00:00:00 2001 From: Sascha Rodekamp Date: Fri, 18 Mar 2011 08:47:00 +0000 Subject: [PATCH] Update - HelpScreen Content Navigation Tree Contexmenu removed. The Context menu is not needed in the HelpScreen, the tree is only for navigation purposes not for updating the content structure. Thanks Erwan for reporting. http://ofbiz.markmail.org/search/?q=contextual%20menu%20in%20help%20system#query:contextual%20menu%20in%20help%20system+page:1+mid:xi3vhq3qjxbg4jqj+state:results git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1082846 13f79535-47bb-0310-9956-ffa450edef68 --- .../content/content/DisplayContentNav.ftl | 112 +----------------- 1 file changed, 1 insertion(+), 111 deletions(-) diff --git a/applications/content/webapp/content/content/DisplayContentNav.ftl b/applications/content/webapp/content/content/DisplayContentNav.ftl index 413dced010..c3b91c0d53 100644 --- a/applications/content/webapp/content/content/DisplayContentNav.ftl +++ b/applications/content/webapp/content/content/DisplayContentNav.ftl @@ -58,52 +58,17 @@ var rawdata = [ <#-------------------------------------------------------------------------------------define Requests--> var treeSelected = false; - var editDocumentTreeUrl = '<@ofbizUrl>/views/EditDocumentTree'; var listDocument = '<@ofbizUrl>/views/ShowDocument'; - var editDocumentUrl = '<@ofbizUrl>/views/EditDocument'; - var deleteDocumentUrl = '<@ofbizUrl>removeDocumentFromTree'; <#-------------------------------------------------------------------------------------create Tree--> function createTree() { jQuery(function () { jQuery("#tree").jstree({ - "plugins" : [ "themes", "json_data", "ui", "contextmenu", "crrm"], + "plugins" : [ "themes", "json_data", "ui", "crrm"], "json_data" : { "data" : rawdata, "progressive_render" : false }, - 'contextmenu': { - 'items': { - 'ccp' : false, - 'create' : false, - 'rename' : false, - 'remove' : false, - 'create1' : { - 'label' : "New Folder", - 'action' : function(obj) { - callCreateDocumentTree(obj.attr('id')); - } - }, - 'create2' : { - 'label' : "New Content in Folder", - 'action' : function(obj) { - callCreateDocument(obj.attr('id')); - } - }, - 'rename1' : { - 'label' : "Rename Folder", - 'action' : function(obj) { - callRenameDocumentTree(obj.attr('id')); - } - }, - 'delete1' : { - 'label' : "Delete Folder", - 'action' : function(obj) { - callDeleteDocument(obj.attr('id'), obj.attr('contentId'), obj.attr('AssocType'), obj.attr('fromDate')); - } - }, - } - } }); }); } @@ -131,81 +96,6 @@ var rawdata = [ } }); } -<#-------------------------------------------------------------------------------------callCreateDocumentTree function--> - function callCreateDocumentTree(contentId) { - jQuery.ajax({ - url: editDocumentTreeUrl, - type: 'POST', - data: { contentId: contentId, - contentAssocTypeId: 'TREE_CHILD'}, - error: function(msg) { - showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.ErrorLoadingContent} : " + msg); - }, - success: function(msg) { - jQuery('#Document').html(msg); - } - }); - } -<#-------------------------------------------------------------------------------------callCreateSection function--> - function callCreateDocument(contentId) { - jQuery.ajax({ - url: editDocumentUrl, - type: 'POST', - data: {contentId: contentId}, - error: function(msg) { - showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.ErrorLoadingContent} : " + msg); - }, - success: function(msg) { - jQuery('#Document').html(msg); - } - }); - } -<#-------------------------------------------------------------------------------------callEditSection function--> - function callEditDocument(contentIdTo) { - jQuery.ajax({ - url: editDocumentUrl, - type: 'POST', - data: {contentIdTo: contentIdTo}, - error: function(msg) { - showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.ErrorLoadingContent} : " + msg); - }, - success: function(msg) { - jQuery('#Document').html(msg); - } - }); - - } -<#-------------------------------------------------------------------------------------callDeleteItem function--> - function callDeleteDocument(contentId, contentIdTo, contentAssocTypeId, fromDate) { - jQuery.ajax({ - url: deleteDocumentUrl, - type: 'POST', - data: {contentId : contentId, contentIdTo : contentIdTo, contentAssocTypeId : contentAssocTypeId, fromDate : fromDate}, - error: function(msg) { - showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.ErrorLoadingContent} : " + msg); - }, - success: function(msg) { - location.reload(); - } - }); - } - <#-------------------------------------------------------------------------------------callRename function--> - function callRenameDocumentTree(contentId) { - jQuery.ajax({ - url: editDocumentTreeUrl, - type: 'POST', - data: { contentId: contentId, - contentAssocTypeId:'TREE_CHILD', - rename: 'Y' - }, - error: function(msg) { - showErrorAlert("${uiLabelMap.CommonErrorMessage2}","${uiLabelMap.ErrorLoadingContent} : " + msg); - }, - success: function(msg) { - jQuery('#Document').html(msg); - } - }); - } <#------------------------------------------------------pagination function --> function nextPrevDocumentList(url){ url= '<@ofbizUrl>'+url+'';