summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--css/views-admin.css16
-rw-r--r--images/expanded-options.pngbin0 -> 228 bytes
-rw-r--r--js/dependent.js12
4 files changed, 29 insertions, 0 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 268d4a1..e3d082f 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -50,6 +50,7 @@ Views 2.x-dev
o #523580 by JirkaRybka: More documentation on Reduce Duplicates option.
o #510920 by apanag: Add set_current_page() method to view class.
o #337741 by joachim: Allow profile fields to have "link to user" option.
+ o #534680 by dagmar: Visual indicator if checkbox will expand options.
Views 2.6
Bugs fixed:
diff --git a/css/views-admin.css b/css/views-admin.css
index d705f40..8d9fe45 100644
--- a/css/views-admin.css
+++ b/css/views-admin.css
@@ -386,6 +386,22 @@ html.js #views-ajax-pad {
margin: 0;
}
+#views-ajax-pad label.hidden-options {
+ background: transparent url(../images/arrow-active.png) no-repeat right;
+ height: 12px;
+ padding-right: 12px;
+}
+
+#views-ajax-pad label.expanded-options {
+ background: transparent url(../images/expanded-options.png) no-repeat right;
+ height: 12px;
+ padding-right: 16px;
+}
+
+#views-ajax-pad .dependent-options {
+ padding-left: 30px;
+}
+
/*
* Add, Rearrange and Configure buttons using sprites
*/
diff --git a/images/expanded-options.png b/images/expanded-options.png
new file mode 100644
index 0000000..b7b755c
--- /dev/null
+++ b/images/expanded-options.png
Binary files differ
diff --git a/js/dependent.js b/js/dependent.js
index 3755f63..d021eef 100644
--- a/js/dependent.js
+++ b/js/dependent.js
@@ -81,6 +81,9 @@ Drupal.Views.dependent.autoAttach = function() {
Drupal.Views.dependent.activeTriggers.push(trigger_id);
+ if (jQuery(trigger_id).attr('type') == 'checkbox') {
+ $(trigger_id).parent().addClass('hidden-options');
+ }
var getValue = function(item, trigger) {
if (item.substring(0, 6) == 'radio:') {
@@ -90,6 +93,14 @@ Drupal.Views.dependent.autoAttach = function() {
switch (jQuery(trigger).attr('type')) {
case 'checkbox':
var val = jQuery(trigger).attr('checked') || 0;
+
+ if (val) {
+ $(trigger).parent().removeClass('hidden-options').addClass('expanded-options');
+ }
+ else {
+ $(trigger).parent().removeClass('expanded-options').addClass('hidden-options');
+ }
+
break;
default:
var val = jQuery(trigger).val();
@@ -137,6 +148,7 @@ Drupal.Views.dependent.autoAttach = function() {
if (Drupal.settings.viewsAjax.formRelationships[id].num <= len) {
// Show if the element if criteria is matched
object.show(0);
+ object.addClass('dependent-options');
}
else {
// Otherwise hide