summaryrefslogtreecommitdiffstats
path: root/extensions/UserStory
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-08-06 08:16:50 +0200
committerByron Jones <glob@mozilla.com>2014-08-06 08:16:50 +0200
commitb9b47919cc8e335d11d3ea1faa2ddf9346cf3d49 (patch)
treee69b9c0b26c87083a8a94045d568b64d8c0608f7 /extensions/UserStory
parentb395ba041e097b0120e61302859f138c7be68eca (diff)
downloadbugzilla-b9b47919cc8e335d11d3ea1faa2ddf9346cf3d49.tar.gz
bugzilla-b9b47919cc8e335d11d3ea1faa2ddf9346cf3d49.tar.xz
Bug 1047142: The User Story field should be expanded/editable by default if it's non-empty when cloning a bug
Diffstat (limited to 'extensions/UserStory')
-rw-r--r--extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl12
1 files changed, 9 insertions, 3 deletions
diff --git a/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl
index 594e854b1..a0c904fe0 100644
--- a/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl
+++ b/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl
@@ -8,6 +8,7 @@
[% RETURN UNLESS default.user_story_group.0 && default.check_can_change_field('cf_user_story', 0, 1) %]
+</tbody>
<tbody id="cf_user_story_container" class="expert_fields bz_default_hidden">
<tr>
<th class="field_label">
@@ -37,6 +38,9 @@
user_story_components.push('[% c FILTER js %]');
[% END %]
function toggleUserStory() {
+ if (YAHOO.util.Dom.get('user_story').value != '') {
+ hideUserStoryEdit();
+ }
if (user_story_components.length == 0) {
YAHOO.util.Dom.removeClass('cf_user_story_container', 'bz_default_hidden');
YAHOO.util.Dom.get('user_story').disabled = false;
@@ -64,15 +68,17 @@
}
}
}
- YAHOO.util.Event.addListener('component', 'change', toggleUserStory);
- YAHOO.util.Event.addListener('user_story_edit_action', 'click', function() {
+ function hideUserStoryEdit() {
YAHOO.util.Dom.addClass('user_story_edit', 'bz_default_hidden');
YAHOO.util.Dom.addClass('user_story_readonly', 'bz_default_hidden');
YAHOO.util.Dom.removeClass('user_story_edit_container', 'bz_default_hidden');
+ }
+ YAHOO.util.Event.addListener('component', 'change', toggleUserStory);
+ YAHOO.util.Event.addListener('user_story_edit_action', 'click', function() {
+ hideUserStoryEdit();
YAHOO.util.Dom.get('user_story').focus();
});
toggleUserStory();
</script>
</td>
</tr>
-</tbody>