Changeset 2554


Ignore:
Timestamp:
Sep 20, 2008, 3:04:01 AM (16 years ago)
Author:
patdenice
Message:
  • Add drag&drop to cat_list.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/template/goto/cat_list.tpl

    r2534 r2554  
    11{* $Id$ *}
     2{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
     3{known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js" }
     4{known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.sortable.packed.js" }
     5
     6<script type="text/javascript">
     7  jQuery().ready(function(){ldelim}
     8    jQuery(".catPos").hide();
     9    jQuery('.categoryUl').sortable({ldelim}
     10      axis: "y",
     11      cursor: "move",
     12      opacity: 0.8
     13    });
     14    jQuery("#categoryOrdering").submit(function(){ldelim}
     15      ar = jQuery('.categoryUl').sortable('toArray');
     16      for(i=0;i<ar.length;i++) {ldelim}
     17        cat = ar[i].split('cat_');
     18        document.getElementsByName('catOrd[' + cat[1] + ']')[0].value = i;
     19      }
     20    });
     21  });
     22</script>
     23
    224<h2>{'title_categories'|@translate}</h2>
    325
     
    2345
    2446    {foreach from=$categories item=category}
    25     <li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}">
     47    <li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}" id="cat_{$category.ID}">
    2648      <!-- category {$category.ID} -->
    2749      <ul class="categoryActions">
     
    4769      </p>
    4870
    49       <p>
     71      <p class="catPos">
    5072        <label>
    5173          {'Position'|@translate} :
  • trunk/admin/template/goto/default-layout.css

    r2552 r2554  
    6161
    6262LI.categoryLi {
     63  width: 100%;
    6364  border: 1px solid gray;
    6465  padding: 0px 5px;
  • trunk/admin/template/goto/theme/roma/theme.css

    r2552 r2554  
    6868.throw  { font-size: 120%; line-height: 26px; padding-top: 10px; font-weight: bold; }
    6969label { cursor:pointer }
    70 .virtual_cat { background: #222 !important; }
     70.categoryLi { background: #222 }
     71.virtual_cat { background: #333 !important; }
    7172a.Piwigo {
    7273  font-family: verdana, arial, helvetica, sans-serif !important;
Note: See TracChangeset for help on using the changeset viewer.