Ignore:
Timestamp:
05/25/11 15:33:29 (9 years ago)
Author:
mistic100
Message:

bug:2278 fixed (merge r10970 r11008 r11039 from trunk) replace FCBKcomplete by TokenInput to avoid 3rd tag issue on autocomplete

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/admin/themes/default/template/picture_modify.tpl

    r10421 r11056  
    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} 
    7 jQuery(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         }); 
     5{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'} 
     6{footer_script require='jquery.tokeninput'} 
     7jQuery(document).ready(function() {ldelim} 
     8  jQuery("#tags").tokenInput( 
     9    [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}], 
     10    {ldelim} 
     11      hintText: '{'Type in a search term'|@translate}', 
     12      noResultsText: '{'No results'|@translate}', 
     13      searchingText: '{'Searching...'|@translate}', 
     14      newText: ' ({'new'|@translate})', 
     15      animateDropdown: false, 
     16      preventDuplicates: true, 
     17      allowCreation: true 
     18    } 
     19  ); 
    1820}); 
    19 {/literal}{/footer_script} 
     21{/footer_script} 
    2022 
    2123{footer_script} 
     
    137139        <td> 
    138140<select id="tags" name="tags"> 
    139 {foreach from=$tags item=tag} 
    140   <option value="{$tag.value}" class="selected">{$tag.key}</option> 
     141{foreach from=$tag_selection item=tag} 
     142  <option value="{$tag.id}" class="selected">{$tag.name}</option> 
    141143{/foreach} 
    142144</select> 
Note: See TracChangeset for help on using the changeset viewer.