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

    r10650 r11056  
    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} 
     
    1414        tag_boxes_selector = tag_boxes_selector + prefix + "#tags-" + {$element.ID}; 
    1515{/foreach} 
    16 {literal} 
    17 jQuery(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         }); 
    28    
    29   $("a.preview-box").colorbox(); 
     16 
     17jQuery(document).ready(function() {ldelim} 
     18  jQuery(tag_boxes_selector).tokenInput( 
     19    [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}], 
     20    {ldelim} 
     21      hintText: '{'Type in a search term'|@translate}', 
     22      noResultsText: '{'No results'|@translate}', 
     23      searchingText: '{'Searching...'|@translate}', 
     24      newText: ' ({'new'|@translate})', 
     25      animateDropdown: false, 
     26      preventDuplicates: true, 
     27      allowCreation: true 
     28    } 
     29  ); 
     30 
     31  jQuery("a.preview-box").colorbox(); 
    3032}); 
    31 {/literal}{/footer_script} 
     33{/footer_script} 
    3234 
    3335<h2>{'Batch Manager'|@translate}</h2> 
     
    113115<select id="tags-{$element.ID}" name="tags-{$element.ID}"> 
    114116{foreach from=$element.TAGS item=tag} 
    115   <option value="{$tag.value}" class="selected">{$tag.key}</option> 
     117  <option value="{$tag.id}" class="selected">{$tag.name}</option> 
    116118{/foreach} 
    117119</select> 
Note: See TracChangeset for help on using the changeset viewer.