You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2016/01/25 10:38:30 UTC

[2/2] qpid-dispatch git commit: DISPATCH-201 - Fixed problems with overview page

DISPATCH-201 - Fixed problems with overview page


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/bce05297
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/bce05297
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/bce05297

Branch: refs/heads/master
Commit: bce05297afedfabf341fd4094e16c6fb30c09d31
Parents: e5a144c
Author: Ernest Allen <ea...@redhat.com>
Authored: Mon Jan 25 04:37:27 2016 -0500
Committer: Ernest Allen <ea...@redhat.com>
Committed: Mon Jan 25 04:37:27 2016 -0500

----------------------------------------------------------------------
 console/index.html                         |  14 +-
 console/plugin/css/plugin.css              |  13 +-
 console/plugin/css/qdrTopology.css         |   9 +-
 console/plugin/html/qdrOverview.html       |   8 +-
 console/plugin/html/qdrTopology.html       |  56 +++-
 console/plugin/js/qdrList.js               |  29 +-
 console/plugin/js/qdrOverview.js           |  85 +++--
 console/plugin/js/qdrTopology.js           | 148 +++------
 console/plugin/lib/angular.treeview.min.js |   9 -
 console/plugin/lib/jquery.dynatree.min.js  |   4 -
 console/plugin/lib/jquery.tipsy.js         | 418 ++++++++++++++++++++++++
 11 files changed, 637 insertions(+), 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/index.html
----------------------------------------------------------------------
diff --git a/console/index.html b/console/index.html
index ec282db..b2a753e 100644
--- a/console/index.html
+++ b/console/index.html
@@ -25,16 +25,18 @@ under the License.
     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
     <title>Qpid Dispatch Console</title>
 
-    <link rel="stylesheet" href="https://code.jquery.com/ui/1.8.24/themes/smoothness/jquery-ui.css">
+    <link rel="stylesheet" href="https://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tipsy/1.0.2/jquery.tipsy.css" type="text/css"/>
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-grid/3.0.7/ui-grid.css" type="text/css"/>
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.fancytree/2.15.0/skin-win8/ui.fancytree.css" type="text/css">
 
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
+    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
+
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css">
 
-    <link rel="stylesheet" href="plugin/css/site-base.css" type="text/css"/>
-    <link rel="stylesheet" href="plugin/css/ui.dynatree.css" type="text/css"/>
 
+    <link rel="stylesheet" href="plugin/css/site-base.css" type="text/css"/>
     <link rel="stylesheet" href="plugin/css/plugin.css" type="text/css"/>
     <link rel="stylesheet" href="plugin/css/qdrTopology.css" type="text/css"/>
     <link rel="stylesheet" href="plugin/css/json-formatter-min.css" type="text/css"/>
@@ -89,7 +91,8 @@ under the License.
     <script src="https://code.angularjs.org/1.4.8/angular-route.js"></script>
     <script src="https://code.angularjs.org/1.4.8/angular-animate.js"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.1.0/ui-bootstrap-tpls.min.js"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tipsy/1.0.2/jquery.tipsy.min.js"></script>
+    <script type="text/javascript" src="plugin/lib/jquery.tipsy.js"></script>
+    <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.tipsy/1.0.2/jquery.tipsy.js"></script> -->
 
     <script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
     <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-grid/3.0.7/ui-grid.js"></script>
@@ -108,7 +111,8 @@ under the License.
     <script type="text/javascript" src="plugin/lib/slider.js"></script>
     <script type="text/javascript" src="plugin/lib/proton.js"></script>
     <script type="text/javascript" src="plugin/lib/json-formatter-min.js"></script>
-    <script type="text/javascript" src="plugin/lib/jquery.dynatree.min.js"></script>
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.fancytree/2.15.0/jquery.fancytree.js" type="text/javascript"></script>
 
     <script type="text/javascript">
         angular.element(document.getElementsByTagName('head')).append(angular.element('<base href="' + window.location.pathname + '" />'));

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/css/plugin.css
----------------------------------------------------------------------
diff --git a/console/plugin/css/plugin.css b/console/plugin/css/plugin.css
index 1eed519..1dea21d 100644
--- a/console/plugin/css/plugin.css
+++ b/console/plugin/css/plugin.css
@@ -601,4 +601,15 @@ input[type="text"], input[type="number"], input[type="password"] {
 
 div.login.container {
 	width: 550px;
-}
\ No newline at end of file
+}
+
+#overtree .fancytree-container {
+	border: 0px;
+}
+
+#overtree span.fancytree-custom-icon.ui-icon-refresh {
+	background-position: -64px -80px;
+}
+#overtree span.fancytree-custom-icon.ui-icon-transfer-e-w {
+	background-position: -112px -80px;
+}

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/css/qdrTopology.css
----------------------------------------------------------------------
diff --git a/console/plugin/css/qdrTopology.css b/console/plugin/css/qdrTopology.css
index c45537f..e1cf239 100644
--- a/console/plugin/css/qdrTopology.css
+++ b/console/plugin/css/qdrTopology.css
@@ -366,7 +366,7 @@ li.currentStep {
 }
 
 .entity-fields {
-  height: 400px;
+  /* height: 400px; */
   overflow-y: scroll;
   overflow-x: hidden;
 }
@@ -489,3 +489,10 @@ li.currentStep {
     font-family: monospace;
 
 }
+
+.tabs-left .nav-tabs {
+	float: left;
+}
+.tabs-left .nav-tabs > li {
+	float: initial;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/html/qdrOverview.html
----------------------------------------------------------------------
diff --git a/console/plugin/html/qdrOverview.html b/console/plugin/html/qdrOverview.html
index 8d492fb..d63ea0e 100644
--- a/console/plugin/html/qdrOverview.html
+++ b/console/plugin/html/qdrOverview.html
@@ -31,7 +31,7 @@ under the License.
     <div class="row-fluid">
         <h3>Routers</h3>
         <div class="overview">
-            <div ui-grid="allRouters" ng-style="getGridHeight(allRouters)" ui-grid-auto-resize ui-grid-selection class="gridStyle"></div>
+            <div class="gridStyle" ng-style="getGridHeight(allRouters)" ui-grid-auto-resize ui-grid-selection ui-grid="allRouters"></div>
         </div>
     </div>
 </script>
@@ -39,7 +39,7 @@ under the License.
 <script type="text/ng-template" id="router.html">
     <div class="row-fluid">
         <h3>Router {{router.data.title}}</h3>
-        <div ui-grid="routerGrid" class="gridStyle noHighlight"></div>
+        <div ng-style="getGridHeight(routerGrid)" ui-grid-auto-resize ui-grid="routerGrid" class="gridStyle noHighlight"></div>
     </div>
 </script>
 
@@ -54,7 +54,7 @@ under the License.
 <script type="text/ng-template" id="address.html">
     <div class="row-fluid">
     <h3>Address {{address.data.title}}</h3>
-    <div class="gridStyle noHighlight" ui-grid="addressGrid"></div>
+    <div ng-style="getGridHeight(addressGrid)" ui-grid-auto-resize class="gridStyle noHighlight" ui-grid="addressGrid"></div>
     </div>
 </script>
 <script type="text/ng-template" id="connections.html">
@@ -68,7 +68,7 @@ under the License.
 <script type="text/ng-template" id="connection.html">
     <div class="row-fluid">
     <h3>Connection {{connection.data.title}}</h3>
-    <div class="gridStyle noHighlight" ui-grid="connectionGrid"></div>
+    <div ng-style="getGridHeight(connectionGrid)" ui-grid-auto-resize class="gridStyle noHighlight" ui-grid="connectionGrid"></div>
     </div>
 </script>
 <script type="text/ng-template" id="logs.html">

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/html/qdrTopology.html
----------------------------------------------------------------------
diff --git a/console/plugin/html/qdrTopology.html b/console/plugin/html/qdrTopology.html
index a5d0235..078cc97 100644
--- a/console/plugin/html/qdrTopology.html
+++ b/console/plugin/html/qdrTopology.html
@@ -79,8 +79,58 @@ under the License.
     This is the template for the node edit dialog that is displayed.
 -->
 <script type="text/ng-template" id="node-config-template.html">
-    <div class="nodeOptions" title="Configure new router" ng-controller="QDR.NodeDialogController">
+    <div class="modal-header">
+        <h3 class="modal-title">Configure new router</h3>
+    </div>
+    <div class="modal-body">
+        <form novalidate name="editForm">
+        <div class="tabbable tabs-left">
+            <ul class="nav nav-tabs">
+                <li ng-repeat="entity in entities" ng-click="setActive(entity.tabName)" ng-class="{separated: entity.tabName == 'listener0'}">
+                    <a href="#{{entity.tabName}}" data-toggle="tab"><i ng-if="entity.icon !== ''" ng-class="entity.icon ? 'ui-icon-arrowthick-1-w' : 'ui-icon-arrowthick-1-e'" class="ui-icon"></i>{{entity.humanName}}</a>
+                </li>
+            </ul>
+            <div class="tab-content">
+                <div id="{{entity.tabName}}" ng-repeat="entity in entities" ng-show="isActive(entity.tabName)" class="entity-fields">
+                    <div class="entity-description">{{entity.description}}</div>
+                    <fieldset>
+                        <div ng-mouseenter="showDescription(attribute, $event)" ng-repeat="attribute in entity.attributes">
+                            <label for="{{attribute.name}}">{{attribute.humanName}}</label>
+                            <div ng-if="attribute.input == 'input'">
+                                <!-- ng-pattern="testPattern(attribute)" -->
+                                <input type="{{attribute.type}}" name="{{attribute.name}}" id="{{attribute.name}}" ng-model="attribute.value" ng-required="attribute.required" class="ui-widget-content ui-corner-all">
+                            </div>
+                            <div ng-if="attribute.input == 'select'">
+                                <select id="{{attribute.name}}" ng-model="attribute.selected" ng-options="item for item in attribute.rawtype"></select>
+                            </div>
+                            <div ng-if="attribute.input == 'boolean'" class="boolean">
+                                <label><input type="radio" ng-model="attribute.value" value="true"> True</label>
+                                <label><input type="radio" ng-model="attribute.value" value="false"> False</label>
+                            </div>
+                        </div>
+                    </fieldset>
+                    <div class="attr-description">{{attributeDescription}}
+                        <div class="attr-type">{{attributeType}}</div>
+                        <div class="attr-required">{{attributeRequired}}</div>
+                        <div class="attr-unique">{{attributeUnique}}</div>
+                    </div>
+                    <div class="attr-annotations" ng-repeat="annotation in entity.annotatedBy">
+                        <span>You can also enter the <button ng-click="selectAnnotationTab(annotation)">{{annotation}}</button> values.</span>
+                    </div>
+                </div>
+            </div>
+        </div>
+        </form>
+    </div>
+    <div class="modal-footer">
+        <button class="btn btn-primary" type="button" ng-click="download()">Download</button>
+        <button class="btn btn-warning" type="button" ng-click="cancel()">Cancel</button>
+    </div>
 
+<!--
+
+
+    <div class="nodeOptions" title="Configure new router">
         <form novalidate name="editForm">
         <div id="tabs" class="nodeEntities">
             <ul class="nodeTabs">
@@ -123,6 +173,7 @@ under the License.
             <button ng-click="cancel()">Cancel</button>
         </div>
     </div>
+    -->
 </script>
 
 <script type="text/ng-template" id="config-file-header.html">##
@@ -146,7 +197,7 @@ under the License.
 </script>
 
 <script type="text/ng-template" id="download-dialog-template.html">
-    <div title="Configure new router" ng-controller="QDR.DownloadDialogController">
+    <div title="Configure new router">
 
         <label title="Show descriptions and default values in confile files"><input type="checkbox" ng-model="verbose"> Verbose output</label>
         <div>
@@ -168,3 +219,4 @@ under the License.
 
     </div>
 </script>
+

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/js/qdrList.js
----------------------------------------------------------------------
diff --git a/console/plugin/js/qdrList.js b/console/plugin/js/qdrList.js
index c1fc01c..7352d82 100644
--- a/console/plugin/js/qdrList.js
+++ b/console/plugin/js/qdrList.js
@@ -174,9 +174,6 @@ var QDR = (function(QDR) {
 
 		// tableRows are the records that were returned, this populates the left hand table on the page
 		var selectRow = function (tableRows) {
-			while ($scope.tableRows.length) {
-				$scope.tableRows.pop();
-			}
 			$scope.tableRows = tableRows;
 			// must apply scope here to update the tableRows before selecting the row
 			$scope.$apply();
@@ -187,12 +184,37 @@ var QDR = (function(QDR) {
 		$scope.getTableHeight = function() {
 	       return {height: ($scope.tableRows.length * 30) + "px"};
 	    };
+	    var titleFromAlt = function (alt) {
+			if (alt && alt.length) {
+				var data = angular.fromJson(alt);
+				var table = "<table class='tiptable'><tbody>";
+				data.forEach (function (row) {
+					table += "<tr>";
+					table += "<td>" + row.node + "</td><td align='right'>" + QDRService.pretty(row.val) + "</td>";
+					table += "</tr>"
+				})
+				table += "</tbody></table>"
+				return table;
+			}
+			return '';
+	    }
 		var fixTooltips = function () {
 			if ($('.hastip').length == 0) {
 				setTimeout(fixTooltips, 100);
 				return;
 			}
 			$('.hastip').each( function (i, tip) {
+				var tipset = tip.getAttribute('tipset')
+				if (!tipset) {
+					$(tip).tipsy({html: true, className: 'subTip', opacity: 1, title: function () {
+						return titleFromAlt(this.getAttribute('alt'))
+					} });
+					tip.setAttribute('tipset', true)
+				} else {
+					var title = titleFromAlt(tip.getAttribute('alt'))
+					tip.setAttribute('original-title', title)
+				}
+/*
 				$(tip).tipsy({html: true, className: 'subTip', opacity: 1, title: function () {
 					var alt = this.getAttribute('alt');
 					if (alt && alt.length) {
@@ -208,6 +230,7 @@ var QDR = (function(QDR) {
 					}
 					return '';
 				} });
+				*/
 			})
 		}
 		$scope.selectedEntity = undefined;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/js/qdrOverview.js
----------------------------------------------------------------------
diff --git a/console/plugin/js/qdrOverview.js b/console/plugin/js/qdrOverview.js
index 8d9c83c..d787a5e 100644
--- a/console/plugin/js/qdrOverview.js
+++ b/console/plugin/js/qdrOverview.js
@@ -47,9 +47,16 @@ var QDR = (function (QDR) {
             function Folder(title) {
                 this.title = title;
 				this.children = [];
+				this.folder = true;
             }
             return Folder;
         })();
+		var Leaf = (function () {
+            function Leaf(title) {
+                this.title = title;
+            }
+            return Leaf;
+        })();
 	    $scope.modes = [
 	    	{title: 'Overview', name: 'Overview', right: false}
 	    	];
@@ -112,7 +119,7 @@ var QDR = (function (QDR) {
 				gridApi.selection.on.rowSelectionChanged($scope, function(row) {
 					if (row.isSelected) {
 						var nodeId = row.entity.nodeId;
-						$("#overtree").dynatree("getTree").activateKey(nodeId);
+						$("#overtree").fancytree("getTree").activateKey(nodeId);
 					}
 				});
 		    }
@@ -187,14 +194,17 @@ var QDR = (function (QDR) {
 			$scope.routerGrid = {
 				data: 'routerFields',
 				columnDefs: cols,
+				enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
+	            enableVerticalScrollbar: uiGridConstants.scrollbars.NEVER,
 				enableColumnResize: true,
 				multiSelect: false
 			}
 
 			$scope.allRouterFields.some( function (field) {
-				if (field.routerId === node.data.title) {
+				if (field.routerId === node.title) {
 					Object.keys(field).forEach ( function (key) {
-						$scope.routerFields.push({attribute: key, value: field[key]})
+						if (key !== '$$hashKey')
+							$scope.routerFields.push({attribute: key, value: field[key]})
 					})
 					return true
 				}
@@ -265,7 +275,7 @@ var QDR = (function (QDR) {
 					gridApi.selection.on.rowSelectionChanged($scope, function(row) {
 						if (row.isSelected) {
 							var key = row.entity.uid;
-							$("#overtree").dynatree("getTree").activateKey(key);
+							$("#overtree").fancytree("getTree").activateKey(key);
 						}
 					});
 			    }
@@ -400,7 +410,7 @@ var QDR = (function (QDR) {
 					gridApi.selection.on.rowSelectionChanged($scope, function(row) {
 						if (row.isSelected) {
 							var host = row.entity.host;
-							$("#overtree").dynatree("getTree").activateKey(host);
+							$("#overtree").fancytree("getTree").activateKey(host);
 						}
 					});
 			    }
@@ -435,6 +445,8 @@ var QDR = (function (QDR) {
 				data: 'addressFields',
 				columnDefs: cols,
 				enableColumnResize: true,
+				enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
+	            enableVerticalScrollbar: uiGridConstants.scrollbars.NEVER,
 				multiSelect: false
 			}
 
@@ -471,6 +483,8 @@ var QDR = (function (QDR) {
 				data: 'connectionFields',
 				columnDefs: cols,
 				enableColumnResize: true,
+				enableHorizontalScrollbar: uiGridConstants.scrollbars.NEVER,
+	            enableVerticalScrollbar: uiGridConstants.scrollbars.NEVER,
 				multiSelect: false
 			}
 
@@ -495,41 +509,47 @@ var QDR = (function (QDR) {
 			$scope.log = node
 		}
 
-
-		var activated = function (node) {
+		var activated = function (event, node) {
 			//QDR.log.debug("node activated: " + node.data.title)
+			node = node.node;
 			var type = node.data.type;
 			var template = $scope.templates.filter( function (tpl) {
 				return tpl.name == type;
 			})
 			$scope.template = template[0];
-			if (node.data.info)
+			// Call the function associated with this type passing in the node that was selected
+			// In dynatree I could save the function to call in the node, but not in FancyTree
+			if (treeTypeMap[type])
+				treeTypeMap[type](node);
+
+			/*if (node.data.info)
 				node.data.info(node)
+			*/
 			$scope.$apply();
 		}
         $scope.template = $scope.templates[0];
 
 		var routers = new Folder("Routers")
 		routers.type = "Routers"
-		routers.info = allRouterInfo
-		routers.activate = true
+		//routers.info = allRouterInfo
+		routers.focus = true
+		routers.expanded = true
 		routers.key = "Routers"
 		$scope.overview.children.push(routers)
 		nodeIds.forEach( function (node) {
 			var name = QDRService.nameFromId(node)
-			var router = new Folder(name)
+			var router = new Leaf(name)
 			router.type = "Router"
-			router.info = routerInfo
+			//router.info = routerInfo
 			router.nodeId = node
 			router.key = node
 			routers.children.push(router)
 		})
 
-
 		var expected = nodeIds.length;
 		var addresses = new Folder("Addresses")
 		addresses.type = "Addresses"
-		addresses.info = allAddressInfo
+		//addresses.info = allAddressInfo
 		addresses.key = "Addresses"
 		$scope.overview.children.push(addresses)
 
@@ -544,8 +564,8 @@ var QDR = (function (QDR) {
 					addressFields[i].title = addressFields[i].address
 			}
 			addressFields.forEach( function (address) {
-				var a = new Folder(address.title)
-				a.info = addressInfo
+				var a = new Leaf(address.title)
+				//a.info = addressInfo
 				a.key = address.uid
 				a.fields = address
 				a.type = "Address"
@@ -559,7 +579,7 @@ var QDR = (function (QDR) {
 		var connectionsObj = {}
 		var connections = new Folder("Connections")
 		connections.type = "Connections"
-		connections.info = allConnectionInfo
+		//connections.info = allConnectionInfo
 		connections.key = "Connections"
 		$scope.overview.children.push(connections)
 		nodeIds.forEach( function (nodeId) {
@@ -604,13 +624,13 @@ var QDR = (function (QDR) {
 				if (connreceived == expected) {
 					var allConnections = Object.keys(connectionsObj).sort()
 					allConnections.forEach(function (connection) {
-						var c = new Folder(connection)
+						var c = new Leaf(connection)
 						c.type = "Connection"
-						c.info = connectionInfo
+						c.icon = "ui-icon "
+						c.icon += connectionsObj[connection].role === "inter-router" ? "ui-icon-refresh" : "ui-icon-transfer-e-w"
+						//c.info = connectionInfo
 						c.key = connection
 						c.fields = connectionsObj[connection]
-						if (connectionsObj[connection].role === "inter-router")
-							c.addClass = "icon-random"
 						c.tooltip = connectionsObj[connection].role === "inter-router" ? "inter-router connection" : "external connection"
 						connections.children.push(c)
 					})
@@ -622,7 +642,7 @@ var QDR = (function (QDR) {
 		var logObj = {}
 		var logs = new Folder("Logs")
 		logs.type = "Logs"
-		logs.info = allLogInfo
+		//logs.info = allLogInfo
 		logs.key = "Logs"
 		//$scope.overview.children.push(logs)
 		nodeIds.forEach( function (nodeId) {
@@ -634,16 +654,19 @@ var QDR = (function (QDR) {
 				if (logsreceived == expected) {
 					var allLogs = Object.keys(logObj).sort()
 					allLogs.forEach(function (log) {
-						var l = new Folder(log)
+						var l = new Leaf(log)
 						l.type = "Log"
-						l.info = logInfo
+						//l.info = logInfo
 						l.key = log
 						logs.children.push(l)
 					})
-					$("#overtree").dynatree({
-						onActivate: activated,
+					//console.log("---------------")
+					//console.dump($scope.overview.children)
+					//console.log("---------------")
+					$("#overtree").fancytree({
+						activate: activated,
 						clickFolderMode: 1,
-						children: $scope.overview.children
+						source: $scope.overview.children
 						})
 					allRouterInfo();
 				}
@@ -656,6 +679,14 @@ var QDR = (function (QDR) {
 				currentTimer = null;
 			}
         });
+		var treeTypeMap = {
+			Routers:     allRouterInfo,
+			Router:      routerInfo,
+			Addresses:   allAddressInfo,
+			Address:     addressInfo,
+			Connections: allConnectionInfo,
+			Connection:  connectionInfo
+		}
 
     }]);
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/js/qdrTopology.js
----------------------------------------------------------------------
diff --git a/console/plugin/js/qdrTopology.js b/console/plugin/js/qdrTopology.js
index f85bf78..98d30a6 100644
--- a/console/plugin/js/qdrTopology.js
+++ b/console/plugin/js/qdrTopology.js
@@ -19,7 +19,6 @@ under the License.
 /**
  * @module QDR
  */
-var dialogService = {};
 var QDR = (function (QDR) {
 
   /**
@@ -40,8 +39,8 @@ var QDR = (function (QDR) {
    *
    */
    
-    QDR.module.controller("QDR.TopologyController", ['$scope', '$rootScope', 'uiGridConstants', 'QDRService', '$location', '$timeout',
-    function($scope, $rootScope, uiGridConstants, QDRService, $location, $timeout) {
+    QDR.module.controller("QDR.TopologyController", ['$scope', '$rootScope', 'uiGridConstants', 'QDRService', '$uibModal', '$location', '$timeout',
+    function($scope, $rootScope, uiGridConstants, QDRService, $uibModal, $location, $timeout) {
 
 		QDR.log.debug("started QDR.TopologyController with location.url: " + $location.url());
 		QDR.log.debug("started QDR.TopologyController with window.location.pathname : " + window.location.pathname);
@@ -232,8 +231,9 @@ var QDR = (function (QDR) {
 				editNode();
 			}
 		})
+
 	    function editNode() {
-	        doAddDialog("node-config-template.html", NewRouterName);
+	        doAddDialog(NewRouterName);
 	    };
 		$scope.reverseLink = function () {
 			if (!mousedown_link)
@@ -1453,95 +1453,39 @@ var QDR = (function (QDR) {
 
 		initGlobe(cities)//, "Boston", "Tel Aviv-Yafo"]);
 
-	    function doAddDialog(template, NewRouterName) {
-
-            // The data for the dialog
-            var model = {
-                NewRouterName:  NewRouterName,
-                controller:     $scope
-            };
-
-            // jQuery UI dialog options
-            var options = {
-                autoOpen: false,
-                modal: true,
-                width: "50em",
-                position: {my: "top", at: "top", of: ".qdrTopology"},
-                show: {
-                        effect: "fade",
-                        duration: 200
-                      },
-                      hide: {
-                        effect: "fade",
-                        duration: 200
-                      },
-                resizable: false,
-                close: function(event, ui) {
-
-                    QDR.log.debug("Edit node cancelled?");
-                    console.dump(ui);
-                }
-            };
-            if (dialogService.isOpen("nodeDialog"))
-                return;
-
-            // Open the dialog using template from script
-            dialogService.open("nodeDialog", template, model, options).then(
-                function(result) {
-                    doDownloadDialog(result);
-                },
-                function(error) {
-                    QDR.log.debug("error");
-                    console.dump(error);
-                }
-            );
-
+	    function doAddDialog(NewRouterName) {
+		    var modalInstance = $uibModal.open({
+		        animation: true,
+		        controller: 'QDR.NodeDialogController',
+		        templateUrl: 'node-config-template.html',
+		        size: 'lg',
+		        resolve: {
+		            newname: function () {
+		                return NewRouterName;
+		            }
+		        }
+		    });
+		    modalInstance.result.then(function (result) {
+				if (result)
+					setTimeout(doDownloadDialog, 100, result);
+		    });
         };
 
 	    function doDownloadDialog(result) {
-
-            // The data for the dialog
-            var model = {
-                result:     result,
-                controller: $scope
-            };
-
-            // jQuery UI dialog options
-            var options = {
-                autoOpen: false,
-                modal: true,
-                width: "30em",
-                position: {my: "middle", at: "middle", of: ".qdrTopology"},
-                show: {
-                        effect: "fade",
-                        duration: 200
-                      },
-                      hide: {
-                        effect: "fade",
-                        duration: 200
-                      },
-                resizable: false
-            };
-            if (dialogService.isOpen("downloadDialog"))
-                return;
-
-            // Open the dialog using template from script
-            dialogService.open("downloadDialog", "download-dialog-template.html", model, options).then(
-                function() {
-                },
-                function(error) {
-                    QDR.log.debug("error");
-                    console.dump(error);
-                }
-            );
-
+		    var modalInstance = $uibModal.open({
+		        animation: true,
+				controller: 'QDR.DownloadDialogController',
+		        templateUrl: 'download-dialog-template.html',
+		        resolve: {
+		            results: function () {
+		                return result;
+		            }
+		        }
+		    });
         };
-
-
   }]);
 
-  QDR.module.controller("QDR.NodeDialogController", ['$scope', 'QDRService', function($scope, QDRService) {
-        var newName = $scope.model.NewRouterName;
+  QDR.module.controller("QDR.NodeDialogController", function($scope, QDRService, $uibModalInstance, newname) {
    		var schema = QDRService.schema;
    		var myEntities = ['container', 'router', 'log', 'listener' ];
    		var typeMap = {integer: 'number', string: 'text', path: 'text', boolean: 'boolean'};
@@ -1649,7 +1593,7 @@ var QDR = (function (QDR) {
    		    var noAnnotations = stripAnnotations(entityName, ent, annotations);
 			var ediv = entity(entityName, entityName, hName, noAnnotations, undefined);
 			if (ediv.actualName == 'router') {
-				ediv.attributes.filter(function (attr) { return attr.name == 'name'})[0].value = newName;
+				ediv.attributes.filter(function (attr) { return attr.name == 'name'})[0].value = newname;
 				// if we have any new links (connectors), then the router's mode should be interior
 				if (newLinks.length) {
 					var roleAttr = ediv.attributes.filter(function (attr) { return attr.name == 'mode'})[0];
@@ -1657,7 +1601,7 @@ var QDR = (function (QDR) {
 				}
 			}
 			if (ediv.actualName == 'container') {
-				ediv.attributes.filter(function (attr) { return attr.name == 'containerName'})[0].value = newName + "-container";
+				ediv.attributes.filter(function (attr) { return attr.name == 'containerName'})[0].value = newname + "-container";
 			}
 			if (ediv.actualName == 'listener') {
 				// find max port number that is used in all the listeners
@@ -1744,7 +1688,7 @@ var QDR = (function (QDR) {
 		})
 
         $scope.cancel = function () {
-            dialogService.cancel("nodeDialog");
+            $uibModalInstance.close()
         };
 		$scope.testPattern = function (attr) {
 			if (attr.rawtype == 'path')
@@ -1757,7 +1701,14 @@ var QDR = (function (QDR) {
 		$scope.attributeType = '';
 		$scope.attributeRequired = '';
 		$scope.attributeUnique = '';
+		$scope.active = 'container'
 		$scope.fieldsetDivs = "/fieldsetDivs.html"
+		$scope.setActive = function (tabName) {
+			$scope.active = tabName
+		}
+		$scope.isActive = function (tabName) {
+			return $scope.active === tabName
+		}
 		$scope.showDescription = function (attr, e) {
 			$scope.attributeDescription = attr.description;
 			var offset = jQuery(e.currentTarget).offset()
@@ -1770,8 +1721,7 @@ var QDR = (function (QDR) {
         // handle the download button click
         // copy the dialog's values to the original node
         $scope.download = function () {
-			//$scope.nodeInfo.this = $scope.workingInfo.this;
-			dialogService.close("nodeDialog", {entities: $scope.entities, annotations: annotations});
+	        $uibModalInstance.close({entities: $scope.entities, annotations: annotations});
         }
 
 		$scope.selectAnnotationTab = function (tabName) {
@@ -1792,13 +1742,12 @@ var QDR = (function (QDR) {
         // start the update loop
         initTabs();
 
-  }]);
+  });
 
-QDR.module.controller("QDR.DownloadDialogController", ['$scope', 'QDRService', '$templateCache', '$window',
-function($scope, QDRService, $templateCache, $window) {
+QDR.module.controller("QDR.DownloadDialogController", function($scope, QDRService, $templateCache, $window, $uibModalInstance, results) {
 
-		var result = $scope.model.result.entities;
-		var annotations = $scope.model.result.annotations;
+		var result = results.entities;
+		var annotations = results.annotations;
 		var annotationKeys = Object.keys(annotations);
 		var annotationSections = {};
 
@@ -1914,10 +1863,9 @@ function($scope, QDRService, $templateCache, $window) {
 		}
 
 		$scope.done = function () {
-			dialogService.close("downloadDialog");
+	        $uibModalInstance.close();
 		}
-}]);
-
+});
 
   return QDR;
 }(QDR || {}));

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/lib/angular.treeview.min.js
----------------------------------------------------------------------
diff --git a/console/plugin/lib/angular.treeview.min.js b/console/plugin/lib/angular.treeview.min.js
deleted file mode 100644
index 90e1e43..0000000
--- a/console/plugin/lib/angular.treeview.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
-	@license Angular Treeview version 0.1.6
-	ⓒ 2013 AHN JAE-HA http://github.com/eu81273/angular.treeview
-	License: MIT
-*/
-
-(function(f){f.module("angularTreeview",[]).directive("treeModel",function($compile){return{restrict:"A",link:function(b,h,c){var a=c.treeId,g=c.treeModel,e=c.nodeLabel||"label",d=c.nodeChildren||"children",e='<ul><li data-ng-repeat="node in '+g+'"><i class="collapsed" data-ng-show="node.'+d+'.length && node.collapsed" data-ng-click="'+a+'.selectNodeHead(node)"></i><i class="expanded" data-ng-show="node.'+d+'.length && !node.collapsed" data-ng-click="'+a+'.selectNodeHead(node)"></i><i class="normal" data-ng-hide="node.'+
-d+'.length"></i> <span data-ng-class="node.selected" data-ng-click="'+a+'.selectNodeLabel(node)">{{node.'+e+'}}</span><div data-ng-hide="node.collapsed" data-tree-id="'+a+'" data-tree-model="node.'+d+'" data-node-id='+(c.nodeId||"id")+" data-node-label="+e+" data-node-children="+d+"></div></li></ul>";a&&g&&(c.angularTreeview&&(b[a]=b[a]||{},b[a].selectNodeHead=b[a].selectNodeHead||function(a){a.collapsed=!a.collapsed},b[a].selectNodeLabel=b[a].selectNodeLabel||function(c){b[a].currentNode&&b[a].currentNode.selected&&
-(b[a].currentNode.selected=void 0);c.selected="selected";b[a].currentNode=c}),h.html('').append($compile(e)(b)))}}})})(angular);

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/bce05297/console/plugin/lib/jquery.dynatree.min.js
----------------------------------------------------------------------
diff --git a/console/plugin/lib/jquery.dynatree.min.js b/console/plugin/lib/jquery.dynatree.min.js
deleted file mode 100644
index 5f7fbf3..0000000
--- a/console/plugin/lib/jquery.dynatree.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery Dynatree Plugin - v1.2.2 - 2012-10-07
-* http://dynatree.googlecode.com/
-* Copyright (c) 2012 Martin Wendt; Licensed MIT, GPL */
-function _log(a,b){if(!_canLog)return;var c=Array.prototype.slice.apply(arguments,[1]),d=new Date,e=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds()+"."+d.getMilliseconds();c[0]=e+" - "+c[0];try{switch(a){case"info":window.console.info.apply(window.console,c);break;case"warn":window.console.warn.apply(window.console,c);break;default:window.console.log.apply(window.console,c)}}catch(f){window.console||(_canLog=!1)}}function logMsg(a){Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments)}var _canLog=!0,getDynaTreePersistData=null,DTNodeStatus_Error=-1,DTNodeStatus_Loading=1,DTNodeStatus_Ok=0;(function($){function getDtNodeFromElement(a){return alert("getDtNodeFromElement is deprecated"),$.ui.dynatree.getNode(a)}function noop(){}function _initDragAndDrop(a){var b=a.options.dnd||null;b&&(b.onDragStart||b.onDrop)&&_registerDnd(),b&&b.onDragStart&&a.$tree.draggable({addClasses:!1,appendTo:"body",containment:!1,delay:0,distance:4,revert:!1,scroll:!0,scrollSpeed:7,
 scrollSensitivity:10,connectToDynatree:!0,helper:function(a){var b=$.ui.dynatree.getNode(a.target);return b?b.tree._onDragEvent("helper",b,null,a,null,null):"<div></div>"},start:function(a,b){var c=b.helper.data("dtSourceNode");return!!c},_last:null}),b&&b.onDrop&&a.$tree.droppable({addClasses:!1,tolerance:"intersect",greedy:!1,_last:null})}var Class={create:function(){return function(){this.initialize.apply(this,arguments)}}},DynaTreeNode=Class.create();DynaTreeNode.prototype={initialize:function(a,b,c){this.parent=a,this.tree=b,typeof c=="string"&&(c={title:c}),c.key===undefined&&(c.key="_"+b._nodeCount++),this.data=$.extend({},$.ui.dynatree.nodedatadefaults,c),this.li=null,this.span=null,this.ul=null,this.childList=null,this._isLoading=!1,this.hasSubSel=!1,this.bExpanded=!1,this.bSelected=!1},toString:function(){return"DynaTreeNode<"+this.data.key+">: '"+this.data.title+"'"},toDict:function(a,b){var c=$.extend({},this.data);c.activate=this.tree.activeNode===this,c.focus=this.tree
 .focusNode===this,c.expand=this.bExpanded,c.select=this.bSelected,b&&b(c);if(a&&this.childList){c.children=[];for(var d=0,e=this.childList.length;d<e;d++)c.children.push(this.childList[d].toDict(!0,b))}else delete c.children;return c},fromDict:function(a){var b=a.children;if(b===undefined){this.data=$.extend(this.data,a),this.render();return}a=$.extend({},a),a.children=undefined,this.data=$.extend(this.data,a),this.removeChildren(),this.addChild(b)},_getInnerHtml:function(){var a=this.tree,b=a.options,c=a.cache,d=this.getLevel(),e=this.data,f="",g;d<b.minExpandLevel?d>1&&(f+=c.tagConnector):this.hasChildren()!==!1?f+=c.tagExpander:f+=c.tagConnector,b.checkbox&&e.hideCheckbox!==!0&&!e.isStatusNode&&(f+=c.tagCheckbox),e.icon?(e.icon.charAt(0)==="/"?g=e.icon:g=b.imagePath+e.icon,f+="<img src='"+g+"' alt='' />"):e.icon!==!1&&(f+=c.tagNodeIcon);var h="";b.onCustomRender&&(h=b.onCustomRender.call(a,this)||"");if(!h){var i=e.tooltip?' title="'+e.tooltip.replace(/\"/g,"&quot;")+'"':"",j=e.h
 ref||"#";b.noLink||e.noLink?h='<span style="display:inline-block;" class="'+b.classNames.title+'"'+i+">"+e.title+"</span>":h='<a href="'+j+'" class="'+b.classNames.title+'"'+i+">"+e.title+"</a>"}return f+=h,f},_fixOrder:function(){var a=this.childList;if(!a||!this.ul)return;var b=this.ul.firstChild;for(var c=0,d=a.length-1;c<d;c++){var e=a[c],f=b.dtnode;e!==f?(this.tree.logDebug("_fixOrder: mismatch at index "+c+": "+e+" != "+f),this.ul.insertBefore(e.li,f.li)):b=b.nextSibling}},render:function(a,b){var c=this.tree,d=this.parent,e=this.data,f=c.options,g=f.classNames,h=this.isLastSibling(),i=!1;if(!d&&!this.ul)this.li=this.span=null,this.ul=document.createElement("ul"),f.minExpandLevel>1?this.ul.className=g.container+" "+g.noConnector:this.ul.className=g.container;else if(d){this.li||(i=!0,this.li=document.createElement("li"),this.li.dtnode=this,e.key&&f.generateIds&&(this.li.id=f.idPrefix+e.key),this.span=document.createElement("span"),this.span.className=g.title,this.li.appendChil
 d(this.span),d.ul||(d.ul=document.createElement("ul"),d.ul.style.display="none",d.li.appendChild(d.ul)),d.ul.appendChild(this.li)),this.span.innerHTML=this._getInnerHtml();var j=[];j.push(g.node),e.isFolder&&j.push(g.folder),this.bExpanded&&j.push(g.expanded),this.hasChildren()!==!1&&j.push(g.hasChildren),e.isLazy&&this.childList===null&&j.push(g.lazy),h&&j.push(g.lastsib),this.bSelected&&j.push(g.selected),this.hasSubSel&&j.push(g.partsel),c.activeNode===this&&j.push(g.active),e.addClass&&j.push(e.addClass),j.push(g.combinedExpanderPrefix+(this.bExpanded?"e":"c")+(e.isLazy&&this.childList===null?"d":"")+(h?"l":"")),j.push(g.combinedIconPrefix+(this.bExpanded?"e":"c")+(e.isFolder?"f":"")),this.span.className=j.join(" "),this.li.className=h?g.lastsib:"",i&&f.onCreate&&f.onCreate.call(c,this,this.span),f.onRender&&f.onRender.call(c,this,this.span)}if((this.bExpanded||b===!0)&&this.childList){for(var k=0,l=this.childList.length;k<l;k++)this.childList[k].render(!1,b);this._fixOrder()}if
 (this.ul){var m=this.ul.style.display==="none",n=!!this.bExpanded;if(a&&f.fx&&m===n){var o=f.fx.duration||200;$(this.ul).animate(f.fx,o)}else this.ul.style.display=this.bExpanded||!d?"":"none"}},getKeyPath:function(a){var b=[];return this.visitParents(function(a){a.parent&&b.unshift(a.data.key)},!a),"/"+b.join(this.tree.options.keyPathSeparator)},getParent:function(){return this.parent},getChildren:function(){return this.hasChildren()===undefined?undefined:this.childList},hasChildren:function(){if(this.data.isLazy)return this.childList===null||this.childList===undefined?undefined:this.childList.length===0?!1:this.childList.length===1&&this.childList[0].isStatusNode()?undefined:!0;return!!this.childList},isFirstSibling:function(){var a=this.parent;return!a||a.childList[0]===this},isLastSibling:function(){var a=this.parent;return!a||a.childList[a.childList.length-1]===this},isLoading:function(){return!!this._isLoading},getPrevSibling:function(){if(!this.parent)return null;var a=this.p
 arent.childList;for(var b=1,c=a.length;b<c;b++)if(a[b]===this)return a[b-1];return null},getNextSibling:function(){if(!this.parent)return null;var a=this.parent.childList;for(var b=0,c=a.length-1;b<c;b++)if(a[b]===this)return a[b+1];return null},isStatusNode:function(){return this.data.isStatusNode===!0},isChildOf:function(a){return this.parent&&this.parent===a},isDescendantOf:function(a){if(!a)return!1;var b=this.parent;while(b){if(b===a)return!0;b=b.parent}return!1},countChildren:function(){var a=this.childList;if(!a)return 0;var b=a.length;for(var c=0,d=b;c<d;c++){var e=a[c];b+=e.countChildren()}return b},sortChildren:function(a,b){var c=this.childList;if(!c)return;a=a||function(a,b){var c=a.data.title.toLowerCase(),d=b.data.title.toLowerCase();return c===d?0:c>d?1:-1},c.sort(a);if(b)for(var d=0,e=c.length;d<e;d++)c[d].childList&&c[d].sortChildren(a,"$norender$");b!=="$norender$"&&this.render()},_setStatusNode:function(a){var b=this.childList?this.childList[0]:null;if(!a){if(b&&b
 .isStatusNode()){try{this.ul&&(this.ul.removeChild(b.li),b.li=null)}catch(c){}this.childList.length===1?this.childList=[]:this.childList.shift()}}else b?(a.isStatusNode=!0,a.key="_statusNode",b.data=a,b.render()):(a.isStatusNode=!0,a.key="_statusNode",b=this.addChild(a))},setLazyNodeStatus:function(a,b){var c=b&&b.tooltip?b.tooltip:null,d=b&&b.info?" ("+b.info+")":"";switch(a){case DTNodeStatus_Ok:this._setStatusNode(null),$(this.span).removeClass(this.tree.options.classNames.nodeLoading),this._isLoading=!1,this.tree.options.autoFocus&&(this===this.tree.tnRoot&&this.childList&&this.childList.length>0?this.childList[0].focus():this.focus());break;case DTNodeStatus_Loading:this._isLoading=!0,$(this.span).addClass(this.tree.options.classNames.nodeLoading),this.parent||this._setStatusNode({title:this.tree.options.strings.loading+d,tooltip:c,addClass:this.tree.options.classNames.nodeWait});break;case DTNodeStatus_Error:this._isLoading=!1,this._setStatusNode({title:this.tree.options.strin
 gs.loadError+d,tooltip:c,addClass:this.tree.options.classNames.nodeError});break;default:throw"Bad LazyNodeStatus: '"+a+"'."}},_parentList:function(a,b){var c=[],d=b?this:this.parent;while(d)(a||d.parent)&&c.unshift(d),d=d.parent;return c},getLevel:function(){var a=0,b=this.parent;while(b)a++,b=b.parent;return a},_getTypeForOuterNodeEvent:function(a){var b=this.tree.options.classNames,c=a.target;if(c.className.indexOf(b.node)<0)return null;var d=a.pageX-c.offsetLeft,e=a.pageY-c.offsetTop;for(var f=0,g=c.childNodes.length;f<g;f++){var h=c.childNodes[f],i=h.offsetLeft-c.offsetLeft,j=h.offsetTop-c.offsetTop,k=h.clientWidth,l=h.clientHeight;if(d>=i&&d<=i+k&&e>=j&&e<=j+l){if(h.className==b.title)return"title";if(h.className==b.expander)return"expander";if(h.className==b.checkbox)return"checkbox";if(h.className==b.nodeIcon)return"icon"}}return"prefix"},getEventTargetType:function(a){var b=a&&a.target?a.target.className:"",c=this.tree.options.classNames;return b===c.title?"title":b===c.exp
 ander?"expander":b===c.checkbox?"checkbox":b===c.nodeIcon?"icon":b===c.empty||b===c.vline||b===c.connector?"prefix":b.indexOf(c.node)>=0?this._getTypeForOuterNodeEvent(a):null},isVisible:function(){var a=this._parentList(!0,!1);for(var b=0,c=a.length;b<c;b++)if(!a[b].bExpanded)return!1;return!0},makeVisible:function(){var a=this._parentList(!0,!1);for(var b=0,c=a.length;b<c;b++)a[b]._expand(!0)},focus:function(){this.makeVisible();try{$(this.span).find(">a").focus()}catch(a){}},isFocused:function(){return this.tree.tnFocused===this},_activate:function(a,b){this.tree.logDebug("dtnode._activate(%o, fireEvents=%o) - %o",a,b,this);var c=this.tree.options;if(this.data.isStatusNode)return;if(b&&c.onQueryActivate&&c.onQueryActivate.call(this.tree,a,this)===!1)return;if(a){if(this.tree.activeNode){if(this.tree.activeNode===this)return;this.tree.activeNode.deactivate()}c.activeVisible&&this.makeVisible(),this.tree.activeNode=this,c.persist&&$.cookie(c.cookieId+"-active",this.data.key,c.cooki
 e),this.tree.persistence.activeKey=this.data.key,$(this.span).addClass(c.classNames.active),b&&c.onActivate&&c.onActivate.call(this.tree,this)}else if(this.tree.activeNode===this){if(c.onQueryActivate&&c.onQueryActivate.call(this.tree,!1,this)===!1)return;$(this.span).removeClass(c.classNames.active),c.persist&&$.cookie(c.cookieId+"-active","",c.cookie),this.tree.persistence.activeKey=null,this.tree.activeNode=null,b&&c.onDeactivate&&c.onDeactivate.call(this.tree,this)}},activate:function(){this._activate(!0,!0)},activateSilently:function(){this._activate(!0,!1)},deactivate:function(){this._activate(!1,!0)},isActive:function(){return this.tree.activeNode===this},_userActivate:function(){var a=!0,b=!1;if(this.data.isFolder)switch(this.tree.options.clickFolderMode){case 2:a=!1,b=!0;break;case 3:a=b=!0}this.parent===null&&(b=!1),b&&(this.toggleExpand(),this.focus()),a&&this.activate()},_setSubSel:function(a){a?(this.hasSubSel=!0,$(this.span).addClass(this.tree.options.classNames.partse
 l)):(this.hasSubSel=!1,$(this.span).removeClass(this.tree.options.classNames.partsel))},_updatePartSelectionState:function(){var a;if(!this.hasChildren())return a=this.bSelected&&!this.data.unselectable&&!this.data.isStatusNode,this._setSubSel(!1),a;var b,c,d=this.childList,e=!0,f=!0;for(b=0,c=d.length;b<c;b++){var g=d[b],h=g._updatePartSelectionState();h!==!1&&(f=!1),h!==!0&&(e=!1)}return e?a=!0:f?a=!1:a=undefined,this._setSubSel(a===undefined),this.bSelected=a===!0,a},_fixSelectionState:function(){var a,b,c;if(this.bSelected){this.visit(function(a){a.parent._setSubSel(!0),a.data.unselectable||a._select(!0,!1,!1)}),a=this.parent;while(a){a._setSubSel(!0);var d=!0;for(b=0,c=a.childList.length;b<c;b++){var e=a.childList[b];if(!e.bSelected&&!e.data.isStatusNode&&!e.data.unselectable){d=!1;break}}d&&a._select(!0,!1,!1),a=a.parent}}else{this._setSubSel(!1),this.visit(function(a){a._setSubSel(!1),a._select(!1,!1,!1)}),a=this.parent;while(a){a._select(!1,!1,!1);var f=!1;for(b=0,c=a.childL
 ist.length;b<c;b++)if(a.childList[b].bSelected||a.childList[b].hasSubSel){f=!0;break}a._setSubSel(f),a=a.parent}}},_select:function(a,b,c){var d=this.tree.options;if(this.data.isStatusNode)return;if(this.bSelected===a)return;if(b&&d.onQuerySelect&&d.onQuerySelect.call(this.tree,a,this)===!1)return;d.selectMode==1&&a&&this.tree.visit(function(a){if(a.bSelected)return a._select(!1,!1,!1),!1}),this.bSelected=a,a?(d.persist&&this.tree.persistence.addSelect(this.data.key),$(this.span).addClass(d.classNames.selected),c&&d.selectMode===3&&this._fixSelectionState(),b&&d.onSelect&&d.onSelect.call(this.tree,!0,this)):(d.persist&&this.tree.persistence.clearSelect(this.data.key),$(this.span).removeClass(d.classNames.selected),c&&d.selectMode===3&&this._fixSelectionState(),b&&d.onSelect&&d.onSelect.call(this.tree,!1,this))},select:function(a){return this.data.unselectable?this.bSelected:this._select(a!==!1,!0,!0)},toggleSelect:function(){return this.select(!this.bSelected)},isSelected:function()
 {return this.bSelected},isLazy:function(){return!!this.data.isLazy},_loadContent:function(){try{var a=this.tree.options;this.tree.logDebug("_loadContent: start - %o",this),this.setLazyNodeStatus(DTNodeStatus_Loading),!0===a.onLazyRead.call(this.tree,this)&&(this.setLazyNodeStatus(DTNodeStatus_Ok),this.tree.logDebug("_loadContent: succeeded - %o",this))}catch(b){this.tree.logWarning("_loadContent: failed - %o",b),this.setLazyNodeStatus(DTNodeStatus_Error,{tooltip:""+b})}},_expand:function(a,b){if(this.bExpanded===a){this.tree.logDebug("dtnode._expand(%o) IGNORED - %o",a,this);return}this.tree.logDebug("dtnode._expand(%o) - %o",a,this);var c=this.tree.options;if(!a&&this.getLevel()<c.minExpandLevel){this.tree.logDebug("dtnode._expand(%o) prevented collapse - %o",a,this);return}if(c.onQueryExpand&&c.onQueryExpand.call(this.tree,a,this)===!1)return;this.bExpanded=a,c.persist&&(a?this.tree.persistence.addExpand(this.data.key):this.tree.persistence.clearExpand(this.data.key));var d=(!this
 .data.isLazy||this.childList!==null)&&!this._isLoading&&!b;this.render(d);if(this.bExpanded&&this.parent&&c.autoCollapse){var e=this._parentList(!1,!0);for(var f=0,g=e.length;f<g;f++)e[f].collapseSiblings()}c.activeVisible&&this.tree.activeNode&&!this.tree.activeNode.isVisible()&&this.tree.activeNode.deactivate();if(a&&this.data.isLazy&&this.childList===null&&!this._isLoading){this._loadContent();return}c.onExpand&&c.onExpand.call(this.tree,a,this)},isExpanded:function(){return this.bExpanded},expand:function(a){a=a!==!1;if(!this.childList&&!this.data.isLazy&&a)return;if(this.parent===null&&!a)return;this._expand(a)},scheduleAction:function(a,b){this.tree.timer&&(clearTimeout(this.tree.timer),this.tree.logDebug("clearTimeout(%o)",this.tree.timer));var c=this;switch(a){case"cancel":break;case"expand":this.tree.timer=setTimeout(function(){c.tree.logDebug("setTimeout: trigger expand"),c.expand(!0)},b);break;case"activate":this.tree.timer=setTimeout(function(){c.tree.logDebug("setTimeou
 t: trigger activate"),c.activate()},b);break;default:throw"Invalid mode "+a}this.tree.logDebug("setTimeout(%s, %s): %s",a,b,this.tree.timer)},toggleExpand:function(){this.expand(!this.bExpanded)},collapseSiblings:function(){if(this.parent===null)return;var a=this.parent.childList;for(var b=0,c=a.length;b<c;b++)a[b]!==this&&a[b].bExpanded&&a[b]._expand(!1)},_onClick:function(a){var b=this.getEventTargetType(a);if(b==="expander")this.toggleExpand(),this.focus();else if(b==="checkbox")this.toggleSelect(),this.focus();else{this._userActivate();var c=this.span.getElementsByTagName("a");if(c[0])$.browser.msie&&parseInt($.browser.version,10)<9||c[0].focus();else return!0}a.preventDefault()},_onDblClick:function(a){},_onKeydown:function(a){var b=!0,c;switch(a.which){case 107:case 187:this.bExpanded||this.toggleExpand();break;case 109:case 189:this.bExpanded&&this.toggleExpand();break;case 32:this._userActivate();break;case 8:this.parent&&this.parent.focus();break;case 37:this.bExpanded?(thi
 s.toggleExpand(),this.focus()):this.parent&&this.parent.parent&&this.parent.focus();break;case 39:!this.bExpanded&&(this.childList||this.data.isLazy)?(this.toggleExpand(),this.focus()):this.childList&&this.childList[0].focus();break;case 38:c=this.getPrevSibling();while(c&&c.bExpanded&&c.childList)c=c.childList[c.childList.length-1];!c&&this.parent&&this.parent.parent&&(c=this.parent),c&&c.focus();break;case 40:if(this.bExpanded&&this.childList)c=this.childList[0];else{var d=this._parentList(!1,!0);for(var e=d.length-1;e>=0;e--){c=d[e].getNextSibling();if(c)break}}c&&c.focus();break;default:b=!1}b&&a.preventDefault()},_onKeypress:function(a){},_onFocus:function(a){var b=this.tree.options;if(a.type=="blur"||a.type=="focusout")b.onBlur&&b.onBlur.call(this.tree,this),this.tree.tnFocused&&$(this.tree.tnFocused.span).removeClass(b.classNames.focused),this.tree.tnFocused=null,b.persist&&$.cookie(b.cookieId+"-focus","",b.cookie);else if(a.type=="focus"||a.type=="focusin")this.tree.tnFocuse
 d&&this.tree.tnFocused!==this&&(this.tree.logDebug("dtnode.onFocus: out of sync: curFocus: %o",this.tree.tnFocused),$(this.tree.tnFocused.span).removeClass(b.classNames.focused)),this.tree.tnFocused=this,b.onFocus&&b.onFocus.call(this.tree,this),$(this.tree.tnFocused.span).addClass(b.classNames.focused),b.persist&&$.cookie(b.cookieId+"-focus",this.data.key,b.cookie)},visit:function(a,b){var c=!0;if(b===!0){c=a(this);if(c===!1||c=="skip")return c}if(this.childList)for(var d=0,e=this.childList.length;d<e;d++){c=this.childList[d].visit(a,!0);if(c===!1)break}return c},visitParents:function(a,b){if(b&&a(this)===!1)return!1;var c=this.parent;while(c){if(a(c)===!1)return!1;c=c.parent}return!0},remove:function(){if(this===this.tree.root)throw"Cannot remove system root";return this.parent.removeChild(this)},removeChild:function(a){var b=this.childList;if(b.length==1){if(a!==b[0])throw"removeChild: invalid child";return this.removeChildren()}a===this.tree.activeNode&&a.deactivate(),this.tree.
 options.persist&&(a.bSelected&&this.tree.persistence.clearSelect(a.data.key),a.bExpanded&&this.tree.persistence.clearExpand(a.data.key)),a.removeChildren(!0),this.ul.removeChild(a.li);for(var c=0,d=b.length;c<d;c++)if(b[c]===a){this.childList.splice(c,1);break}},removeChildren:function(a,b){this.tree.logDebug("%s.removeChildren(%o)",this,a);var c=this.tree,d=this.childList;if(d){for(var e=0,f=d.length;e<f;e++){var g=d[e];g===c.activeNode&&!b&&g.deactivate(),this.tree.options.persist&&!b&&(g.bSelected&&this.tree.persistence.clearSelect(g.data.key),g.bExpanded&&this.tree.persistence.clearExpand(g.data.key)),g.removeChildren(!0,b),this.ul&&$("li",$(this.ul)).remove()}this.childList=null}a||(this._isLoading=!1,this.render())},setTitle:function(a){this.fromDict({title:a})},reload:function(a){throw"Use reloadChildren() instead"},reloadChildren:function(a){if(this.parent===null)throw"Use tree.reload() instead";if(!this.data.isLazy)throw"node.reloadChildren() requires lazy nodes.";if(a){var
  b=this,c="nodeLoaded.dynatree."+this.tree.$tree.attr("id")+"."+this.data.key;this.tree.$tree.bind(c,function(d,e,f){b.tree.$tree.unbind(c),b.tree.logDebug("loaded %o, %o, %o",d,e,f);if(e!==b)throw"got invalid load event";a.call(b.tree,e,f)})}this.removeChildren(),this._loadContent()},_loadKeyPath:function(a,b){var c=this.tree;c.logDebug("%s._loadKeyPath(%s)",this,a);if(a==="")throw"Key path must not be empty";var d=a.split(c.options.keyPathSeparator);if(d[0]==="")throw"Key path must be relative (don't start with '/')";var e=d.shift();if(this.childList)for(var f=0,g=this.childList.length;f<g;f++){var h=this.childList[f];if(h.data.key===e){if(d.length===0)b.call(c,h,"ok");else if(!h.data.isLazy||h.childList!==null&&h.childList!==undefined)b.call(c,h,"loaded"),h._loadKeyPath(d.join(c.options.keyPathSeparator),b);else{c.logDebug("%s._loadKeyPath(%s) -> reloading %s...",this,a,h);var i=this;h.reloadChildren(function(e,f){f?(c.logDebug("%s._loadKeyPath(%s) -> reloaded %s.",e,a,e),b.call(
 c,h,"loaded"),e._loadKeyPath(d.join(c.options.keyPathSeparator),b)):(c.logWarning("%s._loadKeyPath(%s) -> reloadChildren() failed.",i,a),b.call(c,h,"error"))})}return}}b.call(c,undefined,"notfound",e,d.length===0),c.logWarning("Node not found: "+e);return},resetLazy:function(){if(this.parent===null)throw"Use tree.reload() instead";if(!this.data.isLazy)throw"node.resetLazy() requires lazy nodes.";this.expand(!1),this.removeChildren()},_addChildNode:function(a,b){var c=this.tree,d=c.options,e=c.persistence;a.parent=this,this.childList===null?this.childList=[]:b||this.childList.length>0&&$(this.childList[this.childList.length-1].span).removeClass(d.classNames.lastsib);if(b){var f=$.inArray(b,this.childList);if(f<0)throw"<beforeNode> must be a child of <this>";this.childList.splice(f,0,a)}else this.childList.push(a);var g=c.isInitializing();d.persist&&e.cookiesFound&&g?(e.activeKey===a.data.key&&(c.activeNode=a),e.focusedKey===a.data.key&&(c.focusNode=a),a.bExpanded=$.inArray(a.data.key
 ,e.expandedKeyList)>=0,a.bSelected=$.inArray(a.data.key,e.selectedKeyList)>=0):(a.data.activate&&(c.activeNode=a,d.persist&&(e.activeKey=a.data.key)),a.data.focus&&(c.focusNode=a,d.persist&&(e.focusedKey=a.data.key)),a.bExpanded=a.data.expand===!0,a.bExpanded&&d.persist&&e.addExpand(a.data.key),a.bSelected=a.data.select===!0,a.bSelected&&d.persist&&e.addSelect(a.data.key)),d.minExpandLevel>=a.getLevel()&&(this.bExpanded=!0);if(a.bSelected&&d.selectMode==3){var h=this;while(h)h.hasSubSel||h._setSubSel(!0),h=h.parent}return c.bEnableUpdate&&this.render(),a},addChild:function(a,b){if(typeof a=="string")throw"Invalid data type for "+a;if(!a||a.length===0)return;if(a instanceof DynaTreeNode)return this._addChildNode(a,b);a.length||(a=[a]);var c=this.tree.enableUpdate(!1),d=null;for(var e=0,f=a.length;e<f;e++){var g=a[e],h=this._addChildNode(new DynaTreeNode(this,this.tree,g),b);d||(d=h),g.children&&h.addChild(g.children,null)}return this.tree.enableUpdate(c),d},append:function(a){return 
 this.tree.logWarning("node.append() is deprecated (use node.addChild() instead)."),this.addChild(a,null)},appendAjax:function(a){var b=this;this.removeChildren(!1,!0),this.setLazyNodeStatus(DTNodeStatus_Loading);if(a.debugLazyDelay){var c=a.debugLazyDelay;a.debugLazyDelay=0,this.tree.logInfo("appendAjax: waiting for debugLazyDelay "+c),setTimeout(function(){b.appendAjax(a)},c);return}var d=a.success,e=a.error,f="nodeLoaded.dynatree."+this.tree.$tree.attr("id")+"."+this.data.key,g=$.extend({},this.tree.options.ajaxDefaults,a,{success:function(a,c,e){var h=b.tree.phase;b.tree.phase="init",g.postProcess?a=g.postProcess.call(this,a,this.dataType):a&&a.hasOwnProperty("d")&&(a=typeof a.d=="string"?$.parseJSON(a.d):a.d),(!$.isArray(a)||a.length!==0)&&b.addChild(a,null),b.tree.phase="postInit",d&&d.call(g,b,a,c),b.tree.logDebug("trigger "+f),b.tree.$tree.trigger(f,[b,!0]),b.tree.phase=h,b.setLazyNodeStatus(DTNodeStatus_Ok),$.isArray(a)&&a.length===0&&(b.childList=[],b.render())},error:funct
 ion(a,c,d){b.tree.logWarning("appendAjax failed:",c,":\n",a,"\n",d),e&&e.call(g,b,a,c,d),b.tree.$tree.trigger(f,[b,!1]),b.setLazyNodeStatus(DTNodeStatus_Error,{info:c,tooltip:""+d})}});$.ajax(g)},move:function(a,b){var c;if(this===a)return;if(!this.parent)throw"Cannot move system root";if(b===undefined||b=="over")b="child";var d=this.parent,e=b==="child"?a:a.parent;if(e.isDescendantOf(this))throw"Cannot move a node to it's own descendant";if(this.parent.childList.length==1)this.parent.childList=this.parent.data.isLazy?[]:null,this.parent.bExpanded=!1;else{c=$.inArray(this,this.parent.childList);if(c<0)throw"Internal error";this.parent.childList.splice(c,1)}this.parent.ul&&this.parent.ul.removeChild(this.li),this.parent=e;if(e.hasChildren())switch(b){case"child":e.childList.push(this);break;case"before":c=$.inArray(a,e.childList);if(c<0)throw"Internal error";e.childList.splice(c,0,this);break;case"after":c=$.inArray(a,e.childList);if(c<0)throw"Internal error";e.childList.splice(c+1,0
 ,this);break;default:throw"Invalid mode "+b}else e.childList=[this];e.ul||(e.ul=document.createElement("ul"),e.ul.style.display="none",e.li.appendChild(e.ul)),this.li&&e.ul.appendChild(this.li);if(this.tree!==a.tree)throw this.visit(function(b){b.tree=a.tree},null,!0),"Not yet implemented.";d.isDescendantOf(e)||d.render(),e.isDescendantOf(d)||e.render()},lastentry:undefined};var DynaTreeStatus=Class.create();DynaTreeStatus._getTreePersistData=function(a,b){var c=new DynaTreeStatus(a,b);return c.read(),c.toDict()},getDynaTreePersistData=DynaTreeStatus._getTreePersistData,DynaTreeStatus.prototype={initialize:function(a,b){a===undefined&&(a=$.ui.dynatree.prototype.options.cookieId),b=$.extend({},$.ui.dynatree.prototype.options.cookie,b),this.cookieId=a,this.cookieOpts=b,this.cookiesFound=undefined,this.activeKey=null,this.focusedKey=null,this.expandedKeyList=null,this.selectedKeyList=null},_log:function(a){Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments)},r
 ead:function(){this.cookiesFound=!1;var a=$.cookie(this.cookieId+"-active");this.activeKey=a===null?"":a,a!==null&&(this.cookiesFound=!0),a=$.cookie(this.cookieId+"-focus"),this.focusedKey=a===null?"":a,a!==null&&(this.cookiesFound=!0),a=$.cookie(this.cookieId+"-expand"),this.expandedKeyList=a===null?[]:a.split(","),a!==null&&(this.cookiesFound=!0),a=$.cookie(this.cookieId+"-select"),this.selectedKeyList=a===null?[]:a.split(","),a!==null&&(this.cookiesFound=!0)},write:function(){$.cookie(this.cookieId+"-active",this.activeKey===null?"":this.activeKey,this.cookieOpts),$.cookie(this.cookieId+"-focus",this.focusedKey===null?"":this.focusedKey,this.cookieOpts),$.cookie(this.cookieId+"-expand",this.expandedKeyList===null?"":this.expandedKeyList.join(","),this.cookieOpts),$.cookie(this.cookieId+"-select",this.selectedKeyList===null?"":this.selectedKeyList.join(","),this.cookieOpts)},addExpand:function(a){$.inArray(a,this.expandedKeyList)<0&&(this.expandedKeyList.push(a),$.cookie(this.cook
 ieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},clearExpand:function(a){var b=$.inArray(a,this.expandedKeyList);b>=0&&(this.expandedKeyList.splice(b,1),$.cookie(this.cookieId+"-expand",this.expandedKeyList.join(","),this.cookieOpts))},addSelect:function(a){$.inArray(a,this.selectedKeyList)<0&&(this.selectedKeyList.push(a),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},clearSelect:function(a){var b=$.inArray(a,this.selectedKeyList);b>=0&&(this.selectedKeyList.splice(b,1),$.cookie(this.cookieId+"-select",this.selectedKeyList.join(","),this.cookieOpts))},isReloading:function(){return this.cookiesFound===!0},toDict:function(){return{cookiesFound:this.cookiesFound,activeKey:this.activeKey,focusedKey:this.activeKey,expandedKeyList:this.expandedKeyList,selectedKeyList:this.selectedKeyList}},lastentry:undefined};var DynaTree=Class.create();DynaTree.version="$Version:$",DynaTree.prototype={initialize:function(a){this.phase="init",this.$wid
 get=a,this.options=a.options,this.$tree=a.element,this.timer=null,this.divTree=this.$tree.get(0),_initDragAndDrop(this)},_load:function(a){var b=this.$widget,c=this.options,d=this;this.bEnableUpdate=!0,this._nodeCount=1,this.activeNode=null,this.focusNode=null,c.rootVisible!==undefined&&this.logWarning("Option 'rootVisible' is no longer supported."),c.minExpandLevel<1&&(this.logWarning("Option 'minExpandLevel' must be >= 1."),c.minExpandLevel=1),c.classNames!==$.ui.dynatree.prototype.options.classNames&&(c.classNames=$.extend({},$.ui.dynatree.prototype.options.classNames,c.classNames)),c.ajaxDefaults!==$.ui.dynatree.prototype.options.ajaxDefaults&&(c.ajaxDefaults=$.extend({},$.ui.dynatree.prototype.options.ajaxDefaults,c.ajaxDefaults)),c.dnd!==$.ui.dynatree.prototype.options.dnd&&(c.dnd=$.extend({},$.ui.dynatree.prototype.options.dnd,c.dnd)),c.imagePath||$("script").each(function(){var a=/.*dynatree[^\/]*\.js$/i;if(this.src.search(a)>=0)return this.src.indexOf("/")>=0?c.imagePath=th
 is.src.slice(0,this.src.lastIndexOf("/"))+"/skin/":c.imagePath="skin/",d.logDebug("Guessing imagePath from '%s': '%s'",this.src,c.imagePath),!1}),this.persistence=new DynaTreeStatus(c.cookieId,c.cookie),c.persist&&($.cookie||_log("warn","Please include jquery.cookie.js to use persistence."),this.persistence.read()),this.logDebug("DynaTree.persistence: %o",this.persistence.toDict()),this.cache={tagEmpty:"<span class='"+c.classNames.empty+"'></span>",tagVline:"<span class='"+c.classNames.vline+"'></span>",tagExpander:"<span class='"+c.classNames.expander+"'></span>",tagConnector:"<span class='"+c.classNames.connector+"'></span>",tagNodeIcon:"<span class='"+c.classNames.nodeIcon+"'></span>",tagCheckbox:"<span class='"+c.classNames.checkbox+"'></span>",lastentry:undefined},(c.children||c.initAjax&&c.initAjax.url||c.initId)&&$(this.divTree).empty();var e=this.$tree.find(">ul:first").hide();this.tnRoot=new DynaTreeNode(null,this,{}),this.tnRoot.bExpanded=!0,this.tnRoot.render(),this.divTr
 ee.appendChild(this.tnRoot.ul);var f=this.tnRoot,g=c.persist&&this.persistence.isReloading(),h=!1,i=this.enableUpdate(!1);this.logDebug("Dynatree._load(): read tree structure..."),c.children?f.addChild(c.children):c.initAjax&&c.initAjax.url?(h=!0,f.data.isLazy=!0,this._reloadAjax(a)):c.initId?this._createFromTag(f,$("#"+c.initId)):(this._createFromTag(f,e),e.remove()),this._checkConsistency(),!h&&c.selectMode==3&&f._updatePartSelectionState(),this.logDebug("Dynatree._load(): render nodes..."),this.enableUpdate(i),this.logDebug("Dynatree._load(): bind events..."),this.$widget.bind(),this.logDebug("Dynatree._load(): postInit..."),this.phase="postInit",c.persist&&this.persistence.write(),this.focusNode&&this.focusNode.isVisible()&&(this.logDebug("Focus on init: %o",this.focusNode),this.focusNode.focus()),h||(c.onPostInit&&c.onPostInit.call(this,g,!1),a&&a.call(this,"ok")),this.phase="idle"},_reloadAjax:function(a){var b=this.options;if(!b.initAjax||!b.initAjax.url)throw"tree.reload() r
 equires 'initAjax' mode.";var c=this.persistence,d=$.extend({},b.initAjax);d.addActiveKey&&(d.data.activeKey=c.activeKey),d.addFocusedKey&&(d.data.focusedKey=c.focusedKey),d.addExpandedKeyList&&(d.data.expandedKeyList=c.expandedKeyList.join(",")),d.addSelectedKeyList&&(d.data.selectedKeyList=c.selectedKeyList.join(",")),d.success&&this.logWarning("initAjax: success callback is ignored; use onPostInit instead."),d.error&&this.logWarning("initAjax: error callback is ignored; use onPostInit instead.");var e=c.isReloading();d.success=function(c,d,f){b.selectMode==3&&c.tree.tnRoot._updatePartSelectionState(),b.onPostInit&&b.onPostInit.call(c.tree,e,!1),a&&a.call(c.tree,"ok")},d.error=function(c,d,f,g){b.onPostInit&&b.onPostInit.call(c.tree,e,!0,d,f,g),a&&a.call(c.tree,"error",d,f,g)},this.logDebug("Dynatree._init(): send Ajax request..."),this.tnRoot.appendAjax(d)},toString:function(){return"Dynatree '"+this.$tree.attr("id")+"'"},toDict:function(){return this.tnRoot.toDict(!0)},serialize
 Array:function(a){var b=this.getSelectedNodes(a),c=this.$tree.attr("name")||this.$tree.attr("id"),d=[];for(var e=0,f=b.length;e<f;e++)d.push({name:c,value:b[e].data.key});return d},getPersistData:function(){return this.persistence.toDict()},logDebug:function(a){this.options.debugLevel>=2&&(Array.prototype.unshift.apply(arguments,["debug"]),_log.apply(this,arguments))},logInfo:function(a){this.options.debugLevel>=1&&(Array.prototype.unshift.apply(arguments,["info"]),_log.apply(this,arguments))},logWarning:function(a){Array.prototype.unshift.apply(arguments,["warn"]),_log.apply(this,arguments)},isInitializing:function(){return this.phase=="init"||this.phase=="postInit"},isReloading:function(){return(this.phase=="init"||this.phase=="postInit")&&this.options.persist&&this.persistence.cookiesFound},isUserEvent:function(){return this.phase=="userEvent"},redraw:function(){this.tnRoot.render(!1,!1)},renderInvisibleNodes:function(){this.tnRoot.render(!1,!0)},reload:function(a){this._load(a)}
 ,getRoot:function(){return this.tnRoot},enable:function(){this.$widget.enable()},disable:function(){this.$widget.disable()},getNodeByKey:function(a){var b=document.getElementById(this.options.idPrefix+a);if(b)return b.dtnode?b.dtnode:null;var c=null;return this.visit(function(b){if(b.data.key==a)return c=b,!1},!0),c},getActiveNode:function(){return this.activeNode},reactivate:function(a){var b=this.activeNode;b&&(this.activeNode=null,b.activate(),a&&b.focus())},getSelectedNodes:function(a){var b=[];return this.tnRoot.visit(function(c){if(c.bSelected){b.push(c);if(a===!0)return"skip"}}),b},activateKey:function(a){var b=a===null?null:this.getNodeByKey(a);return b?(b.focus(),b.activate(),b):(this.activeNode&&this.activeNode.deactivate(),this.activeNode=null,null)},loadKeyPath:function(a,b){var c=a.split(this.options.keyPathSeparator);return c[0]===""&&c.shift(),c[0]==this.tnRoot.data.key&&(this.logDebug("Removed leading root key."),c.shift()),a=c.join(this.options.keyPathSeparator),thi
 s.tnRoot._loadKeyPath(a,b)},selectKey:function(a,b){var c=this.getNodeByKey(a);return c?(c.select(b),c):null},enableUpdate:function(a){return this.bEnableUpdate==a?a:(this.bEnableUpdate=a,a&&this.redraw(),!a)},count:function(){return this.tnRoot.countChildren()},visit:function(a,b){return this.tnRoot.visit(a,b)},_createFromTag:function(parentTreeNode,$ulParent){var self=this;$ulParent.find(">li").each(function(){var $li=$(this),$liSpan=$li.find(">span:first"),$liA=$li.find(">a:first"),title,href=null,target=null,tooltip;if($liSpan.length)title=$liSpan.html();else if($liA.length)title=$liA.html(),href=$liA.attr("href"),target=$liA.attr("target"),tooltip=$liA.attr("title");else{title=$li.html();var iPos=title.search(/<ul/i);iPos>=0?title=$.trim(title.substring(0,iPos)):title=$.trim(title)}var data={title:title,tooltip:tooltip,isFolder:$li.hasClass("folder"),isLazy:$li.hasClass("lazy"),expand:$li.hasClass("expanded"),select:$li.hasClass("selected"),activate:$li.hasClass("active"),focus
 :$li.hasClass("focused"),noLink:$li.hasClass("noLink")};href&&(data.href=href,data.target=target),$li.attr("title")&&(data.tooltip=$li.attr("title")),$li.attr("id")&&(data.key=$li.attr("id"));if($li.attr("data")){var dataAttr=$.trim($li.attr("data"));if(dataAttr){dataAttr.charAt(0)!="{"&&(dataAttr="{"+dataAttr+"}");try{$.extend(data,eval("("+dataAttr+")"))}catch(e){throw"Error parsing node data: "+e+"\ndata:\n'"+dataAttr+"'"}}}var childNode=parentTreeNode.addChild(data),$ul=$li.find(">ul:first");$ul.length&&self._createFromTag(childNode,$ul)})},_checkConsistency:function(){},_setDndStatus:function(a,b,c,d,e){var f=a?$(a.span):null,g=$(b.span);this.$dndMarker||(this.$dndMarker=$("<div id='dynatree-drop-marker'></div>").hide().css({"z-index":1e3}).prependTo($(this.divTree).parent()));if(d==="after"||d==="before"||d==="over"){var h="0 0";switch(d){case"before":this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-over"),this.$dndMarker.addClass("dynatree-drop-before"),h="0 -8"
 ;break;case"after":this.$dndMarker.removeClass("dynatree-drop-before dynatree-drop-over"),this.$dndMarker.addClass("dynatree-drop-after"),h="0 8";break;default:this.$dndMarker.removeClass("dynatree-drop-after dynatree-drop-before"),this.$dndMarker.addClass("dynatree-drop-over"),g.addClass("dynatree-drop-target"),h="8 0"}this.$dndMarker.show().position({my:"left top",at:"left top",of:g,offset:h})}else g.removeClass("dynatree-drop-target"),this.$dndMarker.hide();d==="after"?g.addClass("dynatree-drop-after"):g.removeClass("dynatree-drop-after"),d==="before"?g.addClass("dynatree-drop-before"):g.removeClass("dynatree-drop-before"),e===!0?(f&&f.addClass("dynatree-drop-accept"),g.addClass("dynatree-drop-accept"),c.addClass("dynatree-drop-accept")):(f&&f.removeClass("dynatree-drop-accept"),g.removeClass("dynatree-drop-accept"),c.removeClass("dynatree-drop-accept")),e===!1?(f&&f.addClass("dynatree-drop-reject"),g.addClass("dynatree-drop-reject"),c.addClass("dynatree-drop-reject")):(f&&f.remo
 veClass("dynatree-drop-reject"),g.removeClass("dynatree-drop-reject"),c.removeClass("dynatree-drop-reject"))},_onDragEvent:function(a,b,c,d,e,f){var g=this.options,h=this.options.dnd,i=null,j=$(b.span),k,l;switch(a){case"helper":var m=$("<div class='dynatree-drag-helper'><span class='dynatree-drag-helper-img' /></div>").append($(d.target).closest("a").clone());$("ul.dynatree-container",b.tree.divTree).append(m),m.data("dtSourceNode",b),i=m;break;case"start":b.isStatusNode()?i=!1:h.onDragStart&&(i=h.onDragStart(b)),i===!1?(this.logDebug("tree.onDragStart() cancelled"),e.helper.trigger("mouseup"),e.helper.hide()):j.addClass("dynatree-drag-source");break;case"enter":i=h.onDragEnter?h.onDragEnter(b,c):null,i?i={over:i===!0||i==="over"||$.inArray("over",i)>=0,before:i===!0||i==="before"||$.inArray("before",i)>=0,after:i===!0||i==="after"||$.inArray("after",i)>=0}:i=!1,e.helper.data("enterResponse",i);break;case"over":l=e.helper.data("enterResponse"),k=null;if(l!==!1)if(typeof l=="string"
 )k=l;else{var n=j.offset(),o={x:d.pageX-n.left,y:d.pageY-n.top},p={x:o.x/j.width(),y:o.y/j.height()};l.after&&p.y>.75?k="after":!l.over&&l.after&&p.y>.5?k="after":l.before&&p.y<=.25?k="before":!l.over&&l.before&&p.y<=.5?k="before":l.over&&(k="over"),h.preventVoidMoves&&(b===c?k=null:k==="before"&&c&&b===c.getNextSibling()?k=null:k==="after"&&c&&b===c.getPrevSibling()?k=null:k==="over"&&c&&c.parent===b&&c.isLastSibling()&&(k=null)),e.helper.data("hitMode",k)}k==="over"&&h.autoExpandMS&&b.hasChildren()!==!1&&!b.bExpanded&&b.scheduleAction("expand",h.autoExpandMS);if(k&&h.onDragOver){i=h.onDragOver(b,c,k);if(i==="over"||i==="before"||i==="after")k=i}this._setDndStatus(c,b,e.helper,k,i!==!1&&k!==null);break;case"drop":var q=e.helper.hasClass("dynatree-drop-reject");k=e.helper.data("hitMode"),k&&h.onDrop&&!q&&h.onDrop(b,c,k,e,f);break;case"leave":b.scheduleAction("cancel"),e.helper.data("enterResponse",null),e.helper.data("hitMode",null),this._setDndStatus(c,b,e.helper,"out",undefined),h
 .onDragLeave&&h.onDragLeave(b,c);break;case"stop":j.removeClass("dynatree-drag-source"),h.onDragStop&&h.onDragStop(b);break;default:throw"Unsupported drag event: "+a}return i},cancelDrag:function(){var a=$.ui.ddmanager.current;a&&a.cancel()},lastentry:undefined},$.widget("ui.dynatree",{_init:function(){if(parseFloat($.ui.version)<1.8)return this.options.debugLevel>=0&&_log("warn","ui.dynatree._init() was called; you should upgrade to jquery.ui.core.js v1.8 or higher."),this._create();this.options.debugLevel>=2&&_log("debug","ui.dynatree._init() was called; no current default functionality.")},_create:function(){var a=this.options;a.debugLevel>=1&&logMsg("Dynatree._create(): version='%s', debugLevel=%o.",$.ui.dynatree.version,this.options.debugLevel),this.options.event+=".dynatree";var b=this.element.get(0);this.tree=new DynaTree(this),this.tree._load(),this.tree.logDebug("Dynatree._init(): done.")},bind:function(){function b(a){a=$.event.fix(a||window.event);var b=$.ui.dynatree.getN
 ode(a.target);return b?b._onFocus(a):!1}this.unbind();var a="click.dynatree dblclick.dynatree";this.options.keyboard&&(a+=" keypress.dynatree keydown.dynatree"),this.element.bind(a,function(a){var b=$.ui.dynatree.getNode(a.target);if(!b)return!0;var c=b.tree,d=c.options;c.logDebug("event(%s): dtnode: %s",a.type,b);var e=c.phase;c.phase="userEvent";try{switch(a.type){case"click":return d.onClick&&d.onClick.call(c,b,a)===!1?!1:b._onClick(a);case"dblclick":return d.onDblClick&&d.onDblClick.call(c,b,a)===!1?!1:b._onDblClick(a);case"keydown":return d.onKeydown&&d.onKeydown.call(c,b,a)===!1?!1:b._onKeydown(a);case"keypress":return d.onKeypress&&d.onKeypress.call(c,b,a)===!1?!1:b._onKeypress(a)}}catch(f){var g=null;c.logWarning("bind(%o): dtnode: %o, error: %o",a,b,f)}finally{c.phase=e}});var c=this.tree.divTree;c.addEventListener?(c.addEventListener("focus",b,!0),c.addEventListener("blur",b,!0)):c.onfocusin=c.onfocusout=b},unbind:function(){this.element.unbind(".dynatree")},enable:functio
 n(){this.bind(),$.Widget.prototype.enable.apply(this,arguments)},disable:function(){this.unbind(),$.Widget.prototype.disable.apply(this,arguments)},getTree:function(){return this.tree},getRoot:function(){return this.tree.getRoot()},getActiveNode:function(){return this.tree.getActiveNode()},getSelectedNodes:function(){return this.tree.getSelectedNodes()},lastentry:undefined}),parseFloat($.ui.version)<1.8&&($.ui.dynatree.getter="getTree getRoot getActiveNode getSelectedNodes"),$.ui.dynatree.version="$Version:$",$.ui.dynatree.getNode=function(a){if(a instanceof DynaTreeNode)return a;a.selector!==undefined&&(a=a[0]);while(a){if(a.dtnode)return a.dtnode;a=a.parentNode}return null},$.ui.dynatree.getPersistData=DynaTreeStatus._getTreePersistData,$.ui.dynatree.prototype.options={title:"Dynatree",minExpandLevel:1,imagePath:null,children:null,initId:null,initAjax:null,autoFocus:!0,keyboard:!0,persist:!1,autoCollapse:!1,clickFolderMode:3,activeVisible:!0,checkbox:!1,selectMode:2,fx:null,noLink
 :!1,onClick:null,onDblClick:null,onKeydown:null,onKeypress:null,onFocus:null,onBlur:null,onQueryActivate:null,onQuerySelect:null,onQueryExpand:null,onPostInit:null,onActivate:null,onDeactivate:null,onSelect:null,onExpand:null,onLazyRead:null,onCustomRender:null,onCreate:null,onRender:null,postProcess:null,dnd:{onDragStart:null,onDragStop:null,autoExpandMS:1e3,preventVoidMoves:!0,onDragEnter:null,onDragOver:null,onDrop:null,onDragLeave:null},ajaxDefaults:{cache:!1,timeout:0,dataType:"json"},strings:{loading:"Loading&#8230;",loadError:"Load error!"},generateIds:!1,idPrefix:"dynatree-id-",keyPathSeparator:"/",cookieId:"dynatree",cookie:{expires:null},classNames:{container:"dynatree-container",node:"dynatree-node",folder:"dynatree-folder",empty:"dynatree-empty",vline:"dynatree-vline",expander:"dynatree-expander",connector:"dynatree-connector",checkbox:"dynatree-checkbox",nodeIcon:"dynatree-icon",title:"dynatree-title",noConnector:"dynatree-no-connector",nodeError:"dynatree-statusnode-er
 ror",nodeWait:"dynatree-statusnode-wait",hidden:"dynatree-hidden",combinedExpanderPrefix:"dynatree-exp-",combinedIconPrefix:"dynatree-ico-",nodeLoading:"dynatree-loading",hasChildren:"dynatree-has-children",active:"dynatree-active",selected:"dynatree-selected",expanded:"dynatree-expanded",lazy:"dynatree-lazy",focused:"dynatree-focused",partsel:"dynatree-partsel",lastsib:"dynatree-lastsib"},debugLevel:2,lastentry:undefined},parseFloat($.ui.version)<1.8&&($.ui.dynatree.defaults=$.ui.dynatree.prototype.options),$.ui.dynatree.nodedatadefaults={title:null,key:null,isFolder:!1,isLazy:!1,tooltip:null,href:null,icon:null,addClass:null,noLink:!1,activate:!1,focus:!1,expand:!1,select:!1,hideCheckbox:!1,unselectable:!1,children:null,lastentry:undefined};var didRegisterDnd=!1,_registerDnd=function(){if(didRegisterDnd)return;$.ui.plugin.add("draggable","connectToDynatree",{start:function(a,b){var c=$(this).data("draggable"),d=b.helper.data("dtSourceNode")||null;if(d)return c.offset.click.top=-2,
 c.offset.click.left=16,d.tree._onDragEvent("start",d,null,a,b,c)},drag:function(a,b){var c=$(this).data("draggable"),d=b.helper.data("dtSourceNode")||null,e=b.helper.data("dtTargetNode")||null,f=$.ui.dynatree.getNode(a.target);if(a.target&&!f){var g=$(a.target).closest("div.dynatree-drag-helper,#dynatree-drop-marker").length>0;if(g)return}b.helper.data("dtTargetNode",f),e&&e!==f&&e.tree._onDragEvent("leave",e,d,a,b,c),f&&(!f.tree.options.dnd.onDrop||(f===e?f.tree._onDragEvent("over",f,d,a,b,c):f.tree._onDragEvent("enter",f,d,a,b,c)))},stop:function(a,b){var c=$(this).data("draggable"),d=b.helper.data("dtSourceNode")||null,e=b.helper.data("dtTargetNode")||null,f=c._mouseDownEvent,g=a.type,h=g=="mouseup"&&a.which==1;h||logMsg("Drag was cancelled"),e&&(h&&e.tree._onDragEvent("drop",e,d,a,b,c),e.tree._onDragEvent("leave",e,d,a,b,c)),d&&d.tree._onDragEvent("stop",d,null,a,b,c)}}),didRegisterDnd=!0}})(jQuery);
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org