Ignore:
Timestamp:
Dec 28, 2010, 8:00:56 PM (10 years ago)
Author:
rvelices
Message:

rv_menutree - minified/stripped html because it is half of the html size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_menutree/trunk/template/rv_menutree_categories.tpl

    r8308 r8363  
    11{html_head}
    22<style type="text/css">
    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;}
    4 /*.rvTree */.liOpen .bullet {ldelim}cursor:pointer;background-position:-38px center;}
    5 /*.rvTree */.liClosed .bullet {ldelim}cursor:pointer;background-position:-19px center;}
    6 /*.rvTree */.liBullet .bullet {ldelim}cursor:default;background-position:0 center;}
    7 /*.rvTree */.liClosed ul {ldelim}display:none;}
     3li .bullet {ldelim}padding-left:14px;margin-left:0;background:url({$ROOT_URL}plugins/{$RVMT_BASE_NAME}/img/bpm.gif) no-repeat scroll;}
     4.liOpen .bullet {ldelim}cursor:pointer;background-position:-38px center;}
     5.liClosed .bullet {ldelim}cursor:pointer;background-position:-19px center;}
     6.liBullet .bullet {ldelim}cursor:default;background-position:0 center;}
     7.liClosed ul {ldelim}display:none;}
    88</style>
    99{/html_head}
     
    1818</dt>
    1919<dd>
     20{strip}
    2021{assign var='ref_level' value=0}
    2122{foreach from=$block->data.MENU_CATEGORIES item=cat key=key}
    2223        {if $cat.LEVEL > $ref_level}
    23                 {if $ref_level == 0}
    24                         <ul class="rvTree" id="theCategoryMenu">
    25                 {else}
    26                         <ul>
    27                 {/if}
     24                <ul{if $ref_level == 0} class="rvTree" id="theCategoryMenu"{/if}>
    2825        {else}
    29         </li>
    30         {'</ul></li>'|@str_repeat:$ref_level-$cat.LEVEL}
     26                </li>
     27                {'</ul></li>'|@str_repeat:$ref_level-$cat.LEVEL}
    3128        {/if}
    3229        {if $cat.SELECTED}
     
    4239                {/if}
    4340        {/if}
    44         <li{if !empty($liclass)} class="{$liclass}"{/if}>
    45                 <a href="{$cat.URL}" {if $cat.IS_UPPERCAT}rel="up"{/if}>{$cat.NAME}</a>
     41        <li{if !empty($liclass)} class="{$liclass}"{/if}> <a href="{$cat.URL}"{if $cat.IS_UPPERCAT} rel="up"{/if}>{$cat.NAME}</a>
    4642                {if $cat.count_images > 0}
    47                 <span class="{if $cat.nb_images > 0}menuInfoCat{else}menuInfoCatByChild{/if}" title="{$cat.TITLE}">[{$cat.count_images}]</span>
     43                        <span{if $cat.nb_images <= 0} class="menuInfoCatByChild"{/if} title="{$cat.TITLE}"> [{$cat.count_images}] </span>
    4844                {/if}
    4945                {if !empty($cat.icon_ts)}
    50                 <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" class="icon" alt="(!)">
     46                        <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" alt="(!)">
    5147                {/if}
    5248        {assign var='ref_level' value=$cat.LEVEL}
    5349{/foreach}
    5450{'</li></ul>'|@str_repeat:$ref_level}
     51{/strip}
     52{combine_script id='rvmt' load='async' path="plugins/`$RVMT_BASE_NAME`/js/rvtree.min.js"}
    5553<script type="text/javascript">
    5654        var _rvTreeAutoQueue = _rvTreeAutoQueue || [];
    5755        _rvTreeAutoQueue.push(  document.getElementById("theCategoryMenu") );
    58         (function () {ldelim}
    59         var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '{$ROOT_URL}plugins/{$RVMT_BASE_NAME}/js/rvtree.min.js';
    60         var s0 = document.getElementsByTagName('script')[0]; s0.parentNode.insertBefore(s, s0);
    61         })();
    6256</script>
    6357        {if isset($block->data.U_UPLOAD)}
Note: See TracChangeset for help on using the changeset viewer.