Changeset 10970 for trunk/admin


Ignore:
Timestamp:
May 21, 2011, 2:25:26 AM (14 years ago)
Author:
mistic100
Message:

remplace FCBKcomplete by TokenInput

Location:
trunk/admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/functions.php

    r10594 r10970  
    21072107      $taglist,
    21082108      array(
    2109         'key' => $row['tag_name'],
    2110         'value' => '~~'.$row['tag_id'].'~~',
     2109        'name' => $row['tag_name'],
     2110        'id' => '~~'.$row['tag_id'].'~~',
    21112111        )
    21122112      );
     
    21242124
    21252125  $tag_ids = array();
     2126  $raw_tags = explode(',',$raw_tags);
    21262127
    21272128  foreach ($raw_tags as $raw_tag)
  • trunk/admin/themes/default/template/batch_manager_global.tpl

    r10686 r10970  
    66{/literal}{/footer_script}
    77
    8 {combine_script id='jquery.fcbkcomplete' load='footer' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'}
     8{combine_script id='jquery.tokeninput' load='footer' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
    99{combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'}
    1010{combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
    1111
    12 {footer_script require='jquery.fcbkcomplete'}{literal}
     12{footer_script require='jquery.tokeninput'}{literal}
    1313jQuery(document).ready(function() {
    14   jQuery("#tags").fcbkcomplete({
    15     json_url: "admin.php?fckb_tags=1",
    16     cache: false,
    17     filter_case: false,
    18     filter_hide: true,
    19     firstselected: true,
    20     filter_selected: true,
    21     maxitems: 100,
    22     newel: true
     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        animateDropdown: false,
     23        preventDuplicates: true,
     24        allowCreation: true
     25    {literal}
     26      }
     27    );
    2328  });
    2429});
  • trunk/admin/themes/default/template/batch_manager_unit.tpl

    r10648 r10970  
    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}
     
    1616{literal}
    1717jQuery(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         });
     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        animateDropdown: false,
     27        preventDuplicates: true,
     28        allowCreation: true
     29    {literal}
     30      }
     31    );
     32  });
    2833 
    2934  $("a.preview-box").colorbox();
     
    113118<select id="tags-{$element.ID}" name="tags-{$element.ID}">
    114119{foreach from=$element.TAGS item=tag}
    115   <option value="{$tag.value}" class="selected">{$tag.key}</option>
     120  <option value="{$tag.id}" class="selected">{$tag.name}</option>
    116121{/foreach}
    117122</select>
  • trunk/admin/themes/default/template/picture_modify.tpl

    r10422 r10970  
    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}
     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}
    77jQuery(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         });
     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        animateDropdown: false,
     17        preventDuplicates: true,
     18        allowCreation: true
     19    {literal}
     20      }
     21    );
     22  });
    1823});
    1924{/literal}{/footer_script}
     
    138143<select id="tags" name="tags">
    139144{foreach from=$tags item=tag}
    140   <option value="{$tag.value}" class="selected">{$tag.key}</option>
     145  <option value="{$tag.id}" class="selected">{$tag.name}</option>
    141146{/foreach}
    142147</select>
  • trunk/admin/themes/default/theme.css

    r10648 r10970  
    586586}
    587587
    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 
    632588/* Add photos, direct mode */
    633589#uploadBoxes P {
     
    10581014#batchManagerGlobal #applyFilterBlock {margin-top:20px;}
    10591015#batchManagerGlobal .useFilterCheckbox {display:none}
     1016
     1017
     1018/* TokenInput (with Facebook style) */
     1019ul.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;}
     1020ul.token-input-list li input {border: 0;width: 100px;padding: 3px 8px;background-color: white;margin: 2px 0;-webkit-appearance: caret;}
     1021li.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;}
     1022li.token-input-token p {display: inline;padding: 0;margin: 0;}
     1023li.token-input-token span {color: #a6b3cf;margin-left: 5px;font-weight: bold;cursor: pointer;}
     1024li.token-input-selected-token {background-color: #5670a6;border: 1px solid #3b5998;color: #fff;}
     1025li.token-input-input-token {float: left;margin: 0;padding: 0;list-style-type: none;}
     1026div.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;}
     1027div.token-input-dropdown p {margin: 0;padding: 5px;font-weight: bold;color: #777;}
     1028div.token-input-dropdown ul {margin: 0;padding: 0;}
     1029div.token-input-dropdown ul li {background-color: #fff;padding: 3px;margin: 0;list-style-type: none;}
     1030div.token-input-dropdown ul li.token-input-dropdown-item {background-color: #fff;}
     1031div.token-input-dropdown ul li.token-input-dropdown-item2 {background-color: #fff;}
     1032div.token-input-dropdown ul li em {font-weight: bold;font-style: normal;}
     1033div.token-input-dropdown ul li.token-input-selected-dropdown-item {background-color: #3b5998;color: #fff;}
Note: See TracChangeset for help on using the changeset viewer.