Commits

Stanislas Guerra committed f409c05

Add a transition state for the h3 filter background.

Comments (0)

Files changed (3)

css/foldable-list-filter.css

 #changelist-filter h3.closed {
     background-position: -15px 0;
 }
+#changelist-filter h3.schrodinger {
+    background-position: 0 -41px !important;
+}
 #changelist-filter h3.closed + ul li:not(.selected) {
     display: none;
 }

images/foldable-list-filter.png

Old
Old image
New
New image

js/foldable-list-filter.js

             cookie_name: "list_filter_closed",
             delim: "|",
             opened_class: "opened",
+            transition_class: "schrodinger",
             closed_class: "closed",
             list_filter_closed: [],
             update_cookie: function(action, index) {
 
         foldable_list_filter.filters.click(function(){
             var filter = $(this);
+            filter.addClass(foldable_list_filter.transition_class);
             if ($(this).hasClass(foldable_list_filter.opened_class)) { // Closing.
                 $(this).next().find('li:not(.selected)').slideUp(function(){
-                    filter.removeClass(foldable_list_filter.opened_class)
+                    filter.removeClass(foldable_list_filter.transition_class+" "+
+                                       foldable_list_filter.opened_class)
                           .addClass(foldable_list_filter.closed_class);
                 });
                 foldable_list_filter.update_cookie(
                 );
             } else { // Opening.
                 $(this).next().find('li:not(.selected)').slideDown(function(){
-                    filter.removeClass(foldable_list_filter.closed_class)
+                    filter.removeClass(foldable_list_filter.transition_class+" "+
+                                       foldable_list_filter.closed_class)
                           .addClass(foldable_list_filter.opened_class);
                 });
                 foldable_list_filter.update_cookie(