[open-ils-commits] r12642 - trunk/Open-ILS/web/js/dojo/openils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Mar 22 22:24:17 EDT 2009
Author: erickson
Date: 2009-03-22 22:24:15 -0400 (Sun, 22 Mar 2009)
New Revision: 12642
Modified:
trunk/Open-ILS/web/js/dojo/openils/Util.js
Log:
added display toggle method which will show/hide as necessary
Modified: trunk/Open-ILS/web/js/dojo/openils/Util.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/Util.js 2009-03-22 23:37:59 UTC (rev 12641)
+++ trunk/Open-ILS/web/js/dojo/openils/Util.js 2009-03-23 02:24:15 UTC (rev 12642)
@@ -232,5 +232,16 @@
dojo.style(node, 'visibility', 'visible');
};
+ /** Toggles the display using show/hide, depending on the current value for CSS 'display' */
+ openils.Util.toggle = function(node) {
+ if(typeof node == 'string')
+ node = dojo.byId(node);
+ if(dojo.style(node, 'display') == 'none')
+ openils.Util.show(node);
+ else
+ openils.Util.hide(node);
+ };
+
+
}
More information about the open-ils-commits
mailing list