Skip to content

Commit

Permalink
Fix #312: allow HTML in loadingMessage, consistent with noDataMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth G. Franqueiro committed Oct 19, 2012
1 parent 2ff41a5 commit b58c6c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions OnDemandList.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ return declare([List, _StoreMixin], {
}else{
this.preload = preload;
}
var loadingNode = put(preloadNode, "-div.dgrid-loading");
put(loadingNode, "div.dgrid-below", this.loadingMessage);

var loadingNode = put(preloadNode, "-div.dgrid-loading"),
innerNode = put(loadingNode, "div.dgrid-below");
innerNode.innerHTML = this.loadingMessage;

// Establish query options, mixing in our own.
// (The getter returns a delegated object, so simply using mixin is safe.)
options = lang.mixin(this.get("queryOptions"), options,
Expand Down Expand Up @@ -353,8 +356,9 @@ return declare([List, _StoreMixin], {

adjustHeight(preload);
// create a loading node as a placeholder while the data is loaded
var loadingNode = put(beforeNode, "-div.dgrid-loading[style=height:" + count * grid.rowHeight + "px]");
put(loadingNode, "div.dgrid-" + (below ? "below" : "above"), grid.loadingMessage);
var loadingNode = put(beforeNode, "-div.dgrid-loading[style=height:" + count * grid.rowHeight + "px]"),
innerNode = put(loadingNode, "div.dgrid-" + (below ? "below" : "above"));
innerNode.innerHTML = grid.loadingMessage;
loadingNode.count = count;
// use the query associated with the preload node to get the next "page"
options.query = preload.query;
Expand Down
3 changes: 2 additions & 1 deletion extensions/Pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ function(_StoreMixin, declare, lang, Deferred, on, query, string, has, put, i18n
grid._rowIdToObject = {};
contentNode.innerHTML = "";

loadingNode = put(contentNode, "div.dgrid-loading", grid.loadingMessage);
loadingNode = put(contentNode, "div.dgrid-loading");
loadingNode.innerHTML = grid.loadingMessage;

// set flag to deactivate pagination event handlers until loaded
grid._isLoading = true;
Expand Down

0 comments on commit b58c6c1

Please sign in to comment.