]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1235182 - User Story should always be visible
authorByron Jones <glob@mozilla.com>
Thu, 11 Feb 2016 03:44:39 +0000 (11:44 +0800)
committerByron Jones <glob@mozilla.com>
Thu, 11 Feb 2016 03:44:39 +0000 (11:44 +0800)
extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
extensions/BugModal/template/en/default/bug_modal/module.html.tmpl
extensions/BugModal/web/bug_modal.js

index 6495b8df1a146ff68f465c457500de45e43e2d35..9b6e0ebd44137e01bdc0443dc7486089910a79c2 100644 (file)
     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">
index a36747f97e34c35051c952d312d2dc410db1cf5e..92b37543ac7de3d4fd61a73d3931c8d713ad2d10 100644 (file)
@@ -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">
index b2309ffe65a6e3330cbcdd994cc0b9aa7efb0c5a..2d7bb4764f384529bda7f81d228d4144c29edaa6 100644 (file)
@@ -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);