summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-20 23:26:15 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-07-20 23:26:15 +0200
commit69be160f92f1d20408c0e390610dffbd619f63cb (patch)
tree8b23fae12430b372a51f11a969cd54037cc1d1be
parent1dc3eb46af07596e64c6c3bb1cbb82cf121ad8b1 (diff)
downloadbugzilla-69be160f92f1d20408c0e390610dffbd619f63cb.tar.gz
bugzilla-69be160f92f1d20408c0e390610dffbd619f63cb.tar.xz
Bug 560003: Hide the "Add Bug URLs" box behind an (add) link.
r=timello, a=mkanat
-rw-r--r--js/field.js6
-rw-r--r--template/en/default/bug/field.html.tmpl19
2 files changed, 20 insertions, 5 deletions
diff --git a/js/field.js b/js/field.js
index 2fff5931d..d2e800b90 100644
--- a/js/field.js
+++ b/js/field.js
@@ -203,6 +203,12 @@ function updateCalendarFromField(date_field) {
}
}
+function setupEditLink(id) {
+ var link_container = 'container_showhide_' + id;
+ var input_container = 'container_' + id;
+ var link = 'showhide_' + id;
+ hideEditableField(link_container, input_container, link);
+}
/* Hide input fields and show the text with (edit) next to it */
function hideEditableField( container, input, action, field_id, original_value ) {
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index 2417ce39b..49cf718cc 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -175,11 +175,20 @@
[% '</ul>' IF value.size %]
[% IF Param('use_see_also') %]
- <label for="[% field.name FILTER html %]">
- <strong>Add [% terms.Bug %] URLs:</strong>
- </label><br>
- <input type="text" id="[% field.name FILTER html %]" size="40"
- class="text_input" name="[% field.name FILTER html %]">
+ <span id="container_showhide_[% field.name FILTER html %]"
+ class="bz_default_hidden">
+ <a href="#" id="showhide_[% field.name FILTER html %]">(add)</a>
+ </span>
+ <div id="container_[% field.name FILTER html %]">
+ <label for="[% field.name FILTER html %]">
+ <strong>Add [% terms.Bug %] URLs:</strong>
+ </label><br>
+ <input type="text" id="[% field.name FILTER html %]" size="40"
+ class="text_input" name="[% field.name FILTER html %]">
+ </div>
+ <script type="text/javascript">
+ setupEditLink('[% field.name FILTER js %]');
+ </script>
[% END %]
[% CASE constants.FIELD_TYPE_KEYWORDS %]
<div id="keyword_container">