Commit 26ecd6bd authored by Nigel McNie's avatar Nigel McNie
Browse files

Only remove the loading message if we know it's not going to be removed by an...

Only remove the loading message if we know it's not going to be removed by an updateOnLoad callback later. This might have to be rolled back later if it causes problems with loading messages hanging around, but I haven't seen any yet.
parent 213374f6
......@@ -16,6 +16,7 @@ function TableRenderer(target, source, columns, options) {
this.emptycontent = undefined; // Something to display when no results are found
this.rowfunction = function(rowdata, rownumber, data) { return TR({'class': 'r' + (rownumber % 2)}); }
this.updatecallback = function () {};
this.updateOnLoadFlag = false;
this.init = function() {
self.table = getElement(target);
......@@ -54,9 +55,11 @@ function TableRenderer(target, source, columns, options) {
self.emptycontent = DIV(null,self.emptycontent);
insertSiblingNodesBefore(self.table, self.emptycontent);
}
if (self.loadingMessage) {
removeElement(self.loadingMessage);
self.loadingMessage = null;
if (!self.updateOnLoadFlag) {
if (self.loadingMessage) {
removeElement(self.loadingMessage);
self.loadingMessage = null;
}
}
}
};
......@@ -248,6 +251,7 @@ function TableRenderer(target, source, columns, options) {
};
this.updateOnLoad = function() {
self.updateOnLoadFlag = true;
if ( TableRendererPageLoaded ) {
self.doupdate();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment