Author: sevein
Date: Tue Jun 5 12:59:59 2012
New Revision: 11735
Log:
Add button to toggle filters section
Modified:
branches/2.0/apps/qubit/modules/search/templates/_advancedSearch.php
branches/2.0/js/dominion.js
branches/2.0/plugins/qtDominionPlugin/css/less/advancedSearch.less
Modified: branches/2.0/apps/qubit/modules/search/templates/_advancedSearch.php
==============================================================================
--- branches/2.0/apps/qubit/modules/search/templates/_advancedSearch.php
Tue Jun 5 12:57:57 2012 (r11734)
+++ branches/2.0/apps/qubit/modules/search/templates/_advancedSearch.php
Tue Jun 5 12:59:59 2012 (r11735)
@@ -4,9 +4,11 @@
<?php echo get_partial('search/searchFields') ?>
- <div id="filters" class="row-fluid">
+ <p class="headline">
+ <button class="btn" id="toggle-filters"><?php echo __('Add filter/limit')
?></button>
+ </p>
- <p class="headline"><?php echo __('Filter/Limit') ?>:</p>
+ <div id="filters" class="row-fluid">
<div class="row-fluid">
Modified: branches/2.0/js/dominion.js
==============================================================================
--- branches/2.0/js/dominion.js Tue Jun 5 12:57:57 2012 (r11734)
+++ branches/2.0/js/dominion.js Tue Jun 5 12:59:59 2012 (r11735)
@@ -453,6 +453,7 @@
listen: function()
{
this.$criteria = this.$element.find('.criteria');
+ this.$filters = this.$element.find('#filters');
// Hide first boolean
this.$criteria.first().find('.boolean').hide();
@@ -463,6 +464,12 @@
this.$criteria.last().hide();
}
+ if (!this.$element.find('toggle-filters').hasClass('active'))
+ {
+ this.$filters.hide();
+ }
+
+ // Bind events
this.$element.on('click', $.proxy(this.click, this));
},
@@ -479,6 +486,12 @@
event.preventDefault();
this.addCriteria(id.replace('add-criteria-', ''));
break;
+
+ case 'toggle-filters':
+ event.preventDefault();
+ this.$filters.slideToggle('fast');
+ $target.toggleClass('active');
+ break;
}
},
Modified: branches/2.0/plugins/qtDominionPlugin/css/less/advancedSearch.less
==============================================================================
--- branches/2.0/plugins/qtDominionPlugin/css/less/advancedSearch.less Tue Jun
5 12:57:57 2012 (r11734)
+++ branches/2.0/plugins/qtDominionPlugin/css/less/advancedSearch.less Tue Jun
5 12:59:59 2012 (r11735)
@@ -81,6 +81,13 @@
#filters {
+ background-color: @grayLighter;
+ padding: 10px 0 14px 0;
+ border-top: 1px solid @grayLight;
+ border-bottom: 1px solid @grayLight;
+ @shadow: inset 0 4px 4px -4px @grayLight, inset 0 -4px 4px -4px
@grayLight;
+ .box-shadow(@shadow);
+
.row-fluid {
.left {
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.