Changeset 7814


Ignore:
Timestamp:
Nov 18, 2010, 10:09:23 PM (10 years ago)
Author:
rvelices
Message:

rv_menutree small modifs

Location:
extensions/rv_menutree/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_menutree/trunk/changelog.txt

    r6608 r7814  
    1 2.1.c
    2         - improved javascript (faster, async loading in browser, better compressed zith google closure compiler)
    3 
    412.1.b
    52        - themes can define their own rv_menutree_categories.tpl
     3        - improved javascript (faster, async loading in browser, better compressed zith google closure compiler)
    64
    752.1.a
  • extensions/rv_menutree/trunk/main.inc.php

    r6509 r7814  
    88*/
    99
    10 if (!function_exists('rv_ua_is_handheld'))
    11 {
    12         function rv_ua_is_handheld()
    13         {
    14                 if ( isset($_SESSION['is_handheld']) )
    15                         return $_SESSION['is_handheld'];
    16                 $ret=false;
    17                 if ( strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry')!==false )
    18                         $ret=true;
    19                 if ( session_id()!="" )
    20                         $_SESSION['is_handheld']=$ret;
    21                 return $ret;
    22         }
    23 }
    24 
    2510add_event_handler('get_categories_menu_sql_where', 'rv_mt_get_categories_menu_sql_where', EVENT_HANDLER_PRIORITY_NEUTRAL, 3 );
    2611
    2712function rv_mt_get_categories_menu_sql_where($where, $expand, $filter)
    2813{
    29         if (rv_ua_is_handheld()) return $where;
    3014        add_event_handler('blockmanager_apply', 'rv_mt_menubar_categories');
    3115
     
    5337                global $template, $page;
    5438
    55                 $rvmt_path = 'plugins/'. basename(dirname(__FILE__)).'/';
    56                 $template->set_template_dir(PHPWG_ROOT_PATH.$rvmt_path.'template/');
     39                $rvmt_base_name  = basename(dirname(__FILE__));
     40                $template->set_template_dir(PHPWG_ROOT_PATH.'plugins/'.$rvmt_base_name.'/template/');
    5741                $template->assign(array(
    58                         'RVMT_PATH' => get_root_url().$rvmt_path,
     42                        'RVMT_BASE_NAME' => $rvmt_base_name,
    5943                        'RVMT_UPPER_IDS' => isset($page['category']['uppercats']) ? array_flip( explode(',', $page['category']['uppercats'])) : null,
    6044                        )
  • extensions/rv_menutree/trunk/template/rv_menutree_categories.tpl

    r6608 r7814  
    11{html_head}
    22<style type="text/css">
    3 .rvTree li .bullet {ldelim}padding-left:14px;margin-left:0;background:url({$RVMT_PATH}img/bpm.gif) no-repeat scroll;}
     3.rvTree li .bullet {ldelim}padding-left:14px;margin-left:0;background:url({$ROOT_URL}plugins/{$RVMT_BASE_NAME}/img/bpm.gif) no-repeat scroll;}
    44.rvTree li.liOpen .bullet {ldelim}cursor:pointer;background-position:-38px center;}
    55.rvTree li.liClosed .bullet {ldelim}cursor:pointer;background-position:-19px center;}
     
    5656        rvTreeAutoConvert = document.getElementById("theCategoryMenu");
    5757        (function () {ldelim}
    58         var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '{$RVMT_PATH|@cat:"js/rvtree-min.js"}';
     58        var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '{$ROOT_URL}plugins/{$RVMT_BASE_NAME}/js/rvtree-min.js';
    5959        var s0 = document.getElementsByTagName('script')[0]; s0.parentNode.insertBefore(s, s0);
    6060        })();
    61   //RVTree.convertTree( document.getElementById("theCategoryMenu") );
    6261</script>
    6362        {if isset($block->data.U_UPLOAD)}
Note: See TracChangeset for help on using the changeset viewer.