summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2016-02-11 04:44:39 +0100
committerByron Jones <glob@mozilla.com>2016-02-11 04:44:39 +0100
commit9c75c64203c1c1c69b1c7ae2ec7092b44a05122c (patch)
tree6f6a59c10beaff6f9f40539a764dca52e7d0da56
parent7e8c053b15fa26a6f930adef558044edaca7acf0 (diff)
downloadbugzilla-9c75c64203c1c1c69b1c7ae2ec7092b44a05122c.tar.gz
bugzilla-9c75c64203c1c1c69b1c7ae2ec7092b44a05122c.tar.xz
Bug 1235182 - User Story should always be visible
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl1
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/module.html.tmpl3
-rw-r--r--extensions/BugModal/web/bug_modal.js1
3 files changed, 5 insertions, 0 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
index 6495b8df1..9b6e0ebd4 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -1030,6 +1030,7 @@
title = "User Story"
hide_on_view = bug.cf_user_story == ""
collapsed = bug.cf_user_story == ""
+ no_collapse_persist = 1
%]
[% IF user.id %]
<div id="user-story-actions">
diff --git a/extensions/BugModal/template/en/default/bug_modal/module.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/module.html.tmpl
index a36747f97..92b37543a 100644
--- a/extensions/BugModal/template/en/default/bug_modal/module.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/module.html.tmpl
@@ -17,6 +17,8 @@
# content: (string, required) module's content (use WRAPPER module..)
# hide_on_view: (boolean) if true, the module won't be visible in view mode
# hide_on_edit: (boolean) if true, the module won't be visible in edit mode
+ # no_collapse_persist: (boolean) if true, the module's collapsed state will
+ # not be remembered between page loads
#%]
<div class="module
@@ -24,6 +26,7 @@
[%~ " edit-show" IF hide_on_view && !hide_on_edit %]"
[% IF hide_on_view +%] style="display:none"[% END %]
[% IF title %] id="module-[% title.replace FILTER id %]"[% END %]
+ [%~ ' data-non-stick="1"' IF no_collapse_persist %]
>
[% IF title %]
<div class="module-header">
diff --git a/extensions/BugModal/web/bug_modal.js b/extensions/BugModal/web/bug_modal.js
index b2309ffe6..2d7bb4764 100644
--- a/extensions/BugModal/web/bug_modal.js
+++ b/extensions/BugModal/web/bug_modal.js
@@ -39,6 +39,7 @@ function init_module_visibility() {
var that = $(this);
var id = that.attr('id');
if (!id) return;
+ if (that.data('non-stick')) return;
var stored = localStorage.getItem(id + '.visibility');
if (stored) {
slide_module(that, stored, true);