diff --git a/config templates/config/ClientDependency.config b/config templates/config/ClientDependency.config index 51a9c39cc9..ff1f9563c5 100644 --- a/config templates/config/ClientDependency.config +++ b/config templates/config/ClientDependency.config @@ -10,7 +10,7 @@ NOTES: * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config * A new version will invalidate both client and server cache and create new persisted files --> - + diff --git a/umbraco/presentation/config/ClientDependency.config b/umbraco/presentation/config/ClientDependency.config index 2f5a407161..4ada3cd287 100644 --- a/umbraco/presentation/config/ClientDependency.config +++ b/umbraco/presentation/config/ClientDependency.config @@ -10,7 +10,7 @@ NOTES: * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config * A new version will invalidate both client and server cache and create new persisted files --> - + diff --git a/umbraco/presentation/umbraco_client/Tree/UmbracoContext.js b/umbraco/presentation/umbraco_client/Tree/UmbracoContext.js index b9cba2a691..5cec4237a7 100644 --- a/umbraco/presentation/umbraco_client/Tree/UmbracoContext.js +++ b/umbraco/presentation/umbraco_client/Tree/UmbracoContext.js @@ -1,4 +1,4 @@ -(function($) { +(function ($) { ///Custom plugin to create the Umbraco context menu, this configures the context menu plugin before it's callbacks eecute $.extend($.tree.plugins, { @@ -9,8 +9,9 @@ onBeforeContext: false }, - _getContextMenu: function(strMenu) { + _getContextMenu: function (strMenu) { /// Builds a new context menu object (array) based on the string representation passed in + var newMenu = new Array(); var separatorIndexes = new Array(); for (var i = 0; i < strMenu.length; i++) { @@ -28,7 +29,8 @@ return newMenu; }, - _getMenuItemByLetter: function(letter) { + _getMenuItemByLetter: function (letter) { + /// Finds the menu item in our full menu by the letter and returns object var fullMenu = $.tree.plugins.UmbracoContext.settings.fullMenu; //insert selector if it's a comma @@ -42,12 +44,12 @@ }, callbacks: { - oninit: function(t) { + oninit: function (t) { $.tree.plugins.UmbracoContext.settings = t.settings.plugins.UmbracoContext; //need to remove the defaults $.tree.plugins.contextmenu.defaults.items = {}; }, - onrgtclk: function(n, t, e) { + onrgtclk: function (n, t, e) { ///Need to set the context menu items for the context menu plugin for the current node var _this = $.tree.plugins.UmbracoContext; @@ -55,28 +57,31 @@ if (menu != "") { t.settings.plugins.contextmenu.items = _this._getContextMenu(menu); } + else { + t.settings.plugins.contextmenu.items = []; + } } } } }); - $(function() { + $(function () { //add events to auto hide the menu on a delay var pause = true; var timer = null; - $("#jstree-contextmenu").bind("mouseenter", function() { + $("#jstree-contextmenu").bind("mouseenter", function () { pause = true; clearTimeout(timer); }); - $("#jstree-contextmenu").bind("mouseleave", function() { + $("#jstree-contextmenu").bind("mouseleave", function () { pause = false; - timer = setTimeout(function() { + timer = setTimeout(function () { if (!pause) { $.tree.plugins.contextmenu.hide(); } }, 500); }); //disable right clicking the context menu, this is for IE bug - $("#jstree-contextmenu").bind("contextmenu", function(e) { + $("#jstree-contextmenu").bind("contextmenu", function (e) { e.preventDefault(); return false; }); diff --git a/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js b/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js index 1371a63d88..4d311f366a 100644 --- a/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js +++ b/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js @@ -67,7 +67,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); _activeTreeType: "content", //tracks which is the active tree type, this is used in searching and syncing. _tree: null, //reference to the jsTree object _isEditMode: false, //not really used YET - _isDebug: true, //set to true to enable alert debugging + _isDebug: false, //set to true to enable alert debugging _loadedApps: [], //stores the application names that have been loaded to track which JavaScript code has been inserted into the DOM _treeClass: "umbTree", //used for other libraries to detect which elements are an umbraco tree _currenAJAXRequest: false, //used to determine if there is currently an ajax request being executed. diff --git a/umbraco/presentation/web.STANDARD.config b/umbraco/presentation/web.STANDARD.config index c0b50e1237..085724150a 100644 --- a/umbraco/presentation/web.STANDARD.config +++ b/umbraco/presentation/web.STANDARD.config @@ -111,7 +111,7 @@ - +