diff options
Diffstat (limited to 'apk_browser.module')
-rw-r--r-- | apk_browser.module | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/apk_browser.module b/apk_browser.module index b27d4e9..9cb1011 100644 --- a/apk_browser.module +++ b/apk_browser.module @@ -589,6 +589,28 @@ function apk_browser_preprocess_node(&$vars) { } } +//wrap the package browser filters inside a collapsed fieldset +function apk_browser_preprocess_views_view(&$vars) { + if ($vars['exposed']) { + $options['element'] = array( + '#title' => t('Filter packages'), + '#value' => $vars['exposed'], + '#children' => FALSE, + //seems collapse can only be done on real form items + //so we need to help this fieldset a bit + '#attributes' => array( + 'class' => array( + 'collapsible', + 'collapsed' + ), + ), + ); + drupal_add_js('misc/form.js'); + drupal_add_js('misc/collapse.js'); + $vars['exposed'] = theme('fieldset', $options); + } +} + function apk_browser_origin_list() { //Get a loaded object from a router item. $node = menu_get_object(); |