From 0a179d93eb8e5afc357f1c6305533e826ea9b16c Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Thu, 12 May 2011 19:04:35 +0200 Subject: wrap the filters in package browser inside a fieldset --- apk_browser.module | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/apk_browser.module b/apk_browser.module index 6527fc0..b27d4e9 100644 --- a/apk_browser.module +++ b/apk_browser.module @@ -730,3 +730,27 @@ function apk_browser_assign_maintainer() { variable_set('apk_browser_assign_maintainer', time()); watchdog('apk', 'Updated @qty package maintainers', array('@qty' => count(array_filter($updated))), WATCHDOG_INFO, NULL); } + +//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, + '#attached' => array( + 'js' => array( + 'misc/form.js', + 'misc/collapse.js', + ), + ), + '#attributes' => array( + 'class' => array( + 'collapsible', + 'collapsed' + ), + ), + ); + $vars['exposed'] = theme('fieldset', $options); + } +} \ No newline at end of file -- cgit v1.2.3