Changeset 11039 for trunk/admin
- Timestamp:
- May 25, 2011, 11:00:46 AM (13 years ago)
- Location:
- trunk/admin
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/batch_manager.php
r10380 r11039 362 362 363 363 // +-----------------------------------------------------------------------+ 364 // | tags | 365 // +-----------------------------------------------------------------------+ 366 367 $query = ' 368 SELECT 369 id AS tag_id, 370 name AS tag_name 371 FROM '.TAGS_TABLE.' 372 ;'; 373 $template->assign('tags', get_taglist($query)); 374 375 // +-----------------------------------------------------------------------+ 364 376 // | open specific mode | 365 377 // +-----------------------------------------------------------------------+ -
trunk/admin/batch_manager_global.php
r10654 r11039 138 138 else 139 139 { 140 $tag_ids = get_ fckb_tag_ids($_POST['add_tags']);140 $tag_ids = get_tag_ids($_POST['add_tags']); 141 141 add_tags($tag_ids, $collection); 142 142 -
trunk/admin/batch_manager_unit.php
r10648 r11039 109 109 if (isset($_POST[ 'tags-'.$row['id'] ])) 110 110 { 111 $tag_ids = get_ fckb_tag_ids($_POST[ 'tags-'.$row['id'] ]);111 $tag_ids = get_tag_ids($_POST[ 'tags-'.$row['id'] ]); 112 112 set_tags($tag_ids, $row['id']); 113 113 } … … 257 257 WHERE image_id = '.$row['id'].' 258 258 ;'; 259 $tag_selection = get_ fckb_taglist($query);259 $tag_selection = get_taglist($query); 260 260 261 261 $template->append( -
trunk/admin/include/functions.php
r11008 r11039 2098 2098 } 2099 2099 2100 function get_ fckb_taglist($query)2100 function get_taglist($query) 2101 2101 { 2102 2102 $result = pwg_query($query); … … 2120 2120 } 2121 2121 2122 function get_ fckb_tag_ids($raw_tags)2122 function get_tag_ids($raw_tags) 2123 2123 { 2124 2124 // In $raw_tags we receive something like array('~~6~~', '~~59~~', 'New -
trunk/admin/picture_modify.php
r9943 r11039 167 167 if (isset($_POST['tags'])) 168 168 { 169 $tag_ids = get_ fckb_tag_ids($_POST['tags']);169 $tag_ids = get_tag_ids($_POST['tags']); 170 170 } 171 171 set_tags($tag_ids, $_GET['image_id']); … … 234 234 WHERE image_id = '.$_GET['image_id'].' 235 235 ;'; 236 $tags = get_fckb_taglist($query); 236 $tag_selection = get_taglist($query); 237 238 $query = ' 239 SELECT 240 id AS tag_id, 241 name AS tag_name 242 FROM '.TAGS_TABLE.' 243 ;'; 244 $tags = get_taglist($query); 237 245 238 246 // retrieving direct information about picture … … 268 276 $template->assign( 269 277 array( 278 'tag_selection' => $tag_selection, 270 279 'tags' => $tags, 271 280 'U_SYNC' => $admin_url_start.'&sync_metadata=1', -
trunk/admin/themes/default/template/batch_manager_global.tpl
r11008 r11039 10 10 {combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'} 11 11 12 {footer_script require='jquery.tokeninput'}{literal} 13 jQuery(document).ready(function() { 14 jQuery.getJSON('admin.php?fckb_tags=1', function(data) { 15 jQuery("#tags").tokenInput( 16 data, 17 { 18 {/literal} 19 hintText: '{'Type in a search term'|@translate}', 20 noResultsText: '{'No results'|@translate}', 21 searchingText: '{'Searching...'|@translate}', 22 newText: ' ({'new'|@translate})', 23 animateDropdown: false, 24 preventDuplicates: true, 25 allowCreation: true 26 {literal} 27 } 28 ); 29 }); 12 {footer_script require='jquery.tokeninput'} 13 jQuery(document).ready(function() {ldelim} 14 jQuery("#tags").tokenInput( 15 [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}], 16 {ldelim} 17 hintText: '{'Type in a search term'|@translate}', 18 noResultsText: '{'No results'|@translate}', 19 searchingText: '{'Searching...'|@translate}', 20 newText: ' ({'new'|@translate})', 21 animateDropdown: false, 22 preventDuplicates: true, 23 allowCreation: true 24 } 25 ); 30 26 }); 31 {/ literal}{/footer_script}27 {/footer_script} 32 28 33 29 {footer_script} -
trunk/admin/themes/default/template/batch_manager_unit.tpl
r11008 r11039 14 14 tag_boxes_selector = tag_boxes_selector + prefix + "#tags-" + {$element.ID}; 15 15 {/foreach} 16 {literal} 17 jQuery(document).ready(function() { 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 newText: ' ({'new'|@translate})', 27 animateDropdown: false, 28 preventDuplicates: true, 29 allowCreation: true 30 {literal} 31 } 32 ); 33 }); 34 35 $("a.preview-box").colorbox(); 16 17 jQuery(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(); 36 32 }); 37 {/ literal}{/footer_script}33 {/footer_script} 38 34 39 35 <h2>{'Batch Manager'|@translate}</h2> -
trunk/admin/themes/default/template/picture_modify.tpl
r11008 r11039 4 4 5 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} 7 jQuery(document).ready(function() { 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 newText: ' ({'new'|@translate})', 17 animateDropdown: false, 18 preventDuplicates: true, 19 allowCreation: true 20 {literal} 21 } 22 ); 23 }); 6 {footer_script require='jquery.tokeninput'} 7 jQuery(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 ); 24 20 }); 25 {/ literal}{/footer_script}21 {/footer_script} 26 22 27 23 {footer_script} … … 143 139 <td> 144 140 <select id="tags" name="tags"> 145 {foreach from=$tag sitem=tag}141 {foreach from=$tag_selection item=tag} 146 142 <option value="{$tag.id}" class="selected">{$tag.name}</option> 147 143 {/foreach}
Note: See TracChangeset
for help on using the changeset viewer.