summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-08-21 19:47:59 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-08-21 19:47:59 +0200
commit83cdb54793a58b9bc1e66d38437f777a36bddfb9 (patch)
tree6a51dd7f44f9a86daae6bf1efd9407d3f4ddc339
parent105963ad11a5f244a34d26a00c178600008d4b27 (diff)
downloadbugzilla-83cdb54793a58b9bc1e66d38437f777a36bddfb9.tar.gz
bugzilla-83cdb54793a58b9bc1e66d38437f777a36bddfb9.tar.xz
Bug 907567 - "My Dashboard" is mostly empty when starting up in app tab
-rw-r--r--extensions/MyDashboard/web/js/flags.js14
-rw-r--r--extensions/MyDashboard/web/js/query.js8
2 files changed, 16 insertions, 6 deletions
diff --git a/extensions/MyDashboard/web/js/flags.js b/extensions/MyDashboard/web/js/flags.js
index 1ba6bd696..3ac51acac 100644
--- a/extensions/MyDashboard/web/js/flags.js
+++ b/extensions/MyDashboard/web/js/flags.js
@@ -140,8 +140,7 @@ YUI({
dataTable.requestee.plug(Y.Plugin.DataTableSort);
dataTable.requestee.plug(Y.Plugin.DataTableDataSource, {
- datasource: dataSource,
- initialRequest: updateFlagTable("requestee"),
+ datasource: dataSource.requestee
});
dataSource.requestee.plug(Y.Plugin.DataSourceJSONSchema, {
@@ -185,8 +184,7 @@ YUI({
dataTable.requester.plug(Y.Plugin.DataTableSort);
dataTable.requester.plug(Y.Plugin.DataTableDataSource, {
- datasource: dataSource,
- initialRequest: updateFlagTable("requester"),
+ datasource: dataSource.requester
});
dataSource.requester.plug(Y.Plugin.DataSourceJSONSchema, {
@@ -197,6 +195,14 @@ YUI({
}
});
+ // Initial load
+ Y.on("contentready", function (e) {
+ updateFlagTable("requestee");
+ }, "#requestee_table");
+ Y.on("contentready", function (e) {
+ updateFlagTable("requester");
+ }, "#requester_table");
+
Y.one('#requester_refresh').on('click', function(e) {
updateFlagTable('requester');
});
diff --git a/extensions/MyDashboard/web/js/query.js b/extensions/MyDashboard/web/js/query.js
index aaacf753b..cf716fbe3 100644
--- a/extensions/MyDashboard/web/js/query.js
+++ b/extensions/MyDashboard/web/js/query.js
@@ -147,10 +147,14 @@ YUI({
dataTable.plug(Y.Plugin.DataTableSort);
dataTable.plug(Y.Plugin.DataTableDataSource, {
- datasource: dataSource,
- initialRequest: updateQueryTable(default_query),
+ datasource: dataSource
});
+ // Initial load
+ Y.on("contentready", function (e) {
+ updateQueryTable(default_query);
+ }, "#query_table");
+
Y.one('#query').on('change', function(e) {
var index = e.target.get('selectedIndex');
var selected_value = e.target.get("options").item(index).getAttribute('value');