summaryrefslogtreecommitdiffstats
path: root/extensions
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2014-09-23 03:23:54 +0200
committerDylan William Hardison <dylan@hardison.net>2014-10-02 02:46:13 +0200
commitc034487bf62423265d0832197e0ff490f82330eb (patch)
treed5392377ca4b38c77b45dd62a3fed4c6edcec309 /extensions
parent98284f0a6fcfaee9aee2c26e0ae0d07692a6ee84 (diff)
downloadbugzilla-c034487bf62423265d0832197e0ff490f82330eb.tar.gz
bugzilla-c034487bf62423265d0832197e0ff490f82330eb.tar.xz
Bug 1023405 - Shortcut for marking bugs as read
Diffstat (limited to 'extensions')
-rw-r--r--extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl10
-rw-r--r--extensions/MyDashboard/web/js/query.js15
-rw-r--r--extensions/MyDashboard/web/styles/mydashboard.css3
3 files changed, 24 insertions, 4 deletions
diff --git a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
index 023de290c..16f363f49 100644
--- a/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
+++ b/extensions/MyDashboard/template/en/default/pages/mydashboard.html.tmpl
@@ -12,10 +12,12 @@
title = "My Dashboard"
style_urls = [ "extensions/MyDashboard/web/styles/mydashboard.css",
"extensions/ProdCompSearch/web/styles/prod_comp_search.css" ]
+ yui = ["json", "connection"],
javascript_urls = [ "js/yui3/yui/yui-min.js",
"extensions/MyDashboard/web/js/query.js",
"extensions/MyDashboard/web/js/flags.js",
- "extensions/ProdCompSearch/web/js/prod_comp_search.js" ]
+ "extensions/ProdCompSearch/web/js/prod_comp_search.js",
+ "js/bug.js" ]
%]
[% standard_queries = [] %]
@@ -104,8 +106,10 @@
<div class="query_description"></div>
<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>
+ | <a class="refresh" href="javascript:void(0);" id="query_refresh">Refresh</a>
+ | <a class="markvisited" href="javascript:void(0);" id="query_markvisited">Mark Visited</a>
+ <span class="markvisited bz_default_hidden" id="query_markvisited_text">Mark Visited</span>
+ | <a class="buglist" href="javascript:void(0);" id="query_buglist">Buglist</a>
</span>
<div id="query_pagination_top"></div>
<div id="query_table"></div>
diff --git a/extensions/MyDashboard/web/js/query.js b/extensions/MyDashboard/web/js/query.js
index 82e2a531b..4a6b64157 100644
--- a/extensions/MyDashboard/web/js/query.js
+++ b/extensions/MyDashboard/web/js/query.js
@@ -99,6 +99,8 @@ YUI({
counter = counter + 1;
lastChangesCache = {};
+ Y.one('#query_markvisited').removeClass('bz_default_hidden');
+ Y.one('#query_markvisited_text').addClass('bz_default_hidden');
Y.one('#query_count_refresh').addClass('bz_default_hidden');
bugQueryTable.set('data', []);
bugQueryTable.render("#query_table");
@@ -238,6 +240,19 @@ YUI({
updateQueryTable(selected_value);
});
+ Y.one('#query_markvisited').on('click', function(e) {
+ var data = bugQueryTable.data;
+ var bug_ids = [];
+
+ Y.one('#query_markvisited').addClass('bz_default_hidden');
+ Y.one('#query_markvisited_text').removeClass('bz_default_hidden');
+
+ for (var i = 0, l = data.size(); i < l; i++) {
+ bug_ids.push(data.item(i).get('bug_id'));
+ }
+ YAHOO.bugzilla.bugUserLastVisit.update(bug_ids);
+ });
+
Y.one('#query_buglist').on('click', function(e) {
var data = bugQueryTable.data;
var ids = [];
diff --git a/extensions/MyDashboard/web/styles/mydashboard.css b/extensions/MyDashboard/web/styles/mydashboard.css
index 822c71076..2ce19d96b 100644
--- a/extensions/MyDashboard/web/styles/mydashboard.css
+++ b/extensions/MyDashboard/web/styles/mydashboard.css
@@ -47,7 +47,8 @@
width: 40%;
}
-.items_found, .refresh, .buglist {
+.items_found, .refresh, .buglist, .markvisited {
+
font-size: 80%;
}