Changeset 18986 for trunk/admin/themes


Ignore:
Timestamp:
Nov 10, 2012, 1:34:36 PM (12 years ago)
Author:
mistic100
Message:

clean HTML+JS code on cat_list.tpl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/cat_list.tpl

    r17007 r18986  
    33  jQuery(".catPos").hide();
    44  jQuery(".drag_button").show();
     5  jQuery("#manualOrder").hide();
    56  jQuery(".categoryLi").css("cursor","move");
    67  jQuery(".categoryUl").sortable({
     
    1011      jQuery("#manualOrder").show();
    1112      jQuery("#notManualOrder").hide();
    12       jQuery("#autoOrder").hide();
    13       jQuery("#createAlbum").hide();
     13      jQuery("#formAutoOrder").hide();
     14      jQuery("#formCreateAlbum").hide();
    1415    },
    1516  });
     
    3132
    3233  jQuery("#addAlbumOpen").click(function(){
    33     jQuery("#createAlbum").toggle();
     34    jQuery("#formCreateAlbum").toggle();
    3435    jQuery("input[name=virtual_name]").focus();
    35     jQuery("#autoOrder").hide();
     36    jQuery("#formAutoOrder").hide();
    3637  });
    3738
    3839  jQuery("#addAlbumClose").click(function(){
    39     jQuery("#createAlbum").hide();
     40    jQuery("#formCreateAlbum").hide();
    4041  });
    4142
    4243
    4344  jQuery("#autoOrderOpen").click(function(){
    44     jQuery("#autoOrder").toggle();
    45     jQuery("#createAlbum").hide();
     45    jQuery("#formAutoOrder").toggle();
     46    jQuery("#formCreateAlbum").hide();
    4647  });
    4748
    4849  jQuery("#autoOrderClose").click(function(){
    49     jQuery("#autoOrder").hide();
     50    jQuery("#formAutoOrder").hide();
    5051  });
    5152
     
    5960
    6061<h2><span style="letter-spacing:0">{$CATEGORIES_NAV}</span> &#8250; {'Album list management'|@translate}</h2>
    61 <p class="showCreateAlbum">
    62   <span id="notManualOrder">
    63     <a href="#" id="addAlbumOpen">{'create a new album'|@translate}</a>
    64     {if count($categories) }| <a href="#" id="autoOrderOpen">{'apply automatic sort order'|@translate}</a>{/if}
    65   </span>
     62<p class="showCreateAlbum" id="notManualOrder">
     63  <a href="#" id="addAlbumOpen">{'create a new album'|@translate}</a>
     64  {if count($categories)}| <a href="#" id="autoOrderOpen">{'apply automatic sort order'|@translate}</a>{/if}
    6665</p>
    67 <form id="formCreateAlbum" action="{$F_ACTION}" method="post">
    68   <p>
    69   <fieldset id="createAlbum" style="display:none;">
     66<form id="formCreateAlbum" action="{$F_ACTION}" method="post" style="display:none;">
     67  <fieldset>
    7068      <legend>{'create a new album'|@translate}</legend>
    7169      <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
    72       <p><strong>{'Album name'|@translate}</strong>
    73         <br><input type="text" name="virtual_name" maxlength="255">
     70     
     71      <p>
     72        <strong>{'Album name'|@translate}</strong><br>
     73        <input type="text" name="virtual_name" maxlength="255">
    7474      </p>
    75       <span class="actionButtons">
    76         <input class="submit" type="submit" value="{'Create'|@translate}" name="submitAdd">
     75     
     76      <p class="actionButtons">
     77        <input class="submit" name="submitAdd" type="submit" value="{'Create'|@translate}">
    7778        <a href="#" id="addAlbumClose">{'Cancel'|@translate}</a>
    78       </span>
     79      </p>
    7980  </fieldset>
    80   </p>
    8181</form>
    82 <form id="categoryOrdering" action="{$F_ACTION}" method="post">
    83 <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
    84 {if count($categories) }
    85   <fieldset id="autoOrder" style="display:none;">
     82{if count($categories)}
     83<form id="formAutoOrder" action="{$F_ACTION}" method="post" style="display:none;">
     84  <fieldset>
    8685    <legend>{'Automatic sort order'|@translate}</legend>
     86    <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
     87   
    8788    <p><strong>{'Sort order'|@translate}</strong>
    8889      <br><label><input type="radio" value="asc" name="ascdesc" checked="checked">{'ascending'|@translate}</label>
     
    99100    </p>
    100101  </fieldset>
     102</form>
    101103{/if}
    102 <p>
    103   <span id="manualOrder" style="display:none;">
     104
     105<form id="categoryOrdering" action="{$F_ACTION}" method="post">
     106  <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
     107  <p id="manualOrder">
    104108    <input class="submit" name="submitManualOrder" type="submit" value="{'Save manual order'|@translate}">
    105109    {'... or '|@translate} <a href="#" id="cancelManualOrder">{'cancel manual order'|@translate}</a>
    106   </span>
    107 </p>
    108 {if count($categories) }
     110  </p>
    109111 
     112{if count($categories)}
    110113  <ul class="categoryUl">
    111 
    112114    {foreach from=$categories item=category}
    113115    <li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}" id="cat_{$category.ID}">
    114116      <!-- category {$category.ID} -->
    115117      <p class="albumTitle">
    116 <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
    117       <strong><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|@translate}">{$category.NAME}</a></strong>
     118        <img src="{$themeconf.admin_icon_dir}/cat_move.png" class="button drag_button" style="display:none;" alt="{'Drag to re-order'|@translate}" title="{'Drag to re-order'|@translate}">
     119        <strong><a href="{$category.U_CHILDREN}" title="{'manage sub-albums'|@translate}">{$category.NAME}</a></strong>
    118120      </p>
    119121
     
    138140      {/if}
    139141      {if cat_admin_access($category.ID)}
    140       |
    141       <a href="{$category.U_JUMPTO}">{'jump to album'|@translate} →</a>
     142        | <a href="{$category.U_JUMPTO}">{'jump to album'|@translate} →</a>
    142143      {/if}
    143144      </p>
Note: See TracChangeset for help on using the changeset viewer.