summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-05-12 23:53:27 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2011-05-12 23:53:27 +0200
commit9ae2873ab191b1a79c14dab0785e1a9c1ff00b57 (patch)
treeb9709fa0c593502341c9e9e1d5d15ce1a52c7277
parent0a179d93eb8e5afc357f1c6305533e826ea9b16c (diff)
downloadapk_browser-9ae2873ab191b1a79c14dab0785e1a9c1ff00b57.tar.bz2
apk_browser-9ae2873ab191b1a79c14dab0785e1a9c1ff00b57.tar.xz
move views filter items inside collapsable fieldset
-rw-r--r--apk_browser.module22
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();