[open-ils-commits] r13322 - trunk/Open-ILS/web/js/dojo/openils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jun 4 18:27:12 EDT 2009
Author: erickson
Date: 2009-06-04 18:27:08 -0400 (Thu, 04 Jun 2009)
New Revision: 13322
Modified:
trunk/Open-ILS/web/js/dojo/openils/Util.js
Log:
added ability to set display type (e.g. display is not 'block') when showing a node
Modified: trunk/Open-ILS/web/js/dojo/openils/Util.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/Util.js 2009-06-04 22:26:01 UTC (rev 13321)
+++ trunk/Open-ILS/web/js/dojo/openils/Util.js 2009-06-04 22:27:08 UTC (rev 13322)
@@ -225,19 +225,20 @@
dojo.style(node, 'visibility', 'hidden');
};
- openils.Util.show = function(node) {
+ openils.Util.show = function(node, displayType) {
if(typeof node == 'string')
node = dojo.byId(node);
- dojo.style(node, 'display', 'block');
+ displayType = displayType || 'block';
+ dojo.style(node, 'display', displayType);
dojo.style(node, 'visibility', 'visible');
};
/** Toggles the display using show/hide, depending on the current value for CSS 'display' */
- openils.Util.toggle = function(node) {
+ openils.Util.toggle = function(node, displayType) {
if(typeof node == 'string')
node = dojo.byId(node);
if(dojo.style(node, 'display') == 'none')
- openils.Util.show(node);
+ openils.Util.show(node, displayType);
else
openils.Util.hide(node);
};
More information about the open-ils-commits
mailing list