aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2009-11-25 15:31:09 -0200
committerSilvio <silvio@devlet.com.br>2010-10-14 18:23:24 -0300
commit2143f4f53f48598d370c375df008999f1621fa52 (patch)
treec091da1cc6f78be444f711e09475bebdd7697f9e
parent961b4e7a874cea8b0984cd53775f7467ba199b80 (diff)
downloadjquery_drawer-2143f4f53f48598d370c375df008999f1621fa52.tar.gz
jquery_drawer-2143f4f53f48598d370c375df008999f1621fa52.tar.bz2
Adding option to not render jquery drawer box
-rw-r--r--jquery_drawer.module19
1 files 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 .= '</ul>';
- $output .= '<div id="drw">';
- $output .= '</div>';
- return $output;
+ if (variable_get('jquery_drawer_drw', '0') == 0) {
+ $output .= '<div id="drw">';
+ $output .= '</div>';
+ }
+
+ return $output;
}
/**