From 2143f4f53f48598d370c375df008999f1621fa52 Mon Sep 17 00:00:00 2001 From: Silvio Date: Wed, 25 Nov 2009 15:31:09 -0200 Subject: Adding option to not render jquery drawer box --- jquery_drawer.module | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/jquery_drawer.module b/jquery_drawer.module index 7dad139..6e573e2 100644 --- a/jquery_drawer.module +++ b/jquery_drawer.module @@ -14,6 +14,7 @@ */ function jquery_drawer_uninstall() { variable_del('jquery_drawer'); + variable_del('jquery_drawer_drw'); } /** @@ -46,10 +47,17 @@ function jquery_drawer_block($op = 'list', $delta = 0, $edit = array()) { '#default_value' => variable_get('jquery_drawer', '1'), '#options' => $vocabularies, ); + $form['jquery_drawer_drw'] = array( + '#type' => 'checkbox', + '#title' => t('Do not show drawer box.'), + '#description' => t('Select this option if you plan to manually provide the drawer box.'), + '#default_value' => variable_get('jquery_drawer_drw', '0'), + ); return $form; case 'save': - variable_set('jquery_drawer', $edit['jquery_drawer']); + variable_set('jquery_drawer', $edit['jquery_drawer']); + variable_set('jquery_drawer_drw', $edit['jquery_drawer_drw']); break; case 'view': @@ -113,10 +121,13 @@ function theme_jquery_drawer($menu) { } $output .= ''; - $output .= '
'; - $output .= '
'; - return $output; + if (variable_get('jquery_drawer_drw', '0') == 0) { + $output .= '
'; + $output .= '
'; + } + + return $output; } /** -- cgit v1.2.3