diff --git a/buglist.cgi b/buglist.cgi index e8e5fdcbf..39d0f2b53 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -869,6 +869,8 @@ my $search = new Bugzilla::Search('fields' => \@selectcolumns, 'order' => \@orderstrings); my $query = $search->getSQL(); $vars->{search_description} = $search->search_description_html; +my $H = { %{ $params->Vars } }; +$vars->{list_params} = $H; if (defined $cgi->param('limit')) { my $limit = $cgi->param('limit'); diff --git a/js/global.js b/js/global.js index 6d7a7b4e3..5f72b45ea 100644 --- a/js/global.js +++ b/js/global.js @@ -179,7 +179,7 @@ function userAutocomplete(hint, emptyOptions) // Convert keyword list from API format for SimpleAutocomplete -function convertKeywordList(k) +function convertSimpleList(k) { var data = []; for (var i = 0; i < k.length; i++) @@ -198,7 +198,7 @@ function keywordAutocomplete(hint, emptyOptions) { hint.emptyText = 'Type at least 3 letters'; if (emptyOptions) - hint.replaceItems(convertKeywordList(emptyOptions)); + hint.replaceItems(convertSimpleList(emptyOptions)); else hint.replaceItems(null); return; @@ -220,7 +220,7 @@ function keywordAutocomplete(hint, emptyOptions) try { eval('r = '+x.responseText+';'); } catch (e) { return; } if (r.status == 'ok') { - var data = convertKeywordList(r.keywords); + var data = convertSimpleList(r.keywords); // FIXME "3" constant, messages: remove hardcode, also in Bugzilla::User::match() if (data.length == 0 && hint.input.value.length < 3) hint.emptyText = 'Type at least 3 letters'; @@ -238,4 +238,37 @@ function keywordAutocomplete(hint, emptyOptions) u += '&match='+encodeURI(l[i]); x.open('GET', u); x.send(null); -} \ No newline at end of file +} + +// Data loader for field in buglist autocomplete +function fieldBuglistAutocomplete(hint, field, emptyOptions) +{ + var x; + if (window.XMLHttpRequest) + x = new XMLHttpRequest(); + else + { + try { x = new ActiveXObject("Msxml2.XMLHTTP"); } + catch (e) { x = new ActiveXObject("Microsoft.XMLHTTP"); } + } + x.onreadystatechange = function() + { + if (x.readyState == 4) + { + var r = {}; + try { eval('r = '+x.responseText+';'); } catch (e) { return; } + if (r.status == 'ok') + { + var data = convertSimpleList(r.values); + hint.replaceItems(data); + } + } + }; + var u = window.location.href.replace(/[^\/]+$/, ''); + u += 'xml.cgi?method=Field.get_values&output=json&field=' + field; + x.open('GET', u); + x.send(null); +} + + + diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl index f5cbcc85f..182dcc8bf 100644 --- a/template/en/default/list/table.html.tmpl +++ b/template/en/default/list/table.html.tmpl @@ -50,7 +50,16 @@ [%############################################################################%] [% tableheader = BLOCK %] +
+ + [% i = lsearch(order_columns, 'bug_id') %] + + [% FOREACH id = displaycolumns %] + [% column = columns.$id %] + [% PROCESS columnheaderfilter key=loop.count() %] + [% END %] + [% IF dotweak %] @@ -124,6 +133,34 @@ [% END %] + +[% BLOCK columnheaderfilter %] + [% i = lsearch(order_columns, id) %] + [% idd = id %] + [% type = Bugzilla.get_field(id).type %] + [% IF id == "bug_severity" || id == "priority" || id == "bug_status" || id == "resolution" %] + + [% ELSE %] + + [% END %] +[% END %] + + [% BLOCK new_order %] [% desc = '' %] [% IF (om = order.match("\\b$id( DESC)?")) %] @@ -230,6 +267,31 @@ [% END %]
+ + + + Filter +  
+
+ + [% BLOCK time_summary_line %]