Bug 138604, make the bugzilla sidebar use valid XUL plus some template cleanup. r=bbaetz,gerv

parent 5a4c7d80
......@@ -19,6 +19,7 @@
#
# Contributor(s): Jacob Steenhagen <jake@acutex.net>
# Scott Collins <scc@mozilla.org>
# Christopher A. Aillon <christopher@aillon.com>
#%]
<?xml version="1.0"?>
<!-- [% template_version %] -->
......@@ -30,11 +31,10 @@
orient="vertical"
onload="document.getElementById('query-field').addEventListener('keypress', initial_keypress_handler, true)">
// Load QuickSearch libraries
<script type="text/javascript" language="JavaScript" src="localconfig.js"/>
<script type="text/javascript" language="JavaScript" src="quicksearch.js"/>
<script type="text/javascript" language="JavaScript">
<!-- Load QuickSearch libraries -->
<script type="application/x-javascript" src="localconfig.js"/>
<script type="application/x-javascript" src="quicksearch.js"/>
<script type="application/x-javascript"><![CDATA[
// Tell QuickSearch that the source of this is the sidebar
var sidebar = 1;
......@@ -55,13 +55,13 @@ function normal_keypress_handler( aEvent ) {
QuickSearch(this.value);
}
</script>
]]></script>
<textbox id="query-field" class="descriptive-content" value="enter query" onfocus="this.setSelectionRange(0,this.value.length)"/>
<separator class="groove"/>
<box autostretch="never" valign="top">
<box autostretch="never" valign="top">
<box orient="vertical" flex="1">
<text class="text-link" onclick="load_relative_url('query.cgi')" value="new query"/>
<text class="text-link" onclick="load_relative_url('reports.cgi')" value="reports"/>
......@@ -70,42 +70,38 @@ function normal_keypress_handler( aEvent ) {
[% IF username %]
<text class="text-link" onclick="load_relative_url('userprefs.cgi')" value="edit prefs"/>
[% END %]
[% IF UserInGroup('tweakparams') %]
[%- IF UserInGroup('tweakparams') %]
<text class="text-link" onclick="load_relative_url('editparams.cgi')" value="edit params"/>
[% END %]
[% IF UserInGroup('editusers') || blessgroupset %]
[%- END %]
[%- IF UserInGroup('editusers') || blessgroupset %]
<text class="text-link" onclick="load_relative_url('editusers.cgi')" value="edit users"/>
[% END %]
[% IF UserInGroup('editcomponents') %]
[%- END %]
[%- IF UserInGroup('editcomponents') %]
<text class="text-link" onclick="load_relative_url('editcomponents.cgi')" value="edit components"/>
[% END %]
[% IF UserInGroup('creategroups') %]
[%- END %]
[%- IF UserInGroup('creategroups') %]
<text class="text-link" onclick="load_relative_url('editgroups.cgi')" value="edit groups"/>
[% END %]
[% IF UserInGroup('editkeywords') %]
[%- END %]
[%- IF UserInGroup('editkeywords') %]
<text class="text-link" onclick="load_relative_url('editkeywords.cgi')" value="edit keywords"/>
[% END %]
[% IF UserInGroup('tweakparams') %]
[%- END %]
[%- IF UserInGroup('tweakparams') %]
<text class="text-link" onclick="load_relative_url('sanitycheck.cgi')" value="sanity check"/>
[% END %]
[% IF username %]
[%- END %]
<text class="text-link" onclick="load_relative_url('relogin.cgi')" value="logout [% username FILTER html %]"/>
<separator class="thin"/>
[% END %]
[% IF mybugsurl %]
[%- IF mybugsurl %]
<text class="text-link" onclick="load_relative_url('[% mybugsurl FILTER html %]')" value="my bugs"/>
[% END %]
[% IF anyvotesallowed && username %]
[%- END %]
[%- IF anyvotesallowed %]
<text class="text-link" onclick="load_relative_url('votes.cgi?action=show_user')" value="my votes"/>
[% END %]
[%- END %]
[% FOREACH name = namedqueries %]
[%- FOREACH name = namedqueries %]
<text class="text-link" onclick="load_relative_url('buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% name FILTER uri %]')" value="[% name FILTER html %]"/>
[% END %]
[% END %]
[% IF NOT username %]
[% ELSE %]
<text class="text-link" onclick="load_relative_url('createaccount.cgi')" value="new user"/>
<text class="text-link" onclick="load_relative_url('query.cgi?GoAheadAndLogIn=1')" value="log in"/>
[% END %]
......
......@@ -19,6 +19,7 @@
#
# Contributor(s): Jacob Steenhagen <jake@acutex.net>
# Scott Collins <scc@mozilla.org>
# Christopher A. Aillon <christopher@aillon.com>
#%]
<?xml version="1.0"?>
<!-- [% template_version %] -->
......@@ -30,11 +31,10 @@
orient="vertical"
onload="document.getElementById('query-field').addEventListener('keypress', initial_keypress_handler, true)">
// Load QuickSearch libraries
<script type="text/javascript" language="JavaScript" src="localconfig.js"/>
<script type="text/javascript" language="JavaScript" src="quicksearch.js"/>
<script type="text/javascript" language="JavaScript">
<!-- Load QuickSearch libraries -->
<script type="application/x-javascript" src="localconfig.js"/>
<script type="application/x-javascript" src="quicksearch.js"/>
<script type="application/x-javascript"><![CDATA[
// Tell QuickSearch that the source of this is the sidebar
var sidebar = 1;
......@@ -55,13 +55,13 @@ function normal_keypress_handler( aEvent ) {
QuickSearch(this.value);
}
</script>
]]></script>
<textbox id="query-field" class="descriptive-content" value="enter query" onfocus="this.setSelectionRange(0,this.value.length)"/>
<separator class="groove"/>
<box autostretch="never" valign="top">
<box autostretch="never" valign="top">
<box orient="vertical" flex="1">
<text class="text-link" onclick="load_relative_url('query.cgi')" value="new query"/>
<text class="text-link" onclick="load_relative_url('reports.cgi')" value="reports"/>
......@@ -70,42 +70,38 @@ function normal_keypress_handler( aEvent ) {
[% IF username %]
<text class="text-link" onclick="load_relative_url('userprefs.cgi')" value="edit prefs"/>
[% END %]
[% IF UserInGroup('tweakparams') %]
[%- IF UserInGroup('tweakparams') %]
<text class="text-link" onclick="load_relative_url('editparams.cgi')" value="edit params"/>
[% END %]
[% IF UserInGroup('editusers') || blessgroupset %]
[%- END %]
[%- IF UserInGroup('editusers') || blessgroupset %]
<text class="text-link" onclick="load_relative_url('editusers.cgi')" value="edit users"/>
[% END %]
[% IF UserInGroup('editcomponents') %]
[%- END %]
[%- IF UserInGroup('editcomponents') %]
<text class="text-link" onclick="load_relative_url('editcomponents.cgi')" value="edit components"/>
[% END %]
[% IF UserInGroup('creategroups') %]
[%- END %]
[%- IF UserInGroup('creategroups') %]
<text class="text-link" onclick="load_relative_url('editgroups.cgi')" value="edit groups"/>
[% END %]
[% IF UserInGroup('editkeywords') %]
[%- END %]
[%- IF UserInGroup('editkeywords') %]
<text class="text-link" onclick="load_relative_url('editkeywords.cgi')" value="edit keywords"/>
[% END %]
[% IF UserInGroup('tweakparams') %]
[%- END %]
[%- IF UserInGroup('tweakparams') %]
<text class="text-link" onclick="load_relative_url('sanitycheck.cgi')" value="sanity check"/>
[% END %]
[% IF username %]
[%- END %]
<text class="text-link" onclick="load_relative_url('relogin.cgi')" value="logout [% username FILTER html %]"/>
<separator class="thin"/>
[% END %]
[% IF mybugsurl %]
[%- IF mybugsurl %]
<text class="text-link" onclick="load_relative_url('[% mybugsurl FILTER html %]')" value="my bugs"/>
[% END %]
[% IF anyvotesallowed && username %]
[%- END %]
[%- IF anyvotesallowed %]
<text class="text-link" onclick="load_relative_url('votes.cgi?action=show_user')" value="my votes"/>
[% END %]
[%- END %]
[% FOREACH name = namedqueries %]
[%- FOREACH name = namedqueries %]
<text class="text-link" onclick="load_relative_url('buglist.cgi?cmdtype=runnamed&amp;namedcmd=[% name FILTER uri %]')" value="[% name FILTER html %]"/>
[% END %]
[% END %]
[% IF NOT username %]
[% ELSE %]
<text class="text-link" onclick="load_relative_url('createaccount.cgi')" value="new user"/>
<text class="text-link" onclick="load_relative_url('query.cgi?GoAheadAndLogIn=1')" value="log in"/>
[% END %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment