Ignore:
Timestamp:
May 21, 2011, 2:25:26 AM (13 years ago)
Author:
mistic100
Message:

remplace FCBKcomplete by TokenInput

File:
1 edited

Legend:

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

    r10648 r10970  
    33{include file='include/colorbox.inc.tpl'}
    44
    5 {combine_script id='jquery.fcbkcomplete' load='async' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'}
    6 {footer_script require='jquery.fcbkcomplete'}
     5{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
     6{footer_script require='jquery.tokeninput'}
    77var tag_boxes_selector = "";
    88{foreach from=$elements item=element name=element}
     
    1616{literal}
    1717jQuery(document).ready(function() {
    18         $(tag_boxes_selector).fcbkcomplete({
    19                 json_url: "admin.php?fckb_tags=1",
    20                 cache: false,
    21                 filter_case: false,
    22                 filter_hide: true,
    23                 firstselected: true,
    24                 filter_selected: true,
    25                 maxitems: 100,
    26                 newel: true
    27         });
     18  jQuery.getJSON('admin.php?fckb_tags=1', function(data) {
     19    jQuery(tag_boxes_selector).tokenInput(
     20      data,
     21      {
     22    {/literal}
     23        hintText: '{'Type in a search term'|@translate}',
     24        noResultsText: '{'No results'|@translate}',
     25        searchingText: '{'Searching...'|@translate}',
     26        animateDropdown: false,
     27        preventDuplicates: true,
     28        allowCreation: true
     29    {literal}
     30      }
     31    );
     32  });
    2833 
    2934  $("a.preview-box").colorbox();
     
    113118<select id="tags-{$element.ID}" name="tags-{$element.ID}">
    114119{foreach from=$element.TAGS item=tag}
    115   <option value="{$tag.value}" class="selected">{$tag.key}</option>
     120  <option value="{$tag.id}" class="selected">{$tag.name}</option>
    116121{/foreach}
    117122</select>
Note: See TracChangeset for help on using the changeset viewer.