Changeset 11056 for branches/2.2/admin
- Timestamp:
- May 25, 2011, 3:33:29 PM (13 years ago)
- Location:
- branches/2.2/admin
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/admin/batch_manager.php
r10381 r11056 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 // +-----------------------------------------------------------------------+ -
branches/2.2/admin/batch_manager_global.php
r10381 r11056 124 124 else 125 125 { 126 $tag_ids = get_ fckb_tag_ids($_POST['add_tags']);126 $tag_ids = get_tag_ids($_POST['add_tags']); 127 127 add_tags($tag_ids, $collection); 128 128 -
branches/2.2/admin/batch_manager_unit.php
r10650 r11056 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( -
branches/2.2/admin/include/functions.php
r10111 r11056 2101 2101 } 2102 2102 2103 function get_ fckb_taglist($query)2103 function get_taglist($query) 2104 2104 { 2105 2105 $result = pwg_query($query); 2106 2106 2107 $taglist = array(); 2107 2108 while ($row = pwg_db_fetch_assoc($result)) … … 2110 2111 $taglist, 2111 2112 array( 2112 ' key' => $row['tag_name'],2113 ' value' => '~~'.$row['tag_id'].'~~',2113 'name' => $row['tag_name'], 2114 'id' => '~~'.$row['tag_id'].'~~', 2114 2115 ) 2115 2116 ); 2116 2117 } 2117 2118 2119 $cmp = create_function('$a,$b', 'return strcasecmp($a["name"], $b["name"]);'); 2120 usort($taglist, $cmp); 2121 2118 2122 return $taglist; 2119 2123 } 2120 2124 2121 function get_ fckb_tag_ids($raw_tags)2125 function get_tag_ids($raw_tags) 2122 2126 { 2123 2127 // In $raw_tags we receive something like array('~~6~~', '~~59~~', 'New … … 2127 2131 2128 2132 $tag_ids = array(); 2133 $raw_tags = explode(',',$raw_tags); 2129 2134 2130 2135 foreach ($raw_tags as $raw_tag) -
branches/2.2/admin/picture_modify.php
r9943 r11056 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', -
branches/2.2/admin/themes/default/template/batch_manager_global.tpl
r10421 r11056 6 6 {/literal}{/footer_script} 7 7 8 {combine_script id='jquery.fcbkcomplete' load='footer' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'} 9 10 {footer_script require='jquery.fcbkcomplete'}{literal} 11 jQuery(document).ready(function() { 12 jQuery("#tags").fcbkcomplete({ 13 json_url: "admin.php?fckb_tags=1", 14 cache: false, 15 filter_case: false, 16 filter_hide: true, 17 firstselected: true, 18 filter_selected: true, 19 maxitems: 100, 20 newel: true 21 }); 8 {combine_script id='jquery.tokeninput' load='footer' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'} 9 10 {footer_script require='jquery.tokeninput'} 11 jQuery(document).ready(function() {ldelim} 12 jQuery("#tags").tokenInput( 13 [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}], 14 {ldelim} 15 hintText: '{'Type in a search term'|@translate}', 16 noResultsText: '{'No results'|@translate}', 17 searchingText: '{'Searching...'|@translate}', 18 newText: ' ({'new'|@translate})', 19 animateDropdown: false, 20 preventDuplicates: true, 21 allowCreation: true 22 } 23 ); 22 24 }); 23 {/ literal}{/footer_script}25 {/footer_script} 24 26 25 27 {footer_script} -
branches/2.2/admin/themes/default/template/batch_manager_unit.tpl
r10650 r11056 3 3 {include file='include/colorbox.inc.tpl'} 4 4 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'} 7 7 var tag_boxes_selector = ""; 8 8 {foreach from=$elements item=element name=element} … … 14 14 tag_boxes_selector = tag_boxes_selector + prefix + "#tags-" + {$element.ID}; 15 15 {/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 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(); 30 32 }); 31 {/ literal}{/footer_script}33 {/footer_script} 32 34 33 35 <h2>{'Batch Manager'|@translate}</h2> … … 113 115 <select id="tags-{$element.ID}" name="tags-{$element.ID}"> 114 116 {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> 116 118 {/foreach} 117 119 </select> -
branches/2.2/admin/themes/default/template/picture_modify.tpl
r10421 r11056 3 3 {include file='include/datepicker.inc.tpl'} 4 4 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'} 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 ); 18 20 }); 19 {/ literal}{/footer_script}21 {/footer_script} 20 22 21 23 {footer_script} … … 137 139 <td> 138 140 <select id="tags" name="tags"> 139 {foreach from=$tag sitem=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> 141 143 {/foreach} 142 144 </select> -
branches/2.2/admin/themes/default/theme.css
r10650 r11056 586 586 } 587 587 588 /* jQuery FCBKcomplete */589 /* TextboxList sample CSS */590 ul.holder { margin: 0; border: 1px solid #999; overflow: hidden; height: auto !important; height: 1%; padding: 4px 5px 0; }591 *:first-child+html ul.holder { padding-bottom: 2px; } * html ul.holder { padding-bottom: 2px; } /* ie7 and below */592 ul.holder li { float: left; list-style-type: none; margin: 0 5px 4px 0; white-space:nowrap;}593 ul.holder li.bit-box, ul.holder li.bit-input input { font: 11px "Lucida Grande", "Verdana"; }594 ul.holder li.bit-box { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; border: 1px solid #CAD8F3; background: #DEE7F8; padding: 1px 5px 2px; }595 ul.holder li.bit-box-focus { border-color: #598BEC; background: #598BEC; color: #fff; }596 ul.holder li.bit-input input { width: auto; overflow:visible; margin: 0; border: 0px; outline: 0; padding: 3px 0px 2px; } /* no left/right padding here please */597 ul.holder li.bit-input input.smallinput { width: 20px; }598 599 /* Facebook demo CSS */600 #add { border: 1px solid #999; width: 550px; margin: 50px; padding: 20px 30px 10px; }601 form ol li { list-style-type: none; }602 form ol { font: 11px "Lucida Grande", "Verdana"; margin: 0; padding: 0; }603 form ol li.input-text { margin-bottom: 10px; list-style-type: none; padding-bottom: 10px; }604 form ol li.input-text label { font-weight: bold; cursor: pointer; display: block; font-size: 13px; margin-bottom: 10px; }605 form ol li.input-text input { width: 500px; padding: 5px 5px 6px; font: 11px "Lucida Grande", "Verdana"; border: 1px solid #999; }606 form ul.holder { width: 500px; }607 form ul { margin: 0 !important }608 ul.holder li.bit-box, #apple-list ul.holder li.bit-box { padding-right: 15px; position: relative; z-index:1000;}609 #apple-list ul.holder li.bit-input { margin: 0; }610 #apple-list ul.holder li.bit-input input.smallinput { width: 5px; }611 ul.holder li.bit-hover { background: #BBCEF1; border: 1px solid #6D95E0; }612 ul.holder li.bit-box-focus { border-color: #598BEC; background: #598BEC; color: #fff; }613 ul.holder li.bit-box a.closebutton { position: absolute; right: 4px; top: 5px; display: block; width: 7px; height: 7px; font-size: 1px; background: url(icon/fcbkcomplete_close.gif); }614 ul.holder li.bit-box a.closebutton:hover { background-position: 7px; }615 ul.holder li.bit-box-focus a.closebutton, ul.holder li.bit-box-focus a.closebutton:hover { background-position: bottom; }616 617 /* Autocompleter */618 619 .facebook-auto { display: none; position: absolute; width: 512px; background: #eee; }620 .facebook-auto .default { padding: 5px 7px; border: 1px solid #ccc; border-width: 0 1px 1px;font-family:"Lucida Grande","Verdana"; font-size:11px; }621 .facebook-auto ul { display: none; margin: 0; padding: 0; overflow: auto; position:absolute; z-index:9999}622 .facebook-auto ul li { padding: 5px 12px; z-index: 1000; cursor: pointer; margin: 0; list-style-type: none; border: 1px solid #ccc; border-width: 0 1px 1px; font: 11px "Lucida Grande", "Verdana"; background-color: #eee }623 .facebook-auto ul li em { font-weight: bold; font-style: normal; background: #ccc; }624 .facebook-auto ul li.auto-focus { background: #4173CC; color: #fff; }625 .facebook-auto ul li.auto-focus em { background: none; }626 .deleted { background-color:#4173CC !important; color:#ffffff !important;}627 .hidden { display:none;}628 629 #demo ul.holder li.bit-input input { padding: 2px 0 1px; border: 1px solid #999; }630 .ie6fix {height:1px;width:1px; position:absolute;top:0px;left:0px;z-index:1;}631 632 588 /* Add photos, direct mode */ 633 589 #uploadBoxes P { … … 1046 1002 #batchManagerGlobal .useFilterCheckbox {display:none} 1047 1003 1004 1005 /* TokenInput (with Facebook style) */ 1006 ul.token-input-list {overflow: hidden; height: auto !important; height: 1%;width: 400px;border: 1px solid #8496ba;cursor: text;font-size: 12px;font-family: Verdana;min-height: 1px;z-index: 999;margin: 0;padding: 0;background-color: #fff;list-style-type: none;clear: left;} 1007 ul.token-input-list li input {border: 0;width: 100px;padding: 3px 8px;background-color: white;margin: 2px 0;-webkit-appearance: caret;} 1008 li.token-input-token {overflow: hidden; height: auto !important; height: 15px;margin: 3px;padding: 1px 3px;background-color: #eff2f7;color: #000;cursor: default;border: 1px solid #ccd5e4;font-size: 11px;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;float: left;white-space: nowrap;} 1009 li.token-input-token p {display: inline;padding: 0;margin: 0;} 1010 li.token-input-token span {color: #a6b3cf;margin-left: 5px;font-weight: bold;cursor: pointer;} 1011 li.token-input-selected-token {background-color: #5670a6;border: 1px solid #3b5998;color: #fff;} 1012 li.token-input-input-token {float: left;margin: 0;padding: 0;list-style-type: none;width:10px;} 1013 div.token-input-dropdown {position: absolute;width: 400px;background-color: #fff;overflow: hidden;border-left: 1px solid #ccc;border-right: 1px solid #ccc;border-bottom: 1px solid #ccc;cursor: default;font-size: 11px;font-family: Verdana;z-index: 1;} 1014 div.token-input-dropdown p {margin: 0;padding: 5px;font-weight: bold;color: #777;} 1015 div.token-input-dropdown ul {margin: 0;padding: 0;} 1016 div.token-input-dropdown ul li {background-color: #fff;padding: 3px;margin: 0;list-style-type: none;} 1017 div.token-input-dropdown ul li.token-input-dropdown-item {background-color: #fff;} 1018 div.token-input-dropdown ul li.token-input-dropdown-item2 {background-color: #fff;} 1019 div.token-input-dropdown ul li em {font-weight: bold;font-style: normal;} 1020 div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-color: #3b5998;color: #fff;} 1021 1048 1022 .warning { 1049 1023 background:url(icon/warning.png) no-repeat top left; -
branches/2.2/admin/themes/roma/theme.css
r9815 r11056 246 246 #batchManagerGlobal #selectedMessage {background-color:#555; color:#ddd;} 247 247 248 /* TokenInput (with Facebook style for ROMA) */ 249 ul.token-input-list {border-color:#666;background-color:#444;} 250 ul.token-input-list li input {background-color:#444;} 251 li.token-input-token span {color:#878787;} 252 div.token-input-dropdown {background-color:#eee;border-color:#666;} 253 div.token-input-dropdown ul li {background-color:#eee;} 254 div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-color:#FF7800;}
Note: See TracChangeset
for help on using the changeset viewer.