mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-07 02:11:26 +02:00
- Add drag&drop to cat_list.
git-svn-id: http://piwigo.org/svn/trunk@2554 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -1,4 +1,26 @@
|
||||
{* $Id$ *}
|
||||
{known_script id="jquery" src=$ROOT_URL|@cat:"template-common/lib/jquery.packed.js"}
|
||||
{known_script id="jquery.ui" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.core.packed.js" }
|
||||
{known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"template-common/lib/ui/ui.sortable.packed.js" }
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery().ready(function(){ldelim}
|
||||
jQuery(".catPos").hide();
|
||||
jQuery('.categoryUl').sortable({ldelim}
|
||||
axis: "y",
|
||||
cursor: "move",
|
||||
opacity: 0.8
|
||||
});
|
||||
jQuery("#categoryOrdering").submit(function(){ldelim}
|
||||
ar = jQuery('.categoryUl').sortable('toArray');
|
||||
for(i=0;i<ar.length;i++) {ldelim}
|
||||
cat = ar[i].split('cat_');
|
||||
document.getElementsByName('catOrd[' + cat[1] + ']')[0].value = i;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<h2>{'title_categories'|@translate}</h2>
|
||||
|
||||
<h3>{$CATEGORIES_NAV}</h3>
|
||||
@@ -22,7 +44,7 @@
|
||||
<ul class="categoryUl">
|
||||
|
||||
{foreach from=$categories item=category}
|
||||
<li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}">
|
||||
<li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}" id="cat_{$category.ID}">
|
||||
<!-- category {$category.ID} -->
|
||||
<ul class="categoryActions">
|
||||
<li><a href="{$category.U_JUMPTO}" title="{'jump to category'|@translate}"><img src="{$themeconf.admin_icon_dir}/category_jump-to.png" class="button" alt="{'jump to category'|@translate}" /></a></li>
|
||||
@@ -46,7 +68,7 @@
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<p class="catPos">
|
||||
<label>
|
||||
{'Position'|@translate} :
|
||||
<input type="text" size="4" name="catOrd[{$category.ID}]" maxlength="4" value="{$category.RANK}" />
|
||||
|
||||
@@ -60,6 +60,7 @@ UL.categoryUl {
|
||||
}
|
||||
|
||||
LI.categoryLi {
|
||||
width: 100%;
|
||||
border: 1px solid gray;
|
||||
padding: 0px 5px;
|
||||
margin-bottom: 5px;
|
||||
|
||||
@@ -67,7 +67,8 @@ INPUT[type="submit"]:hover , INPUT[type="reset"]:hover { color:#f33; cursor: po
|
||||
INPUT.bigbutton:hover { background-color: #222; color:#f33; border: 0; }
|
||||
.throw { font-size: 120%; line-height: 26px; padding-top: 10px; font-weight: bold; }
|
||||
label { cursor:pointer }
|
||||
.virtual_cat { background: #222 !important; }
|
||||
.categoryLi { background: #222 }
|
||||
.virtual_cat { background: #333 !important; }
|
||||
a.Piwigo {
|
||||
font-family: verdana, arial, helvetica, sans-serif !important;
|
||||
font-size: 11px; font-weight: normal; letter-spacing: 0;
|
||||
|
||||
Reference in New Issue
Block a user