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/picture_modify.tpl

    r10422 r10970  
    33{include file='include/datepicker.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'}{literal}
     5{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
     6{footer_script require='jquery.tokeninput'}{literal}
    77jQuery(document).ready(function() {
    8         jQuery("#tags").fcbkcomplete({
    9                 json_url: "admin.php?fckb_tags=1",
    10                 cache: false,
    11                 filter_case: false,
    12                 filter_hide: true,
    13                 firstselected: true,
    14                 filter_selected: true,
    15                 maxitems: 100,
    16                 newel: true
    17         });
     8  jQuery.getJSON('admin.php?fckb_tags=1', function(data) {
     9    jQuery("#tags").tokenInput(
     10      data,
     11      {
     12    {/literal}
     13        hintText: '{'Type in a search term'|@translate}',
     14        noResultsText: '{'No results'|@translate}',
     15        searchingText: '{'Searching...'|@translate}',
     16        animateDropdown: false,
     17        preventDuplicates: true,
     18        allowCreation: true
     19    {literal}
     20      }
     21    );
     22  });
    1823});
    1924{/literal}{/footer_script}
     
    138143<select id="tags" name="tags">
    139144{foreach from=$tags item=tag}
    140   <option value="{$tag.value}" class="selected">{$tag.key}</option>
     145  <option value="{$tag.id}" class="selected">{$tag.name}</option>
    141146{/foreach}
    142147</select>
Note: See TracChangeset for help on using the changeset viewer.