aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsilvio <silvio@gota.(none)>2009-10-15 14:45:14 -0300
committersilvio <silvio@gota.(none)>2009-10-15 14:45:14 -0300
commite7a54ba0c99d35ec947beb3f0f02e6dd0964d72f (patch)
tree52ca981b85baf96692ea596336ae0269df28ba17
parentc4c3e79730cadc82eab4b5695e64261a985f0bce (diff)
downloadjquery_drawer-e7a54ba0c99d35ec947beb3f0f02e6dd0964d72f.tar.gz
jquery_drawer-e7a54ba0c99d35ec947beb3f0f02e6dd0964d72f.tar.bz2
CSS change and code cleanup
-rw-r--r--jquery_drawer.css (renamed from style.css)4
-rw-r--r--jquery_drawer.module39
2 files changed, 36 insertions, 7 deletions
diff --git a/style.css b/jquery_drawer.css
index 2d02061..62da52c 100644
--- a/style.css
+++ b/jquery_drawer.css
@@ -56,3 +56,7 @@ div.sample p {
padding : 20px;
margin : 0;
}
+
+ul#drw_tabs {
+ width: 100%;
+}
diff --git a/jquery_drawer.module b/jquery_drawer.module
index 2dcb707..7d3996a 100644
--- a/jquery_drawer.module
+++ b/jquery_drawer.module
@@ -135,11 +135,31 @@ function theme_jquery_drawer($menu_name, $mlid) {
// Build the menus
$output = jquery_drawer_build($menu);
- $output .= '</ul>'; // TODO: remove this
+
+ return $output;
+}
+
+/**
+ * Build the Drawer.
+ *
+ * @ingroup themeable
+ */
+function jquery_drawer_build($menu) {
+
+ $output = '<ul id="drw_tabs">';
+ $output .= implode((array) module_invoke_all('jquery_drawer_build'));
+
+ foreach ($menu as $menu_item) {
+ if ($menu_item['link']['hidden'] == 0) {
+ $output .= theme('jquery_drawer_link', $menu_item['link']);
+ }
+ }
+
+ $output .= '</ul>';
$output .= '<div id="drw">';
$output .= '</div>';
-
return $output;
+
}
/**
@@ -147,7 +167,7 @@ function theme_jquery_drawer($menu_name, $mlid) {
*
* @ingroup themeable
*/
-function jquery_drawer_build($menu) {
+function jquery_drawer_show_items($menu) {
global $_jquery_drawer_id;
@@ -157,7 +177,7 @@ function jquery_drawer_build($menu) {
$_jquery_drawer_id = 0;
}
else {
- //$output = '<ul id="drw[ul]['. $_jquery_drawer_id .']" class="hidden">';
+ $output = '<ul id="drw[ul]['. $_jquery_drawer_id .']" class="hidden">';
}
foreach ($menu as $menu_item) {
@@ -175,7 +195,7 @@ function jquery_drawer_build($menu) {
}
}
- //$output .= '</ul>';
+ $output .= '</ul>';
return $output;
}
@@ -213,8 +233,8 @@ function theme_jquery_drawer_javascript() {
* @ingroup themeable
*/
function theme_jquery_drawer_css() {
- drupal_add_css(drupal_get_path('module', 'jquery_drawer') .'/style.css');
drupal_add_css(drupal_get_path('module', 'jquery_drawer') .'/jquery_drawer/drw/styles.css');
+ drupal_add_css(drupal_get_path('module', 'jquery_drawer') .'/jquery_drawer.css');
}
/**
@@ -228,5 +248,10 @@ function theme_jquery_drawer_link($link) {
}
$link['attributes']['rel'] = 'drw';
- return l($link['title'], $link['href'], array('attributes' => array('rel' => 'drw')));
+
+ $output = '<li>';
+ $output .= l($link['title'], $link['href'], array('attributes' => array('rel' => 'drw')));
+ $output .= '</li>';
+
+ return $output;
}