diff --git a/umbraco/presentation/config/ClientDependency.config b/umbraco/presentation/config/ClientDependency.config index 4378c78ef4..4b75d9f81a 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/Trees/XmlTree.cs b/umbraco/presentation/umbraco/Trees/XmlTree.cs index 5d0295e848..0638edac9a 100644 --- a/umbraco/presentation/umbraco/Trees/XmlTree.cs +++ b/umbraco/presentation/umbraco/Trees/XmlTree.cs @@ -239,7 +239,18 @@ namespace umbraco.cms.presentation.Trees internal set { m_treeType = value; } } - public bool HasChildren { get; set; } + public bool HasChildren + { + get + { + return m_HasChildren ?? !string.IsNullOrEmpty(this.Source); //defaults to true if source is specified + } + set + { + m_HasChildren = value; + } + } + private bool? m_HasChildren = null; public string NodeID { diff --git a/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js b/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js index 7395ca6b7e..8a12c9d2dd 100644 --- a/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js +++ b/umbraco/presentation/umbraco_client/Tree/UmbracoTree.js @@ -71,6 +71,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); _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. + _isSyncing: false, addEventHandler: function(fnName, fn) { /// Adds an event listener to the event name event @@ -307,6 +308,9 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); this._debug("syncTree: " + path + ", " + forceReload); + //set the flag so that multiple synces aren't attempted + this._isSyncing = true; + this._syncTree.call(this, path, forceReload, null, null); }, @@ -827,6 +831,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); //if no node has been found at all in the entire path, then bubble an error event if (!found) { this._debug("no node found in path: " + path + " : " + numPaths); + this._isSyncing = false; //reset flag this._raiseEvent("syncNotFound", [path]); return; } @@ -842,6 +847,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); } else { _this._debug("node not found in children: " + path + " : " + numPaths); + this._isSyncing = false; //reset flag _this._raiseEvent("syncNotFound", [path]); } }); @@ -849,7 +855,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); else { //only force the reload of this nodes data if forceReload is specified and the node has not already come from the server var doReload = (forceReload && (numAsync == null || numAsync < 1)); - this._debug("_syncTree: found! numAsync: " + numAsync + ", forceReload: " + forceReload + ", doReload: " + doReload); + this._debug("_syncTree: found! numAsync: " + numAsync + ", forceReload: " + forceReload + ", doReload: " + doReload); if (doReload) { this._actionNode = this.getNodeDef(found); this.reloadActionNode(false, true, null); @@ -859,6 +865,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls"); if (found.attr("id") != "-1") this.selectNode(found, true); this._configureNodes(found, doReload); } + this._isSyncing = false; //reset flag //bubble event this._raiseEvent("syncFound", [found]); } diff --git a/umbraco/presentation/web.STANDARD.config b/umbraco/presentation/web.STANDARD.config index 226a6a0a53..748cd552c2 100644 --- a/umbraco/presentation/web.STANDARD.config +++ b/umbraco/presentation/web.STANDARD.config @@ -111,7 +111,7 @@ - + @@ -190,17 +190,20 @@ + + + - - + + - + - +