summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl3
-rw-r--r--extensions/MyDashboard/web/js/flags.js31
-rw-r--r--extensions/MyDashboard/web/js/query.js18
-rw-r--r--extensions/MyDashboard/web/styles/mydashboard.css4
4 files changed, 43 insertions, 13 deletions
diff --git a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
index 8222f6749..83afd85d5 100644
--- a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
+++ b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
@@ -102,6 +102,7 @@
<span id="query_count_refresh" class="bz_default_hidden">
<span class="items_found" id="query_bugs_found">0 [% terms.bugs %] found</span>
| <a class="refresh" href="javascript:void(0);" id="query_refresh">Refresh</a>
+ | <a class="buglist" href="javascript:void(0);" id="query_buglist">Buglist</a>
</span>
<div id="query_pagination_top"></div>
<div id="query_table"></div>
@@ -124,6 +125,7 @@
<span id="requestee_count_refresh" class="bz_default_hidden">
<span class="items_found" id="requestee_flags_found">0 flags found</span>
| <a class="refresh" href="javascript:void(0);" id="requestee_refresh">Refresh</a>
+ | <a class="buglist" href="javascript:void(0);" id="requestee_buglist">Buglist</a>
| <input type="checkbox" id="requestee_closed">
<label for="requestee_closed">Include Closed</label>
</span>
@@ -137,6 +139,7 @@
<span id="requester_count_refresh" class="bz_default_hidden">
<span class="items_found" id="requester_flags_found">0 flags found</span>
| <a class="refresh" href="javascript:void(0);" id="requester_refresh">Refresh</a>
+ | <a class="buglist" href="javascript:void(0);" id="requester_buglist">Buglist</a>
| <input type="checkbox" id="requester_closed">
<label for="requester_closed">Include Closed</label>
</span>
diff --git a/extensions/MyDashboard/web/js/flags.js b/extensions/MyDashboard/web/js/flags.js
index 2498ba8ae..1ba6bd696 100644
--- a/extensions/MyDashboard/web/js/flags.js
+++ b/extensions/MyDashboard/web/js/flags.js
@@ -3,7 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This Source Code Form is "Incompatible With Secondary Licenses", as
- * defined by the Mozilla Public License, v. 2.0.
+ * defined by the Mozilla Public License, v. 2.0.
*/
// Flag tables
@@ -11,7 +11,7 @@ YUI({
base: 'js/yui3/',
combine: false
}).use("node", "datatable", "datatable-sort", "json-stringify", "escape",
- "datatable-datasource", "datasource-io", "datasource-jsonschema", function (Y) {
+ "datatable-datasource", "datasource-io", "datasource-jsonschema", function(Y) {
// Common
var counter = 0;
var dataSource = {
@@ -23,7 +23,7 @@ YUI({
requester: null
};
- var updateFlagTable = function (type) {
+ var updateFlagTable = function(type) {
if (!type) return;
var include_closed = Y.one('#' + type + '_closed').get('checked') ? 1 : 0;
@@ -70,7 +70,18 @@ YUI({
});
};
- var bugLinkFormatter = function (o) {
+ var loadBugList = function(type) {
+ if (!type) return;
+ var data = dataTable[type].data;
+ var ids = [];
+ for (var i = 0, l = data.size(); i < l; i++) {
+ ids.push(data.item(i).get('bug_id'));
+ }
+ var url = 'buglist.cgi?bug_id=' + ids.join('%2C');
+ window.open(url, '_blank');
+ };
+
+ var bugLinkFormatter = function(o) {
var bug_closed = "";
if (o.data.bug_status == 'RESOLVED' || o.data.bug_status == 'VERIFIED') {
bug_closed = "bz_closed";
@@ -81,18 +92,18 @@ YUI({
'">' + o.value + '</a>';
};
- var updatedFormatter = function (o) {
+ var updatedFormatter = function(o) {
return '<span title="' + Y.Escape.html(o.value) + '">' +
Y.Escape.html(o.data.updated_fancy) + '</span>';
};
- var requesteeFormatter = function (o) {
+ var requesteeFormatter = function(o) {
return o.value
? Y.Escape.html(o.value)
: '<i>anyone</i>';
};
- var flagNameFormatter = function (o) {
+ var flagNameFormatter = function(o) {
if (parseInt(o.data.attach_id)
&& parseInt(o.data.is_patch)
&& MyDashboard.splinter_base)
@@ -146,6 +157,9 @@ YUI({
Y.one('#requestee_refresh').on('click', function(e) {
updateFlagTable('requestee');
});
+ Y.one('#requestee_buglist').on('click', function(e) {
+ loadBugList('requestee');
+ });
Y.one('#requestee_closed').on('change', function(e) {
updateFlagTable('requestee');
});
@@ -186,6 +200,9 @@ YUI({
Y.one('#requester_refresh').on('click', function(e) {
updateFlagTable('requester');
});
+ Y.one('#requester_buglist').on('click', function(e) {
+ loadBugList('requester');
+ });
Y.one('#requester_closed').on('change', function(e) {
updateFlagTable('requester');
});
diff --git a/extensions/MyDashboard/web/js/query.js b/extensions/MyDashboard/web/js/query.js
index 98cb2b407..aaacf753b 100644
--- a/extensions/MyDashboard/web/js/query.js
+++ b/extensions/MyDashboard/web/js/query.js
@@ -3,7 +3,7 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This Source Code Form is "Incompatible With Secondary Licenses", as
- * defined by the Mozilla Public License, v. 2.0.
+ * defined by the Mozilla Public License, v. 2.0.
*/
if (typeof(MyDashboard) == 'undefined') {
@@ -23,10 +23,10 @@ YUI({
}
}).use("node", "datatable", "datatable-sort", "datatable-message", "json-stringify",
"datatable-datasource", "datasource-io", "datasource-jsonschema", "cookie",
- "gallery-datatable-row-expansion-bmo", "handlebars", "escape", function (Y) {
+ "gallery-datatable-row-expansion-bmo", "handlebars", "escape", function(Y) {
var counter = 0,
dataSource = null,
- dataTable = null,
+ dataTable = null,
default_query = "assignedbugs";
// Grab last used query name from cookie or use default
@@ -93,7 +93,7 @@ YUI({
});
};
- var updatedFormatter = function (o) {
+ var updatedFormatter = function(o) {
return '<span title="' + Y.Escape.html(o.value) + '">' +
Y.Escape.html(o.data.changeddate_fancy) + '</span>';
};
@@ -164,4 +164,14 @@ YUI({
var selected_value = query_select.get("options").item(index).getAttribute('value');
updateQueryTable(selected_value);
});
+
+ Y.one('#query_buglist').on('click', function(e) {
+ var data = dataTable.data;
+ var ids = [];
+ for (var i = 0, l = data.size(); i < l; i++) {
+ ids.push(data.item(i).get('bug_id'));
+ }
+ var url = 'buglist.cgi?bug_id=' + ids.join('%2C');
+ window.open(url, '_blank');
+ });
});
diff --git a/extensions/MyDashboard/web/styles/mydashboard.css b/extensions/MyDashboard/web/styles/mydashboard.css
index 050fd95c2..822c71076 100644
--- a/extensions/MyDashboard/web/styles/mydashboard.css
+++ b/extensions/MyDashboard/web/styles/mydashboard.css
@@ -47,7 +47,7 @@
width: 40%;
}
-.items_found, .refresh {
+.items_found, .refresh, .buglist {
font-size: 80%;
}
@@ -55,7 +55,7 @@
text-align:center;
}
-#query_list_container,
+#query_list_container,
#prod_comp_search_main {
padding: 20px !important;
height: 40px;