summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-02-27 04:22:39 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-02-27 04:22:39 +0100
commit02cd18d7165d86c7ea6d6fc6a9273094d9513a58 (patch)
tree815a4bc5a2b645cba4019a1114c9d07f202f9940 /extensions
parent9fd6e94c03fa3bba09af2aed85d6664575385e9a (diff)
downloadbugzilla-02cd18d7165d86c7ea6d6fc6a9273094d9513a58.tar.gz
bugzilla-02cd18d7165d86c7ea6d6fc6a9273094d9513a58.tar.xz
Show bug status and summary when mouseover bug ids in the flag lists
Diffstat (limited to 'extensions')
-rw-r--r--extensions/MyDashboard/lib/Queries.pm1
-rw-r--r--extensions/MyDashboard/web/js/flags.js26
2 files changed, 16 insertions, 11 deletions
diff --git a/extensions/MyDashboard/lib/Queries.pm b/extensions/MyDashboard/lib/Queries.pm
index e81e7f73f..47778336f 100644
--- a/extensions/MyDashboard/lib/Queries.pm
+++ b/extensions/MyDashboard/lib/Queries.pm
@@ -187,6 +187,7 @@ sub query_flags {
flagtypes.name AS type,
flags.status AS status,
flags.bug_id AS bug_id,
+ bugs.bug_status AS bug_status,
bugs.short_desc AS bug_summary,
flags.attach_id AS attach_id,
attachments.description AS attach_summary,
diff --git a/extensions/MyDashboard/web/js/flags.js b/extensions/MyDashboard/web/js/flags.js
index 925cb8b6a..e212466e8 100644
--- a/extensions/MyDashboard/web/js/flags.js
+++ b/extensions/MyDashboard/web/js/flags.js
@@ -10,8 +10,8 @@
YUI({
base: 'js/yui3/',
combine: false
-}).use("node", "datatable", "datatable-sort", "json-stringify",
- "datatable-datasource", "datasource-io", "datasource-jsonschema", function (Y) {
+}).use("node", "datatable", "datatable-sort", "json-stringify", "escape",
+ "datatable-datasource", "datasource-io", "datasource-jsonschema", function (Y) {
// Common
var counter = 0;
var dataSource = {
@@ -65,15 +65,20 @@ YUI({
});
};
+ var bugLinkFormatter = function (o) {
+ return '<a href="show_bug.cgi?id=' + encodeURIComponent(o.value) +
+ ' target="_blank" ' + 'title="' + Y.Escape.html(o.data.bug_status) + ' - ' +
+ Y.Escape.html(o.data.bug_summary) + '">' + o.value + '</a>';
+ };
+
// Requestee
dataSource.requestee = new Y.DataSource.IO({ source: 'jsonrpc.cgi' });
dataTable.requestee = new Y.DataTable({
columns: [
- { key:"requester", label:"Requester", sortable:true },
- { key:"type", label:"Flag", sortable:true },
- { key:"bug_id", label:"Bug", sortable:true,
- formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>', allowHTML: true },
- { key:"created", label:"Created", sortable:true }
+ { key: "requester", label: "Requester", sortable: true },
+ { key: "type", label: "Flag", sortable: true },
+ { key: "bug_id", label: "Bug", sortable: true, formatter: bugLinkFormatter, allowHTML: true },
+ { key: "created", label: "Created", sortable: true }
],
strings: {
emptyMessage: 'No flag data found.',
@@ -90,7 +95,7 @@ YUI({
dataSource.requestee.plug(Y.Plugin.DataSourceJSONSchema, {
schema: {
resultListLocator: "result.result.requestee",
- resultFields: ["requester", "type", "bug_id", "created"]
+ resultFields: ["requester", "type", "bug_id", "bug_status", "bug_summary", "created"]
}
});
@@ -106,8 +111,7 @@ YUI({
columns: [
{ key:"requestee", label:"Requestee", sortable:true },
{ key:"type", label:"Flag", sortable:true },
- { key:"bug_id", label:"Bug", sortable:true,
- formatter: '<a href="show_bug.cgi?id={value}" target="_blank">{value}</a>', allowHTML: true },
+ { key:"bug_id", label:"Bug", sortable:true, formatter: bugLinkFormatter, allowHTML: true },
{ key:"created", label:"Created", sortable:true }
],
strings: {
@@ -125,7 +129,7 @@ YUI({
dataSource.requester.plug(Y.Plugin.DataSourceJSONSchema, {
schema: {
resultListLocator: "result.result.requester",
- resultFields: ["requestee", "type", "bug_id", "created"]
+ resultFields: ["requestee", "type", "bug_id", "bug_status", "bug_summary", "created"]
}
});