Commit 947e7821 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 291459: Make textareas zoom large when in use - Patch by Marc Schumann…

Bug 291459: Make textareas zoom large when in use - Patch by Marc Schumann <wurblzap@gmail.com> r=vladd a=justdave
parent b3cdb97b
...@@ -4416,6 +4416,9 @@ add_setting ("post_bug_submit_action", {"next_bug" => 1, ...@@ -4416,6 +4416,9 @@ add_setting ("post_bug_submit_action", {"next_bug" => 1,
# 2005-06-29 wurblzap@gmail.com -- Bug 257767 # 2005-06-29 wurblzap@gmail.com -- Bug 257767
add_setting ('csv_colsepchar', {',' => 1, ';' => 2 }, ',' ); add_setting ('csv_colsepchar', {',' => 1, ';' => 2 }, ',' );
# 2005-10-26 wurblzap@gmail.com -- Bug 291459
add_setting ("zoom_textareas", {"on" => 1, "off" => 2 }, "on" );
# 2005-10-21 LpSolit@gmail.com -- Bug 313020 # 2005-10-21 LpSolit@gmail.com -- Bug 313020
add_setting('per_bug_queries', {'on' => 1, 'off' => 2}, 'on'); add_setting('per_bug_queries', {'on' => 1, 'off' => 2}, 'on');
......
...@@ -31,7 +31,14 @@ ...@@ -31,7 +31,14 @@
</tr> </tr>
<tr> <tr>
<th align="right">Description:</th> <th align="right">Description:</th>
<td><textarea rows=4 cols=64 wrap=virtual name="description"></textarea></td> <td>
[% INCLUDE global/textarea.html.tmpl
name = 'description'
minrows = 4
cols = 64
wrap = 'virtual'
%]
</td>
</tr> </tr>
</table> </table>
<hr> <hr>
......
...@@ -32,8 +32,13 @@ ...@@ -32,8 +32,13 @@
</tr> </tr>
<tr> <tr>
<th align="right">Description:</th> <th align="right">Description:</th>
<td><textarea rows=4 cols=64 name="description"> <td>
[% classification.description FILTER none %]</textarea> [% INCLUDE global/textarea.html.tmpl
name = 'description'
minrows = 4
cols = 64
defaultcontent = classification.description
%]
</td> </td>
</tr> </tr>
<tr valign=top> <tr valign=top>
......
...@@ -40,8 +40,12 @@ ...@@ -40,8 +40,12 @@
<tr> <tr>
<th align="right">Description:</th> <th align="right">Description:</th>
<td> <td>
<textarea rows="4" cols="64" wrap="virtual" [% INCLUDE global/textarea.html.tmpl
name="description"></textarea> name = 'description'
minrows = 4
cols = 64
wrap = 'virtual'
%]
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -43,8 +43,14 @@ ...@@ -43,8 +43,14 @@
</tr> </tr>
<tr> <tr>
<td valign="top">Component Description:</td> <td valign="top">Component Description:</td>
<td><textarea rows="4" cols="64" wrap="virtual" <td>
name="description">[% comp.description FILTER html %]</textarea> [% INCLUDE global/textarea.html.tmpl
name = 'description'
minrows = 4
cols = 64
wrap = 'virtual'
defaultcontent = comp.description
%]
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -85,7 +85,12 @@ ...@@ -85,7 +85,12 @@
<th>Description:</th> <th>Description:</th>
<td> <td>
a comprehensive description of this type<br> a comprehensive description of this type<br>
<textarea name="description" rows="4" cols="80">[% type.description FILTER html %]</textarea> [% INCLUDE global/textarea.html.tmpl
name = 'description'
minrows = 4
cols = 80
defaultcontent = type.description
%]
</td> </td>
</tr> </tr>
......
...@@ -38,8 +38,12 @@ ...@@ -38,8 +38,12 @@
<tr> <tr>
<th align="right">Description:</th> <th align="right">Description:</th>
<td> <td>
<textarea rows="4" cols="64" wrap="virtual" [% INCLUDE global/textarea.html.tmpl
name="description"></textarea> name = 'description'
minrows = 4
cols = 64
wrap = 'virtual'
%]
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -42,8 +42,13 @@ ...@@ -42,8 +42,13 @@
<tr> <tr>
<th align="right">Description:</th> <th align="right">Description:</th>
<td> <td>
<textarea rows="4" cols="64" wrap="virtual" [% INCLUDE global/textarea.html.tmpl
name="description">[% description FILTER html %]</textarea> name = 'description'
minrows = 4
cols = 64
wrap = 'virtual'
defaultcontent = description
%]
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -72,9 +72,15 @@ ...@@ -72,9 +72,15 @@
<tr> <tr>
<th><label for="disabledtext">Disable text:</label></th> <th><label for="disabledtext">Disable text:</label></th>
<td> <td>
<textarea name="disabledtext" rows="10" [% INCLUDE global/textarea.html.tmpl
id="disabledtext" name = 'disabledtext'
cols="60">[% otheruser.disabledtext FILTER html %]</textarea><br /> id = 'disabledtext'
minrows = 2
maxrows = 10
defaultrows = 10
cols = 60
defaultcontent = otheruser.disabledtext
%]<br>
(If non-empty, then the account will be disabled, and this text should (If non-empty, then the account will be disabled, and this text should
explain why.) explain why.)
[% IF editform %] [% IF editform %]
......
...@@ -237,7 +237,14 @@ ...@@ -237,7 +237,14 @@
<th><label for="comment">Comment:</label></th> <th><label for="comment">Comment:</label></th>
<td> <td>
<em>(optional) Add a comment about this attachment to the [% terms.bug %].</em><br> <em>(optional) Add a comment about this attachment to the [% terms.bug %].</em><br>
<textarea wrap="soft" id="commment" name="comment" rows="6" cols="80"></textarea> [% INCLUDE global/textarea.html.tmpl
name = 'comment'
id = 'comment'
minrows = 6
maxrows = 15
cols = 80
wrap = 'soft'
%]
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -212,8 +212,13 @@ ...@@ -212,8 +212,13 @@
<td width="25%"> <td width="25%">
<small> <small>
<b>Description:</b><br> <b>Description:</b><br>
<textarea rows="3" cols="25" name="description" wrap="soft"> [% INCLUDE global/textarea.html.tmpl
[%- attachment.description FILTER html %]</textarea><br> name = 'description'
minrows = 3
cols = 25
wrap = 'soft'
defaultcontent = attachment.description
%]<br>
[% IF attachment.isurl %] [% IF attachment.isurl %]
<input type="hidden" name="filename" <input type="hidden" name="filename"
...@@ -250,7 +255,12 @@ ...@@ -250,7 +255,12 @@
<div id="smallCommentFrame"> <div id="smallCommentFrame">
<b>Comment (on the [% terms.bug %]):</b><br> <b>Comment (on the [% terms.bug %]):</b><br>
<textarea name="comment" rows="5" cols="25" wrap="soft"></textarea><br> [% INCLUDE global/textarea.html.tmpl
name = 'comment'
minrows = 5
cols = 25
wrap = 'soft'
%]<br>
</div> </div>
<input type="submit" value="Submit"><br><br> <input type="submit" value="Submit"><br><br>
...@@ -264,8 +274,14 @@ ...@@ -264,8 +274,14 @@
[% IF isviewable %] [% IF isviewable %]
<td width="75%"> <td width="75%">
<textarea id="editFrame" name="comment" wrap="soft" cols="80" [% INCLUDE global/textarea.html.tmpl
style="height: 400px; width: 100%; display: none;"></textarea> id = 'editFrame'
name = 'comment'
style = 'height: 400px; width: 100%; display: none'
minrows = 10
cols = 80
wrap = 'soft'
%]
<iframe id="viewFrame" src="attachment.cgi?id=[% attachment.id %]" style="height: 400px; width: 100%;"> <iframe id="viewFrame" src="attachment.cgi?id=[% attachment.id %]" style="height: 400px; width: 100%;">
<b>You cannot view the attachment while viewing its details because your browser does not support IFRAMEs. <b>You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
<a href="attachment.cgi?id=[% attachment.id %]">View the attachment on a separate page</a>.</b> <a href="attachment.cgi?id=[% attachment.id %]">View the attachment on a separate page</a>.</b>
......
...@@ -333,7 +333,11 @@ function PutDescription() { ...@@ -333,7 +333,11 @@ function PutDescription() {
<b>Details</b> <b>Details</b>
</td> </td>
<td valign="top"> <td valign="top">
<textarea rows="6" cols="80" name="comment"></textarea> [% INCLUDE global/textarea.html.tmpl
name = 'comment'
minrows = 6
cols = 80
%]
<p> <p>
Expand on the Summary. Please be Expand on the Summary. Please be
as specific as possible about what is wrong. as specific as possible about what is wrong.
...@@ -381,11 +385,12 @@ function PutDescription() { ...@@ -381,11 +385,12 @@ function PutDescription() {
<b>Steps to Reproduce</b> <b>Steps to Reproduce</b>
</td> </td>
<td valign="top"> <td valign="top">
<textarea rows="4" cols="80" name="reproduce_steps"> [% INCLUDE global/textarea.html.tmpl
1. name = 'reproduce_steps'
2. minrows = 4
3. cols = 80
</textarea> defaultcontent = "1.\n2.\n3."
%]
<p> <p>
Describe how to reproduce the problem, step by Describe how to reproduce the problem, step by
step. Include any special setup steps. step. Include any special setup steps.
...@@ -398,7 +403,11 @@ function PutDescription() { ...@@ -398,7 +403,11 @@ function PutDescription() {
<b>Actual Results</b> <b>Actual Results</b>
</td> </td>
<td valign="top"> <td valign="top">
<textarea rows="4" cols="80" name="actual_results"></textarea> [% INCLUDE global/textarea.html.tmpl
name = 'actual_results'
minrows = 4
cols = 80
%]
<p> <p>
What happened after you performed the steps above? What happened after you performed the steps above?
</p> </p>
...@@ -410,7 +419,11 @@ function PutDescription() { ...@@ -410,7 +419,11 @@ function PutDescription() {
<b>Expected Results</b> <b>Expected Results</b>
</td> </td>
<td valign="top"> <td valign="top">
<textarea rows="4" cols="80" name="expected_results"></textarea> [% INCLUDE global/textarea.html.tmpl
name = 'expected_results'
minrows = 4
cols = 80
%]
<p> <p>
What should the software have done instead? What should the software have done instead?
</p> </p>
...@@ -422,7 +435,11 @@ function PutDescription() { ...@@ -422,7 +435,11 @@ function PutDescription() {
<b>Additional Information</b> <b>Additional Information</b>
</td> </td>
<td valign="top"> <td valign="top">
<textarea rows="8" cols="80" name="additional_info"></textarea> [% INCLUDE global/textarea.html.tmpl
name = 'additional_info'
minrows = 8
cols = 80
%]
<p> <p>
Add any additional information you feel may be Add any additional information you feel may be
relevant to this [% terms.bug %], such as the <b>theme</b> you were relevant to this [% terms.bug %], such as the <b>theme</b> you were
......
...@@ -307,13 +307,21 @@ function set_assign_to() { ...@@ -307,13 +307,21 @@ function set_assign_to() {
<tr><td align="right" valign="top"><strong>Description:</strong></td> <tr><td align="right" valign="top"><strong>Description:</strong></td>
<td colspan="3"> <td colspan="3">
<textarea name="comment" rows="10" cols="80"> [% defaultcontent = BLOCK %]
[% IF cloned_bug_id %] [% IF cloned_bug_id %]
+++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++ +++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++
[% END %] [% END %]
[% comment FILTER html %]</textarea> [% comment FILTER html %]
[%- END %]
[% INCLUDE global/textarea.html.tmpl
name = 'comment'
minrows = 10
maxrows = 25
cols = 80
defaultcontent = defaultcontent
%]
<br> <br>
</td> </td>
</tr> </tr>
......
...@@ -567,8 +567,14 @@ ...@@ -567,8 +567,14 @@
[% END %] [% END %]
<br> <br>
<a name="add_comment"></a> <a name="add_comment"></a>
<textarea name="comment" id="comment" rows="10" cols="80" [% INCLUDE global/textarea.html.tmpl
accesskey="c"></textarea> name = 'comment'
id = 'comment'
minrows = 10
maxrows = 25
cols = 80
accesskey = 'c'
%]
[% IF NOT bug.cc || NOT bug.cc.contains(user.login) %] [% IF NOT bug.cc || NOT bug.cc.contains(user.login) %]
<br> <br>
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"comment_sort_order" => "When viewing $terms.abug, show comments in this order", "comment_sort_order" => "When viewing $terms.abug, show comments in this order",
"csv_colsepchar" => "Field separator character for CSV files", "csv_colsepchar" => "Field separator character for CSV files",
"display_quips" => "Show a quip at the top of each bug list", "display_quips" => "Show a quip at the top of each bug list",
"zoom_textareas" => "Zoom textareas large when in use (requires JavaScript)",
"newest_to_oldest" => "Newest to Oldest", "newest_to_oldest" => "Newest to Oldest",
"newest_to_oldest_desc_first" => "Newest to Oldest, but keep Description at the top", "newest_to_oldest_desc_first" => "Newest to Oldest, but keep Description at the top",
"off" => "Off", "off" => "Off",
......
[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Bug Tracking System.
#
# Contributor(s): Marc Schumann <wurblzap@gmail.com>
#%]
[%# INTERFACE:
#
# id: (optional) The "id"-attribute of the textarea.
# name: (optional) The "name"-attribute of the textarea.
# accesskey: (optional) The "accesskey"-attribute of the textarea.
# style: (optional) The "style"-attribute of the textarea.
# wrap: (deprecated; optional) The "wrap"-attribute of the textarea.
# minrows: (required) Number of rows the textarea shall have initially
# and when not having focus.
# maxrows: (optional) Number of rows the textarea shall have if
# maximized (which happens on getting focus). If not given,
# the textarea doesn't maximize when getting focus.
# defaultrows: (optional) Number of rows the textarea shall have if
# the zoom_textareas user preference if off. If not given,
# minrows will be used.
# cols: (required) Number of columns the textarea shall have.
# defaultcontent: (optional) Default content for the textarea.
#%]
<textarea [% IF name %]name="[% name FILTER html %]"[% END %]
[% IF id %] id="[% id FILTER html %]"[% END %]
[% IF accesskey %] accesskey="[% accesskey FILTER html %]"[% END %]
[% IF style %] style="[% style FILTER html %]"[% END %]
[% IF wrap %] wrap="[% wrap FILTER html %]"[% END %]
[% IF defaultrows && user.settings.zoom_textareas.value == 'off' %]
rows="[% defaultrows FILTER html %]"
[% ELSE %]
rows="[% minrows FILTER html %]"
[% END %]
cols="[% cols FILTER html %]"
[% IF maxrows && user.settings.zoom_textareas.value == 'on' %]
onFocus="this.rows=[% maxrows FILTER html %]"
onBlur="this.rows=[% minrows FILTER html %]"
[% END %]>[% defaultcontent FILTER html %]</textarea>
...@@ -209,7 +209,13 @@ ...@@ -209,7 +209,13 @@
</table> </table>
<b><label for="comment">Additional Comments:</label></b><br> <b><label for="comment">Additional Comments:</label></b><br>
<textarea id="comment" name="comment" rows="5" cols="80"></textarea><br> [% INCLUDE global/textarea.html.tmpl
name = 'comment'
id = 'comment'
minrows = 5
maxrows = 25
cols = 80
%]<br>
[% IF groups.size > 0 %] [% IF groups.size > 0 %]
......
...@@ -30,7 +30,11 @@ ...@@ -30,7 +30,11 @@
</p> </p>
<form action="page.cgi" method="post"> <form action="page.cgi" method="post">
<textarea cols="80" rows="20" name="text"></textarea> [% INCLUDE global/textarea.html.tmpl
name = 'text'
minrows = 20
cols = 80
%]
<br> <br>
<input type="hidden" name="id" value="linked.html"> <input type="hidden" name="id" value="linked.html">
<input value="Linkify" type="submit"> <input value="Linkify" type="submit">
......
...@@ -113,9 +113,14 @@ ...@@ -113,9 +113,14 @@
Descriptive text sent within whine message: Descriptive text sent within whine message:
</td> </td>
<td> <td>
<textarea name="event_[% event.key %]_body" [% INCLUDE global/textarea.html.tmpl
rows="5" cols="80"> name = "event_${event.key}_body"
[% event.value.body FILTER html %]</textarea> minrows = 3
maxrows = 10
defaultrows = 5
cols = 80
defaultcontent = event.value.body
%]
</td> </td>
</tr> </tr>
......
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