Changeset 10980 for extensions/SmartAlbums/template/cat_modify.tpl
- Timestamp:
- May 21, 2011, 6:16:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/SmartAlbums/template/cat_modify.tpl
r10871 r10980 1 1 {combine_css path=$SMART_PATH|@cat:"template/style.css"} 2 2 {include file='include/datepicker.inc.tpl'} 3 {combine_script id='jquery. fcbkcomplete' load='async' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'}3 {combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'} 4 4 5 {footer_script require='jquery ,jquery.fcbkcomplete'}5 {footer_script require='jquery.tokeninput'} 6 6 var lang = new Array(); 7 7 lang['tags filter'] = "{'tags filter'|@translate}"; … … 34 34 $('input[name="is_smart"]').change(function() { 35 35 $('#SmartAlbum_options').toggle(); 36 $('input[name="count _images"]').toggle();36 $('input[name="countImages"]').toggle(); 37 37 }); 38 38 39 $('input[name="count _images"]').click(function() {40 count _images($(this).closest('form'));39 $('input[name="countImages"]').click(function() { 40 countImages($(this).closest('form')); 41 41 return false; 42 42 }); 43 43 44 44 function add_filter(type) { 45 // add line 45 46 $('<li class="filter_'+ type +'" id="filter_'+ i +'"></li>').appendTo('#filterList'); 46 47 47 $('#filter_'+ i).html( 48 '<a href="#" class="removeFilter" title="'+ lang['remove this filter'] +'"><span>[x]</span></a>'+ 49 '<input type="hidden" name="filters['+ i +'][type]" value="'+ type +'"/>'+ 50 ' '+ lang[type +' filter'] + 51 52 ' <select name="filters['+ i +'][cond]">'+ options[type] +'</select>'+ 53 ' <input type="text" name="filters['+ i +'][value]"/>' 54 ); 48 //set content 49 content = '<a href="#" class="removeFilter" title="'+ lang['remove this filter'] +'"><span>[x]</span></a>'+ 50 '<input type="hidden" name="filters['+ i +'][type]" value="'+ type +'"/> '+ lang[type +' filter'] + 51 ' <select name="filters['+ i +'][cond]">'+ options[type] +'</select>'; 55 52 56 // reinit handler 53 if (type == 'tags') { 54 content += ' <select name="filters['+ i +'][value]" class="tagSelect"></select>'; 55 } else { 56 content += ' <input type="text" name="filters['+ i +'][value]"/>'; 57 } 58 59 $('#filter_'+ i).html(content); 60 61 // reinit handlers 57 62 init_jquery_handlers(); 58 63 i++; … … 69 74 }); 70 75 71 $('.filter_tags input[type="text"]').each(function() {72 if ($(this).hasClass('fcbk_initialized') == false) {73 $(this).fcbkcomplete({74 json_url: "admin.php?fckb_tags=1",75 cache: false,76 filter_case: false,77 filter_hide: true,78 firstselected: true,79 filter_selected: true,80 maxitems: 100,81 newel: false82 });83 $(this).addClass('fcbk_initialized');84 }76 jQuery.getJSON('admin.php?fckb_tags=1', function(data) { 77 jQuery(".tagSelect").tokenInput( 78 data, 79 { 80 {/literal} 81 hintText: '{'Type in a search term'|@translate}', 82 noResultsText: '{'No results'|@translate}', 83 searchingText: '{'Searching...'|@translate}', 84 animateDropdown: false, 85 preventDuplicates: true, 86 allowCreation: true 87 {literal} 88 } 89 ); 85 90 }); 86 91 } 87 92 88 function count _images(form) {93 function countImages(form) { 89 94 {/literal} 90 95 jQuery.post("{$COUNT_SCRIPT_URL}", 'cat_id={$CAT_ID}&'+form.serialize(), … … 122 127 </select> 123 128 129 {if $filter.TYPE == 'tags'} 130 <select name="filters[{$i}][value]" class="tagSelect"> 131 {foreach from=$filter.VALUE item=tag} 132 <option value="{$tag.id}" class="selected">{$tag.name}</option> 133 {/foreach} 134 </select> 135 {else} 124 136 <input type="text" name="filters[{$i}][value]" value="{$filter.VALUE}"/> 137 {/if} 125 138 </li> 126 139 {counter} … … 144 157 <p class="actionButtons" id="applyFilterBlock"> 145 158 <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitFilters"/> 146 <input class="submit" type="submit" value="{'Count'|@translate}" name="count _images" {if !isset($filters)}style="display:none;"{/if}/>159 <input class="submit" type="submit" value="{'Count'|@translate}" name="countImages" {if !isset($filters)}style="display:none;"{/if}/> 147 160 <span class="count_images_display">{$IMAGE_COUNT}</span> 148 161 </p>
Note: See TracChangeset
for help on using the changeset viewer.