From 02cd18d7165d86c7ea6d6fc6a9273094d9513a58 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 26 Feb 2013 22:22:39 -0500 Subject: Show bug status and summary when mouseover bug ids in the flag lists --- extensions/MyDashboard/lib/Queries.pm | 1 + extensions/MyDashboard/web/js/flags.js | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) (limited to 'extensions/MyDashboard') 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 '' + o.value + ''; + }; + // 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: '{value}', 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: '{value}', 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"] } }); -- cgit v1.2.3-24-g4f1b