[open-ils-commits] r14394 - trunk/Open-ILS/xul/staff_client/chrome/content/util (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Oct 13 01:23:52 EDT 2009
Author: phasefx
Date: 2009-10-13 01:23:48 -0400 (Tue, 13 Oct 2009)
New Revision: 14394
Modified:
trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js
Log:
Support some extra callback functions for staff client lists (on_sort and on_checkbox_toggle)
Modified: trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js 2009-10-13 05:23:47 UTC (rev 14393)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/util/list.js 2009-10-13 05:23:48 UTC (rev 14394)
@@ -111,6 +111,12 @@
this.node.appendChild(treechildren);
this.treechildren = treechildren;
}
+ if (typeof params.on_sort == 'function') {
+ this.on_sort = params.on_sort;
+ }
+ if (typeof params.on_checkbox_toggle == 'function') {
+ this.on_checkbox_toggle = params.on_checkbox_toggle;
+ }
this.node.addEventListener(
'select',
function(ev) {
@@ -1318,6 +1324,7 @@
for (var i = 0; i < rows.length; i++) {
obj.treechildren.appendChild( rows[i].node );
}
+ if (typeof obj.on_sort == 'function') obj.on_sort();
} catch(E) {
obj.error.standard_unexpected_error_alert('sorting',E);
}
@@ -1345,6 +1352,7 @@
var treecell = treerow.childNodes[ col_pos ];
treecell.setAttribute('value',(toggle == 'on'));
}
+ if (typeof obj.on_checkbox_toggle == 'function') obj.on_checkbox_toggle(toggle);
} catch(E) {
obj.error.standard_unexpected_error_alert('pre toggle', E);
}
More information about the open-ils-commits
mailing list