[open-ils-commits] r17597 - trunk/Open-ILS/web/js/dojo/openils/widget (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 10 18:02:24 EDT 2010
Author: senator
Date: 2010-09-10 18:02:18 -0400 (Fri, 10 Sep 2010)
New Revision: 17597
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
Make it a little more straightfoward to refresh an autogrid from without. Can
be useful in making glitchy, half-rendered grids behave.
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2010-09-10 20:21:52 UTC (rev 17596)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js 2010-09-10 22:02:18 UTC (rev 17597)
@@ -87,14 +87,10 @@
style : 'padding-right:6px;',
href : 'javascript:void(0);',
onclick : function() {
- self.resetStore();
self.cachedQueryOpts.offset = self.displayOffset -= self.displayLimit;
if(self.displayOffset < 0)
self.cachedQueryOpts.offset = self.displayOffset = 0;
- if(self.dataLoader)
- self.dataLoader()
- else
- self.loadAll(self.cachedQueryOpts, self.cachedQuerySearch);
+ self.refresh();
}
});
@@ -103,12 +99,8 @@
style : 'padding-right:6px;',
href : 'javascript:void(0);',
onclick : function() {
- self.resetStore();
self.cachedQueryOpts.offset = self.displayOffset += self.displayLimit;
- if(self.dataLoader)
- self.dataLoader()
- else
- self.loadAll(self.cachedQueryOpts, self.cachedQuerySearch);
+ self.refresh();
}
});
@@ -557,6 +549,14 @@
this.setStore(this.buildAutoStore());
},
+ refresh : function() {
+ this.resetStore();
+ if (this.dataLoader)
+ this.dataLoader()
+ else
+ this.loadAll(this.cachedQueryOpts, this.cachedQuerySearch);
+ },
+
loadAll : function(opts, search) {
dojo.require('openils.PermaCrud');
if(this.loadProgressIndicator)
More information about the open-ils-commits
mailing list