summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-08-10 22:41:10 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-08-10 22:41:10 +0200
commitfa6a04cf74404946ceb71c055c152b7859c5a65a (patch)
treef220f0c244b40c1641544232115de46eb04435f0 /extensions
parentb0ffc83036d55ec7e2870de0d8146760185e342f (diff)
downloadbugzilla-fa6a04cf74404946ceb71c055c152b7859c5a65a.tar.gz
bugzilla-fa6a04cf74404946ceb71c055c152b7859c5a65a.tar.xz
small changes to My Dashboard
Diffstat (limited to 'extensions')
-rw-r--r--extensions/MyDashboard/Extension.pm6
-rw-r--r--extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl30
-rw-r--r--extensions/MyDashboard/web/js/mydashboard.js33
3 files changed, 37 insertions, 32 deletions
diff --git a/extensions/MyDashboard/Extension.pm b/extensions/MyDashboard/Extension.pm
index a0a5e36cf..d1bbc17f1 100644
--- a/extensions/MyDashboard/Extension.pm
+++ b/extensions/MyDashboard/Extension.pm
@@ -170,7 +170,7 @@ sub _standard_saved_queries {
my $user = Bugzilla->user;
# Default sort order
- my $order = ["bug_id"];
+ my $order = ["changeddate desc", "bug_id"];
# List of columns that we will be selecting. In the future this should be configurable
# Share with buglist.cgi?
@@ -257,7 +257,7 @@ sub _flags_requested {
attachments.description AS attach_summary,
requesters.realname AS requester,
requestees.realname AS requestee,
- " . $dbh->sql_date_format('flags.creation_date', '%Y.%m.%d %H:%i') . " AS created
+ " . $dbh->sql_date_format('flags.creation_date', '%Y:%m:%d') . " AS created
FROM flags
LEFT JOIN attachments
ON ($attach_join_clause)
@@ -291,7 +291,7 @@ sub _flags_requested {
$query .= ") ";
# Order the records (within each group).
- my $group_order_by = " GROUP BY flags.bug_id ORDER BY flagtypes.name, flags.creation_date";
+ my $group_order_by = " GROUP BY flags.bug_id ORDER BY flags.creation_date, flagtypes.name";
my $requestee_list = $dbh->selectall_arrayref($query .
" AND requestees.login_name = ? " .
diff --git a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
index 1dbc749b7..50f31550e 100644
--- a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
+++ b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
@@ -111,7 +111,7 @@
[% request.bug_id FILTER html %]: [%+ request.bug_summary FILTER html %]</a>
[% END %]
</td>
- <td>[% request.created FILTER time('%Y.%m.%d') FILTER html %]</td>
+ <td>[% request.created FILTER time('%Y:%m:%d') FILTER html %]</td>
</tr>
[% END %]
</tbody>
@@ -120,18 +120,6 @@
</div>
<script>
<!--
- var requestee_column_defs = [
- { key:"requester", label:"Requester", sortable:true },
- { key:"flag", label:"Flag", sortable:true },
- { key:"bug", label:"Bug", sortable:true },
- { key:"created", label:"Created", sortable:true }
- ];
- var requestee_fields = [
- { key:"requester" },
- { key:"flag" },
- { key:"bug" },
- { key:"created" }
- ];
addStatListener("requestee_table_container", "requestee_table", requestee_column_defs, requestee_fields, {
paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false })
});
@@ -169,7 +157,7 @@
[% request.bug_id FILTER html %]: [%+ request.bug_summary FILTER html %]</a>
[% END %]
</td>
- <td>[% request.created FILTER time('%Y.%m.%d') FILTER html %]</td>
+ <td>[% request.created FILTER time('%Y:%m:%d') FILTER html %]</td>
</tr>
[% END %]
</tbody>
@@ -178,18 +166,6 @@
</div>
<script>
<!--
- var requester_column_defs = [
- { key:"requestee", label:"Requestee", sortable:true },
- { key:"flag", label:"Flag", sortable:true },
- { key:"bug", label:"Bug", sortable:true },
- { key:"created", label:"Created", sortable:true }
- ];
- var requester_fields = [
- { key:"requestee" },
- { key:"flag" },
- { key:"bug" },
- { key:"created" }
- ];
addStatListener("requester_table_container", "requester_table", requester_column_defs, requester_fields, {
paginator: new YAHOO.widget.Paginator({ rowsPerPage: 25, alwaysVisible: false })
});
@@ -227,7 +203,7 @@
[% FOREACH bug = r.bugs %]
<tr class="bz_bugitem [%+ loop.count() % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
<td align="center"><a href="show_bug.cgi?id=[% bug.bug_id FILTER uri %]">[% bug.bug_id FILTER html %]</a></td>
- <td align="center">[% bug.updated FILTER html %]</td>
+ <td align="center">[% bug.changeddate FILTER time('%Y:%m:%d') FILTER html %]</td>
<td align="center">[% bug.bug_status FILTER html %]</td>
<td>[% bug.short_desc FILTER html %]</td>
</tr>
diff --git a/extensions/MyDashboard/web/js/mydashboard.js b/extensions/MyDashboard/web/js/mydashboard.js
index 64a421113..59b198cff 100644
--- a/extensions/MyDashboard/web/js/mydashboard.js
+++ b/extensions/MyDashboard/web/js/mydashboard.js
@@ -27,10 +27,11 @@ var showQuerySection = function () {
var query_column_defs = [
{ key:"id", label:"ID", sortable:true, sortOptions:{ sortFunction:sortBugIdLinks } },
- { key:"updated", label:"Updated", sortable:false },
+ { key:"updated", label:"Updated", sortable:true },
{ key:"bug_status", label:"Status", sortable:true },
{ key:"summary", label:"Summary", sortable:true },
];
+
var query_fields = [
{ key:"id" },
{ key:"updated" },
@@ -38,6 +39,34 @@ var query_fields = [
{ key:"summary" }
];
+var requestee_column_defs = [
+ { key:"requester", label:"Requester", sortable:true },
+ { key:"flag", label:"Flag", sortable:true },
+ { key:"bug", label:"Bug", sortable:true },
+ { key:"created", label:"Created", sortable:true }
+];
+
+var requestee_fields = [
+ { key:"requester" },
+ { key:"flag" },
+ { key:"bug" },
+ { key:"created" }
+];
+
+var requester_column_defs = [
+ { key:"requestee", label:"Requestee", sortable:true },
+ { key:"flag", label:"Flag", sortable:true },
+ { key:"bug", label:"Bug", sortable:true },
+ { key:"created", label:"Created", sortable:true }
+];
+
+var requester_fields = [
+ { key:"requestee" },
+ { key:"flag" },
+ { key:"bug" },
+ { key:"created" }
+];
+
function addStatListener (div_name, table_name, column_defs, fields, options) {
YAHOO.util.Event.addListener(window, "load", function() {
YAHOO.example.StatsFromMarkup = new function() {
@@ -113,7 +142,7 @@ var sortBugPriority = function(a, b, desc) {
else if(!YAHOO.lang.isValue(b)) {
return -1;
}
-
+
var new_a = new Number(priorities[YAHOO.lang.trim(a.getData('priority'))]);
var new_b = new Number(priorities[YAHOO.lang.trim(b.getData('priority'))]);