Commit 7bf96883 authored by jake%acutex.net's avatar jake%acutex.net

Bug 104340 - Changing the UI of the toolbar for hiding bugs in the dependency tree.

Patch by Christian Reis <kiko@async.com.br> r= justdave@syndicomm.com, gerv@mozilla.org
parent 94a744b1
...@@ -283,24 +283,40 @@ sub drawDepForm { ...@@ -283,24 +283,40 @@ sub drawDepForm {
<td bgcolor="$bgcolor"> <td bgcolor="$bgcolor">
<!-- depth section --> <!-- depth section -->
Depth: Max Depth:
</td>
<td bgcolor="$bgcolor">
</td> </td>
<td bgcolor="$bgcolor"> <td bgcolor="$bgcolor">
<form method="get" action="$scriptname" <form method="get" action="$scriptname"
style="display: inline; margin: 0px;"> style="display: inline; margin: 0px;">
<!-- Unlimited button --> <!-- set to one form -->
<input type="submit" value="&nbsp;1&nbsp;" |
. ( $realdepth < 2 || $maxdepth == 1 ? "disabled" : "" ) . qq|>
<input name="id" type="hidden" value="$id"> <input name="id" type="hidden" value="$id">
<input name="maxdepth" type="hidden" value="1">
<input name="hide_resolved" type="hidden" value="$hide_resolved"> <input name="hide_resolved" type="hidden" value="$hide_resolved">
<input type="submit" value="&nbsp;Unlimited&nbsp;">
</form> </form>
</td> </td>
<td bgcolor="$bgcolor"> <td bgcolor="$bgcolor">
<form method="get" action="$scriptname"
style="display: inline; margin: 0px;">
Limit to: <!-- Minus one form
Allow subtracting only when realdepth and maxdepth > 1 -->
<input name="id" type="hidden" value="$id">
<input name="maxdepth" type="hidden" value="|
. ( $maxdepth == 1 ? 1 : ( $maxdepth ?
$maxdepth-1 : $realdepth-1 ) ) . qq|">
<input name="hide_resolved" type="hidden" value="$hide_resolved">
<input type="submit" value="&nbsp;&lt;&nbsp;" |
. ( $realdepth < 2 || ( $maxdepth && $maxdepth < 2 ) ?
"disabled" : "" ) . qq|>
</form>
</td> </td>
<td bgcolor="$bgcolor"> <td bgcolor="$bgcolor">
<form method="get" action="$scriptname" <form method="get" action="$scriptname"
...@@ -313,8 +329,10 @@ sub drawDepForm { ...@@ -313,8 +329,10 @@ sub drawDepForm {
<input name="id" type="hidden" value="$id"> <input name="id" type="hidden" value="$id">
<input name="hide_resolved" type="hidden" <input name="hide_resolved" type="hidden"
value="$hide_resolved"> value="$hide_resolved">
<noscript>
<input type="submit" value="Change" | <input type="submit" value="Change" |
. ( $realdepth < 2 ? "disabled" : "" ) . qq|> . ( $realdepth < 2 ? "disabled" : "" ) . qq|>
</noscript>
</form> </form>
</td> </td>
...@@ -322,31 +340,14 @@ sub drawDepForm { ...@@ -322,31 +340,14 @@ sub drawDepForm {
<form method="get" action="$scriptname" <form method="get" action="$scriptname"
style="display: inline; margin: 0px;"> style="display: inline; margin: 0px;">
<!-- Minus one (-1) form <!-- plus one form
Allow subtracting only when realdepth and maxdepth > 1 -->
<input name="id" type="hidden" value="$id">
<input name="maxdepth" type="hidden" value="|
. ( $maxdepth == 1 ? 1 : ( $maxdepth ?
$maxdepth-1 : $realdepth-1 ) ) . qq|">
<input name="hide_resolved" type="hidden" value="$hide_resolved">
<input type="submit" value="&nbsp;-1&nbsp;" |
. ( $realdepth < 2 || ( $maxdepth && $maxdepth < 2 ) ?
"disabled" : "" ) . qq|>
</form>
</td>
<td bgcolor="$bgcolor">
<form method="get" action="$scriptname"
style="display: inline; margin: 0px;">
<!-- plus one form +1
Disable button if total depth < 2, or if depth set to unlimited --> Disable button if total depth < 2, or if depth set to unlimited -->
<input name="id" type="hidden" value="$id"> <input name="id" type="hidden" value="$id">
| . ( $maxdepth ? qq| | . ( $maxdepth ? qq|
<input name="maxdepth" type="hidden" value="|.($maxdepth+1).qq|">| : "" ) <input name="maxdepth" type="hidden" value="|.($maxdepth+1).qq|">| : "" )
. qq| . qq|
<input name="hide_resolved" type="hidden" value="$hide_resolved"> <input name="hide_resolved" type="hidden" value="$hide_resolved">
<input type="submit" value="&nbsp;+1&nbsp;" | <input type="submit" value="&nbsp;&gt;&nbsp;" |
. ( $realdepth < 2 || ! $maxdepth || $maxdepth >= $realdepth ? . ( $realdepth < 2 || ! $maxdepth || $maxdepth >= $realdepth ?
"disabled" : "" ) . qq|> "disabled" : "" ) . qq|>
...@@ -356,12 +357,11 @@ sub drawDepForm { ...@@ -356,12 +357,11 @@ sub drawDepForm {
<form method="get" action="$scriptname" <form method="get" action="$scriptname"
style="display: inline; margin: 0px;"> style="display: inline; margin: 0px;">
<!-- set to one form --> <!-- Unlimited button -->
<input type="submit" value="Set to 1" |
. ( $realdepth < 2 || $maxdepth == 1 ? "disabled" : "" ) . qq|>
<input name="id" type="hidden" value="$id"> <input name="id" type="hidden" value="$id">
<input name="maxdepth" type="hidden" value="1">
<input name="hide_resolved" type="hidden" value="$hide_resolved"> <input name="hide_resolved" type="hidden" value="$hide_resolved">
<input type="submit" value="&nbsp;Unlimited&nbsp;">
</form> </form>
</td> </td>
</tr></table> </tr></table>
......
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