allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [26/38] git commit: [#4019] ticket:558 Removed 'Filter by' and close buttons for filter popup
Date Wed, 30 Apr 2014 18:15:58 GMT
[#4019] ticket:558 Removed 'Filter by' and close buttons for filter popup


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/f9eb8607
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f9eb8607
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f9eb8607

Branch: refs/heads/master
Commit: f9eb86073a02957cc7b24d13624eebe84fa5d339
Parents: 8c3737a
Author: Ferens Dmitriy <ferensdima@gmail.com>
Authored: Fri Mar 14 17:53:16 2014 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed Apr 30 15:55:13 2014 +0000

----------------------------------------------------------------------
 .../widgets/resources/js/ticket-list.js         | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/f9eb8607/ForgeTracker/forgetracker/widgets/resources/js/ticket-list.js
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/widgets/resources/js/ticket-list.js b/ForgeTracker/forgetracker/widgets/resources/js/ticket-list.js
index 5db6980..2eecbb3 100644
--- a/ForgeTracker/forgetracker/widgets/resources/js/ticket-list.js
+++ b/ForgeTracker/forgetracker/widgets/resources/js/ticket-list.js
@@ -113,6 +113,26 @@
     $('.ticket-filter select').multiselect({
         selectedText: function() {
           return 'Filtering by ' + $(this.element[0]).attr('data-label');
+        },
+        open: function(a, b, c) {
+          //
+          // As multiselect plugin does not allow to hide toggle button,
+          // we should do it manually with next steps:
+          //
+          // 1. Making dropdown toggle button hidden
+          var toggleButton = $(this).siblings('button.ui-multiselect');
+          toggleButton.css('visibility', 'hidden');
+          var checkboxContainer = $(this).multiselect('widget');
+          // 2. Moving up container by button's height
+          var buttonsHeight = toggleButton.innerHeight();
+          var top = checkboxContainer.css('top').slice(0, -2) - buttonsHeight;
+          checkboxContainer.css('top', top + 'px');          
+          // 3. Decreasing filter's tab height by button's height
+          filterTab = $(this).parent().parent();
+          filterTab.height(filterTab.height() - buttonsHeight);
+
+          // Removing close button
+          $(checkboxContainer).find('a.ui-multiselect-close').remove();
         }
     });
 


Mime
View raw message