[open-ils-commits] r12565 - trunk/Open-ILS/web/js/dojo/openils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Mar 17 14:49:27 EDT 2009
Author: erickson
Date: 2009-03-17 14:49:24 -0400 (Tue, 17 Mar 2009)
New Revision: 12565
Modified:
trunk/Open-ILS/web/js/dojo/openils/Util.js
Log:
added simple show/hide funcs
Modified: trunk/Open-ILS/web/js/dojo/openils/Util.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/Util.js 2009-03-17 16:54:17 UTC (rev 12564)
+++ trunk/Open-ILS/web/js/dojo/openils/Util.js 2009-03-17 18:49:24 UTC (rev 12565)
@@ -217,5 +217,20 @@
d = dojo.date.add(d, parts[i+1].replace(/s?,?$/,''), Number(parts[i]));
return Number((d.getTime() - start) / 1000);
};
+
+ openils.Util.hide = function(node) {
+ if(typeof node == 'string')
+ node = dojo.byId(node);
+ dojo.style(node, 'display', 'none');
+ dojo.style(node, 'visibility', 'hidden');
+ };
+
+ openils.Util.show = function(node) {
+ if(typeof node == 'string')
+ node = dojo.byId(node);
+ dojo.style(node, 'display', 'block');
+ dojo.style(node, 'visibility', 'visible');
+ };
+
}
More information about the open-ils-commits
mailing list