From b58c6c1ae1abeecc3651bf5577fb6d32cfb206d6 Mon Sep 17 00:00:00 2001 From: "Kenneth G. Franqueiro" Date: Fri, 19 Oct 2012 10:23:32 -0400 Subject: [PATCH] Fix #312: allow HTML in loadingMessage, consistent with noDataMessage --- OnDemandList.js | 12 ++++++++---- extensions/Pagination.js | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/OnDemandList.js b/OnDemandList.js index 0aac67f0e..af3067d38 100644 --- a/OnDemandList.js +++ b/OnDemandList.js @@ -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, @@ -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; diff --git a/extensions/Pagination.js b/extensions/Pagination.js index 336483e08..a4c7f3d18 100644 --- a/extensions/Pagination.js +++ b/extensions/Pagination.js @@ -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;