diff options
-rw-r--r-- | jquery_drawer.module | 108 |
1 files changed, 1 insertions, 107 deletions
diff --git a/jquery_drawer.module b/jquery_drawer.module index adaa7bc..276c162 100644 --- a/jquery_drawer.module +++ b/jquery_drawer.module @@ -95,7 +95,7 @@ function jquery_drawer_theme() { /** * Drawer logic. */ -function theme_jquery_drawer($menu_name, $mlid) { +function theme_jquery_drawer() { // Get all terms from a given vocabulary $vocabulary = variable_get('jquery_drawer', '1'); $terms = jquery_drawer_taxonomy_get_tree($vocabulary); @@ -257,112 +257,6 @@ function jquery_drawer_menu_build($term) { } /** - * Build the Drawer. - * - * @TODO - * @ingroup themeable - */ -/*function jquery_drawer_show_items($term) { - - $tree = array(); - $terms = jquery_drawer_taxonomy_get_tree(JQUERY_DRAWER_VOC_ID); - $query = 'SELECT node.nid, node.title, term_node.tid FROM {node} LEFT JOIN - {term_node} ON term_node.nid = node.nid WHERE node.type = "story" - AND term_node.tid = "%d" AND node.status = "1")'; - $result = db_query(db_rewrite_sql($query), $term); - - while ($node = db_fetch_object($result)) { - foreach ($terms as $term) { - // add nodes into the term - if ($node->tid == $term->tid) { - $term->nodes[] = $node; - } - // update an index of terms - $tree[$term->tid] = $term; - } - } - - // add children relationship - foreach ($tree as $term) { - if ($term->parents[0] != 0) { - $tree[$term->parents[0]]->children[] = $term->tid; - } - } - - // build menu with hierarchy - foreach ($tree as $term) { - jquery_drawer_build_tree($tree, $term); - } - - // format output - $output = '<li><a href="'. $GLOBALS['base_url'] .'/sobre">'. t('About') .'</a></li>'; - $output .= '<li>'. t('Location'); - $output .= '<ul id="drw-inner" class="hidden">'; - foreach ($tree as $term) { - $output .= jquery_drawer_menu_build($term); - } - $output .= '</ul></li>'; - - return $output; -} - -/** - * Recursively build the menu. - * - * @ingroup themeable - */ -/*function jquery_drawer_show_items($menu) { - - global $_jquery_drawer_id; - - if ($_jquery_drawer_id == NULL) { - $output = '<ul id="drw_tabs">'; - $output .= implode((array) module_invoke_all('jquery_drawer_build')); - $_jquery_drawer_id = 0; - } - else { - $output = '<ul id="drw[ul]['. $_jquery_drawer_id .']" class="hidden">'; - } - - foreach ($menu as $menu_item) { - if ($menu_item['link']['hidden'] == 0) { - $output .= '<li>'; - if ($menu_item['below'] !== FALSE && jquery_drawer_has_unhidden_submenu($menu_item['below'])) { - $output .= $menu_item['link']['title']; - $_jquery_drawer_id++; - $output .= jquery_drawer_build($menu_item['below']); - } - else { - $output .= theme('jquery_drawer_link', $menu_item['link']); - } - $output .= '</li>'; - } - } - - $output .= '</ul>'; - return $output; - -}*/ - -/** - * Check whether a menu has at least one unhidden submenu. - */ -/*function jquery_drawer_has_unhidden_submenu($menu = FALSE) { - - if ($menu == FALSE) { - return FALSE; - } - - foreach ($menu as $menu_item) { - if ($menu_item['link']['hidden'] == 0) { - return TRUE; - } - } - - return FALSE; -}*/ - -/** * jQuery Drawer Javascript theme function. * * @ingroup themeable |