Index: sites/all/modules/contrib/better_exposed_filters/better_exposed_filters.js IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- sites/all/modules/contrib/better_exposed_filters/better_exposed_filters.js (revision 3f4195aaf8e6ed79f9a16636f0c3b8fa06d0c583) +++ sites/all/modules/contrib/better_exposed_filters/better_exposed_filters.js (revision ) @@ -98,6 +98,38 @@ } // attach: function() { }; // Drupal.behaviors.better_exposed_filters = { + // This is only needed to provide ajax functionality + Drupal.behaviors.better_exposed_filters_select_as_links = { + attach: function (context) { + + $('.bef-select-as-links', context).once(function () { + var $this = $(this); + var $widgets = $this.parents('.views-exposed-widgets'); + // Hide the actual form elements from the user. + $this.find('select').hide(); + var $options = $this.find('select option'); + $this.find('a').click(function (event) { + // We have to prevent the page load triggered by the links. + event.preventDefault(); + event.stopPropagation(); + var text = $(this).text(); + // De-select old select value. + $options.attr('selected', false); + + // Set the corresponding option inside the select element + $options.filter(function () { + return $(this).text() == text; + }).attr('selected', true); + $this.find('.bef-new-value').val($options.filter(':selected').val()); + + // Submit the form. + $widgets.find('.views-submit-button input').click(); + }); + }); + } + }; + + /* * Helper functions */ @@ -111,5 +143,7 @@ ? $elem.closest('.form-item', context).addClass('highlight') : $elem.closest('.form-item', context).removeClass('highlight'); } + + }) (jQuery); Index: sites/all/modules/contrib/better_exposed_filters/better_exposed_filters.theme IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- sites/all/modules/contrib/better_exposed_filters/better_exposed_filters.theme (revision 3f4195aaf8e6ed79f9a16636f0c3b8fa06d0c583) +++ sites/all/modules/contrib/better_exposed_filters/better_exposed_filters.theme (revision ) @@ -495,14 +495,16 @@ $output = '