Author: croberts
Date: 2012-11-16 20:29:45 +0000 (Fri, 16 Nov 2012)
New Revision: 5549
Modified:
branches/croberts/cumin/resources/app.css
branches/croberts/wooly/resources/mootree.js
Log:
Additional style adjustments for accounting group usage tree. Also, fixing problem with
tree where elements with no children were subject to being "closed" symantically
(not visually) in the tree via a phantom open/close link.
Modified: branches/croberts/cumin/resources/app.css
===================================================================
--- branches/croberts/cumin/resources/app.css 2012-11-16 19:27:38 UTC (rev 5548)
+++ branches/croberts/cumin/resources/app.css 2012-11-16 20:29:45 UTC (rev 5549)
@@ -827,15 +827,14 @@
.mooTree_node {
- font-family: Verdana, Arial, Helvetica;
- font-size: 10px;
+ font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size: 12px;
white-space: nowrap;
}
.mooTree_text {
padding-top: 3px;
- height: 15px;
- cursor: pointer;
+ height: 15px;
}
.mooTree_img {
@@ -846,7 +845,5 @@
}
.mooTree_selected {
- background-color: #e0f0ff;
- font-weight: bold;
-}
+}
Modified: branches/croberts/wooly/resources/mootree.js
===================================================================
--- branches/croberts/wooly/resources/mootree.js 2012-11-16 19:27:38 UTC (rev 5548)
+++ branches/croberts/wooly/resources/mootree.js 2012-11-16 20:29:45 UTC (rev 5549)
@@ -40,6 +40,9 @@
rev.18:
- migrated to MooTools 1.2 (previous versions no longer supported)
+ rev.18.unofficial.1 (croberts)
+ - Added option for no folder display and short-circuited toggle action when a node has
no children
+
*/
var MooTreeIcon =
['I','L','Lminus','Lplus','Rminus','Rplus','T','Tminus','Tplus','_closed','_doc','_open','minus','plus'];
@@ -577,7 +580,11 @@
*/
toggle: function(recursive, state) {
-
+ if (this.nodes.length == 0) {
+ // if there are no child nodes for the given node
+ // we just bail out since it doesn't make sense to toggle it
+ return;
+ }
this.open = (state === undefined ? !this.open : state);
this.update();
Show replies by date