Commit dfd2c47b authored by merlinofchaos's avatar merlinofchaos

#534680 by dagmar: Visual indicator if checkbox will expand options.

parent c42a7a1b
......@@ -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:
......
......@@ -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
*/
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment