{combine_script id="jquery.ui.draggable"} {combine_script id="jquery.ui.droppable"} {combine_script id="farbtastic" require="jquery" path=$ROOT_URL|@cat:"plugins/typetags/admin/farbtastic/farbtastic.js"} {combine_css path=$ROOT_URL|@cat:"plugins/typetags/admin/farbtastic/farbtastic.css"} {combine_css path=$ROOT_URL|@cat:"plugins/typetags/admin/typetags_style.css"} {footer_script} {literal} $(document).ready(function(){ // colorpicker $('#colorpicker').farbtastic('#hexval'); // déplace chaque élément dans la bonne case jQuery('ul#tt-NULL li').each(function() { var $target = jQuery('ul#' + jQuery(this).attr('title')); jQuery(this).appendTo($target).css('float', 'left'); }); // initialise les déplacement jQuery("li").draggable({ revert: "invalid", helper: "clone", cursor: "move" }); // initialise le dépôt jQuery('.tt-container').droppable({ accept: "li", hoverClass: "active", drop: function(event, ui) { var $gallery = this; ui.draggable.fadeOut(function() { jQuery(this).appendTo($gallery).fadeIn(); equilibrate(); // on rééquilibre les colonnes à chaque déplacement }); } }); // équilibrage des colonnes equilibrate(); }); function equilibrate() { jQuery("#associations").each(function(){ var h=0; jQuery("> ul", this).css('height', 'auto') .each(function(){ h=Math.max(h,jQuery(this).height()); }) .css({'height': h+'px'}); }); } // génération des couples tag:typetag avant de valider le formulaire function save_datas(form) { var out = ''; jQuery(".tt-container").each(function(){ var section = jQuery(this).attr('id'); jQuery("> li", this).each(function(){ out += jQuery(this).attr('id') + ':' + section + ';'; }); }); jQuery('#assoc-input').val(out); submit(form); } {/literal} {/footer_script}

TypeT@gs

{if isset($edited_typetag)} {'Edit typetag'|@translate}

{'Edited TypeTag'|@translate} :

 

{'New name'|@translate} :

{'New color'|@translate} :

 

{else} {'Create a Typetag'|@translate}

 

{'New TypeTag'|@translate} :

{'Color TypeTag'|@translate} :

 

{/if}
{if !empty($typetags_selection)}
{'TypeTag selection'|@translate}
{/if}
{if !empty($typetags_association) and !empty($typetags_selection)}
{'TypeTag association'|@translate}
{foreach from=$typetags_selection item=typetag}
    {$typetag.name}
{/foreach}

{/if}