diff --git a/CHANGES.md b/CHANGES.md index 6db9f747..99a79e5e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -33,6 +33,7 @@ * Update jquery.cookiejar 1.0.1 to 1.0.2 * Update jQuery JSON 2.2 (c908771) to 2.6 (2339804) * Update jquery.form plugin 3.35.0 to 3.51.0 (6bf24a5) +* Update jquery-tokeninput 1.60 to 1.62 (9c36e19) * Update qTip 2.2.1 to 2.2.2 diff --git a/gui/slick/css/dark.css b/gui/slick/css/dark.css index c0113931..7063fffb 100644 --- a/gui/slick/css/dark.css +++ b/gui/slick/css/dark.css @@ -1450,65 +1450,18 @@ thead.tablesorter-stickyHeader{ color:#000 } - /* ======================================================================= -token-input.css +token-input.css Overrides ========================================================================== */ -ul.token-input-list{ - border:1px solid #ccc; - background-color:#ddd -} - -ul.token-input-list li input{ - border:0; - background-color:white -} - -li.token-input-token{ - background-color:#d0efa0; - color:#000 -} - -li.token-input-token span{ - color:#777 -} - -li.token-input-selected-token{ - background-color:#08844e; - color:#ddd -} - -li.token-input-selected-token span{ - color:#bbb -} - -div.token-input-dropdown{ - background-color:#ddd; - color:#000; - border-left-color:#ccc; - border-right-color:#ccc; - border-bottom-color:#ccc -} - -div.token-input-dropdown p{ - color:#777 -} - +ul.token-input-list, +div.token-input-dropdown, div.token-input-dropdown ul li{ background-color:#ddd } -div.token-input-dropdown ul li.token-input-dropdown-item{ - background-color:#fafafa -} - -div.token-input-dropdown ul li.token-input-dropdown-item2{ - background-color:#ddd -} - -div.token-input-dropdown ul li.token-input-selected-dropdown-item{ - background-color:#6196c2 +li.token-input-selected-token{ + color:#ddd } /* ======================================================================= diff --git a/gui/slick/css/lib/token-input.min.css b/gui/slick/css/lib/token-input.min.css new file mode 100644 index 00000000..16f33eb6 --- /dev/null +++ b/gui/slick/css/lib/token-input.min.css @@ -0,0 +1 @@ +div.token-input-dropdown,ul.token-input-list{overflow:hidden;font-size:12px;font-family:Verdana,sans-serif}ul.token-input-list,ul.token-input-list li{list-style-type:none}ul.token-input-list{height:auto!important;height:1%;width:400px;border:1px solid #999;cursor:text;z-index:999;margin:0;padding:0;background-color:#fff;clear:left}ul.token-input-list li input{border:0;width:350px;padding:3px 8px;background-color:#fff;-webkit-appearance:caret}ul.token-input-disabled,ul.token-input-disabled li input{background-color:#E8E8E8}ul.token-input-disabled li.token-input-token{background-color:#D9E3CA;color:#7D7D7D}ul.token-input-disabled li.token-input-token span{color:#CFCFCF;cursor:default}li.token-input-token{overflow:hidden;height:auto!important;height:1%;margin:3px;padding:3px 5px;background-color:#d0efa0;color:#000;font-weight:700;cursor:default;display:block}li.token-input-token p{float:left;padding:0;margin:0}li.token-input-token span{float:right;color:#777;cursor:pointer}li.token-input-selected-token{background-color:#08844e;color:#fff}li.token-input-selected-token span{color:#bbb}div.token-input-dropdown{position:absolute;width:400px;background-color:#fff;border-left:1px solid #ccc;border-right:1px solid #ccc;border-bottom:1px solid #ccc;cursor:default;z-index:1}div.token-input-dropdown p{margin:0;padding:5px;font-weight:700;color:#777}div.token-input-dropdown ul{margin:0;padding:0}div.token-input-dropdown ul li{background-color:#fff;padding:3px;list-style-type:none}div.token-input-dropdown ul li.token-input-dropdown-item{background-color:#fafafa}div.token-input-dropdown ul li.token-input-dropdown-item2{background-color:#fff}div.token-input-dropdown ul li em{font-weight:700;font-style:normal}div.token-input-dropdown ul li.token-input-selected-dropdown-item{background-color:#d0efa0} \ No newline at end of file diff --git a/gui/slick/css/light.css b/gui/slick/css/light.css index 94b04bd8..1db3422a 100644 --- a/gui/slick/css/light.css +++ b/gui/slick/css/light.css @@ -1382,66 +1382,6 @@ thead.tablesorter-stickyHeader{ color:#fff } -/* ======================================================================= -token-input.css -========================================================================== */ - -ul.token-input-list{ - border:1px solid #ccc; - background-color:#fff -} - -ul.token-input-list li input{ - border:0; - background-color:white -} - -li.token-input-token{ - background-color:#d0efa0; - color:#000 -} - -li.token-input-token span{ - color:#777 -} - -li.token-input-selected-token{ - background-color:#08844e; - color:#fff -} - -li.token-input-selected-token span{ - color:#bbb -} - -div.token-input-dropdown{ - background-color:#fff; - color:#000; - border-left-color:#ccc; - border-right-color:#ccc; - border-bottom-color:#ccc -} - -div.token-input-dropdown p{ - color:#777 -} - -div.token-input-dropdown ul li{ - background-color:#fff -} - -div.token-input-dropdown ul li.token-input-dropdown-item{ - background-color:#fafafa -} - -div.token-input-dropdown ul li.token-input-dropdown-item2{ - background-color:#fff -} - -div.token-input-dropdown ul li.token-input-selected-dropdown-item{ - background-color:#6196c2 -} - /* ======================================================================= jquery.confirm.css ========================================================================== */ diff --git a/gui/slick/css/style.css b/gui/slick/css/style.css index 369c4373..f2b61462 100644 --- a/gui/slick/css/style.css +++ b/gui/slick/css/style.css @@ -4304,58 +4304,25 @@ thead.tablesorter-stickyHeader{ } /* ======================================================================= -token-input.css +token-input.css Overrides ========================================================================== */ ul.token-input-list{ - overflow:hidden; - height:auto !important; - height:1%; width:273px; border:1px solid #ccc; - cursor:text; font-size:10px; - font-family:Verdana; - z-index:999; - margin:0; padding:0 0 1px 0; - background-color:#ddd; - list-style-type:none; -/* clear:left; */ - border-top-left-radius:3px; - border-top-right-radius:3px; - border-bottom-left-radius:3px; - border-bottom-right-radius:3px -} - -ul.token-input-list li{ - list-style-type:none + clear:none; + border-radius:3px } ul.token-input-list li input{ - border:0; padding:3px 4px; - background-color:white -/* -webkit-appearance:caret */ + -webkit-appearance:none } li.token-input-token{ - overflow:hidden; - height:auto !important; - height:1%; - margin:3px; - padding:3px 5px 0 5px; - background-color:#d0efa0; - color:#000; - font-weight:bold; - cursor:default; - display:block -} - -li.token-input-token img{ - padding-top:7px; - padding-right:4px; - float:left + padding:3px 5px 0 5px } li.token-input-token input{ @@ -4365,75 +4332,27 @@ li.token-input-token input{ } li.token-input-token p{ - float:left; - padding:0; - margin:0; line-height:2.0 !important } -li.token-input-token span{ - float:right; - color:#777; - cursor:pointer -} - -li.token-input-selected-token{ - background-color:#08844e; - color:#ddd -} - -li.token-input-selected-token span{ - color:#bbb -} - li.token-input-input-token input{ - margin:3px 3px 3px 3px !important + margin:3px !important } div.token-input-dropdown{ - position:absolute; width:273px; - overflow:hidden; - border-left:1px solid; - border-right:1px solid; - border-bottom:1px solid; - cursor:default; - font-size:11px; - font-family:Verdana; - z-index:1 + color:#000; + font-size:11px } div.token-input-dropdown p{ - margin:0; - padding:3px; - font-weight:bold; - color:#777 -} - -div.token-input-dropdown ul{ - margin:0; - padding:0 -} - -div.token-input-dropdown ul li{ - background-color:#ddd; - padding:3px; - list-style-type:none -} - -div.token-input-dropdown ul li.token-input-dropdown-item{ - background-color:#fafafa + padding:3px } div.token-input-dropdown ul li.token-input-dropdown-item2{ background-color:#ddd } -div.token-input-dropdown ul li em{ - font-weight:bold; - font-style:normal -} - div.token-input-dropdown ul li.token-input-selected-dropdown-item{ background-color:#6196c2 } @@ -4442,6 +4361,17 @@ span.token-input-delete-token{ margin:0 1px } +li.token-input-token img{ + padding:5px 4px 0 0; + float:left +} + +li.token-input-dropdown-item img, +li.token-input-dropdown-item2 img{ + padding:2px 4px 0 0; + float:left +} + /* ======================================================================= jquery.confirm.css ========================================================================== */ diff --git a/gui/slick/interfaces/default/config_subtitles.tmpl b/gui/slick/interfaces/default/config_subtitles.tmpl index 60271ff3..11f978e0 100644 --- a/gui/slick/interfaces/default/config_subtitles.tmpl +++ b/gui/slick/interfaces/default/config_subtitles.tmpl @@ -12,27 +12,30 @@ - + @@ -43,118 +46,118 @@ #end if
" + item[this.propertyToSearch] + "
"+settings.searchingText+"
"); - show_dropdown(); - } - } - - function show_dropdown_hint () { - if(settings.hintText) { - dropdown.html(""+settings.hintText+"
"); - show_dropdown(); - } - } - - // Highlight the query part of the search term - function highlight_term(value, term) { - return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); - } - - function find_value_and_highlight_term(template, value, term) { - return template.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + value + ")(?![^<>]*>)(?![^&;]+;)", "g"), highlight_term(value, term)); - } - - // Populate the results dropdown with some results - function populate_dropdown (query, results) { - if(results && results.length) { - dropdown.empty(); - var dropdown_ul = $(""+settings.noResultsText+"
"); - show_dropdown(); - } - } - } - - // Highlight an item in the results dropdown - function select_dropdown_item (item) { - if(item) { - if(selected_dropdown_item) { - deselect_dropdown_item($(selected_dropdown_item)); - } - - item.addClass(settings.classes.selectedDropdownItem); - selected_dropdown_item = item.get(0); - } - } - - // Remove highlighting from an item in the results dropdown - function deselect_dropdown_item (item) { - item.removeClass(settings.classes.selectedDropdownItem); - selected_dropdown_item = null; - } - - // Do a search and show the "searching" dropdown if the input is longer - // than settings.minChars - function do_search() { - var query = input_box.val().toLowerCase(); - - if(query && query.length) { - if(selected_token) { - deselect_token($(selected_token), POSITION.AFTER); - } - - if(query.length >= settings.minChars) { - show_dropdown_searching(); - clearTimeout(timeout); - - timeout = setTimeout(function(){ - run_search(query); - }, settings.searchDelay); - } else { - hide_dropdown(); - } - } - } - - // Do the actual search - function run_search(query) { - var cache_key = query + computeURL(); - var cached_results = cache.get(cache_key); - if(cached_results) { - populate_dropdown(query, cached_results); - } else { - // Are we doing an ajax search or local data search? - if(settings.url) { - var url = computeURL(); - // Extract exisiting get params - var ajax_params = {}; - ajax_params.data = {}; - if(url.indexOf("?") > -1) { - var parts = url.split("?"); - ajax_params.url = parts[0]; - - var param_array = parts[1].split("&"); - $.each(param_array, function (index, value) { - var kv = value.split("="); - ajax_params.data[kv[0]] = kv[1]; - }); - } else { - ajax_params.url = url; - } - - // Prepare the request - ajax_params.data[settings.queryParam] = query; - ajax_params.type = settings.method; - ajax_params.dataType = settings.contentType; - if(settings.crossDomain) { - ajax_params.dataType = "jsonp"; - } - - // Attach the success callback - ajax_params.success = function(results) { - if($.isFunction(settings.onResult)) { - results = settings.onResult.call(hidden_input, results); - } - cache.add(cache_key, settings.jsonContainer ? results[settings.jsonContainer] : results); - - // only populate the dropdown if the results are associated with the active search query - if(input_box.val().toLowerCase() === query) { - populate_dropdown(query, settings.jsonContainer ? results[settings.jsonContainer] : results); - } - }; - - // Make the request - $.ajax(ajax_params); - } else if(settings.local_data) { - // Do the search through local data - var results = $.grep(settings.local_data, function (row) { - return row[settings.propertyToSearch].toLowerCase().indexOf(query.toLowerCase()) > -1; - }); - - if($.isFunction(settings.onResult)) { - results = settings.onResult.call(hidden_input, results); - } - cache.add(cache_key, results); - populate_dropdown(query, results); - } - } - } - - // compute the dynamic URL - function computeURL() { - var url = settings.url; - if(typeof settings.url == 'function') { - url = settings.url.call(); - } - return url; - } -}; - -// Really basic cache for the results -$.TokenList.Cache = function (options) { - var settings = $.extend({ - max_size: 500 - }, options); - - var data = {}; - var size = 0; - - var flush = function () { - data = {}; - size = 0; - }; - - this.add = function (query, results) { - if(size > settings.max_size) { - flush(); - } - - if(!data[query]) { - size += 1; - } - - data[query] = results; - }; - - this.get = function (query) { - return data[query]; - }; -}; -}(jQuery)); diff --git a/gui/slick/js/lib/jquery.tokeninput.min.js b/gui/slick/js/lib/jquery.tokeninput.min.js new file mode 100644 index 00000000..57fbe416 --- /dev/null +++ b/gui/slick/js/lib/jquery.tokeninput.min.js @@ -0,0 +1,39 @@ +/* + * jQuery Plugin: Tokenizing Autocomplete Text Entry + * Version 1.6.2 + * + * Copyright (c) 2009 James Smith (http://loopj.com) + * Licensed jointly under the GPL and MIT licenses, + * choose which one suits your project best + * + */ +var $jscomp={scope:{},findInternal:function(a,h,g){a instanceof String&&(a=String(a));for(var q=a.length,l=0;l"+(this.enableHTML?a:h(a))+""},tokenFormatter:function(a){a=a[this.propertyToSearch];return"- "},tokenLimit:null,tokenDelimiter:",",preventDuplicates:!1,tokenValue:"id",allowFreeTagging:!1,allowTabOut:!1,autoSelectFirstResult:!1,onResult:null,onCachedResult:null,onAdd:null,onFreeTaggingAdd:null,onDelete:null,onReady:null,idPrefix:"token-input-",disabled:!1},q={tokenList:"token-input-list", +token:"token-input-token",tokenReadOnly:"token-input-token-readonly",tokenDelete:"token-input-delete-token",selectedToken:"token-input-selected-token",highlightedToken:"token-input-highlighted-token",dropdown:"token-input-dropdown",dropdownItem:"token-input-dropdown-item",dropdownItem2:"token-input-dropdown-item2",selectedDropdownItem:"token-input-selected-dropdown-item",inputToken:"token-input-input-token",focused:"token-input-focused",disabled:"token-input-disabled"},l={"&":"&","<":"<",">":">", +'"':""","'":"'","/":"/"},A=/[&<>"'\/]/g,C={init:function(b,p){var h=a.extend({},g,p||{});return this.each(function(){a(this).data("settings",h);a(this).data("tokenInputObject",new a.TokenList(this,b,h))})},clear:function(){this.data("tokenInputObject").clear();return this},add:function(a){this.data("tokenInputObject").add(a);return this},remove:function(a){this.data("tokenInputObject").remove(a);return this},get:function(){return this.data("tokenInputObject").getTokens()},toggleDisabled:function(a){this.data("tokenInputObject").toggleDisabled(a); +return this},setOptions:function(b){a(this).data("settings",a.extend({},a(this).data("settings"),b||{}));return this},destroy:function(){if(this.data("tokenInputObject")){this.data("tokenInputObject").clear();var a=this.parent();a.empty();this.show();a.append(this);return this}}};a.fn.tokenInput=function(a){return C[a]?C[a].apply(this,Array.prototype.slice.call(arguments,1)):C.init.apply(this,arguments)};a.TokenList=function(b,p,g){function l(c){return a(b).data("settings").enableHTML?c:h(c)}function O(c){"boolean"=== +typeof c?a(b).data("settings").disabled=c:a(b).data("settings").disabled=!a(b).data("settings").disabled;f.attr("disabled",a(b).data("settings").disabled);r.toggleClass(a(b).data("settings").classes.disabled,a(b).data("settings").disabled);m&&B(a(m),2);n.attr("disabled",a(b).data("settings").disabled)}function P(){null!==a(b).data("settings").tokenLimit&&x>=a(b).data("settings").tokenLimit&&(f.hide(),y())}function A(){if(I!==(I=f.val())){var a=r.width()-f.offset().left-r.offset().left;Q.html(h(I)|| +h(g.placeholder));f.width(Math.min(r.width(),Math.max(a,Q.width()+30)))}}function N(){var c=a.trim(f.val()).split(a(b).data("settings").tokenDelimiter);a.each(c,function(c,d){if(d){a.isFunction(a(b).data("settings").onFreeTaggingAdd)&&(d=a(b).data("settings").onFreeTaggingAdd.call(n,d));var e={};e[a(b).data("settings").tokenValue]=e[a(b).data("settings").propertyToSearch]=d;F(e)}})}function C(c){var e=a(a(b).data("settings").tokenFormatter(c)),d=!0===c.readonly;d&&e.addClass(a(b).data("settings").classes.tokenReadOnly); +e.addClass(a(b).data("settings").classes.token).insertBefore(z);d||a(""+a(b).data("settings").deleteText+"").addClass(a(b).data("settings").classes.tokenDelete).appendTo(e).click(function(){if(!a(b).data("settings").disabled)return G(a(this).parent()),n.change(),!1});a.data(e.get(0),"tokeninput",c);u=u.slice(0,v).concat([c]).concat(u.slice(v));v++;R(u,n);x+=1;null!==a(b).data("settings").tokenLimit&&x>=a(b).data("settings").tokenLimit&&(f.hide(),y());return e}function F(c){var e=a(b).data("settings").onAdd; +if(0
"+(this.enableHTML?a:h(a))+"
v&&k--;c.remove();m=null;D(f);u=u.slice(0,k).concat(u.slice(k+1));0==u.length&&f.attr("placeholder",g.placeholder);k ]*)("+ +b.replace(S,"\\$&")+")(?![^<>]*>)(?![^&;]+;)","gi"),function(a,b){return""+l(b)+""})}function W(c){if(a(b).data("settings").excludeCurrent){var e=a(b).data("tokenInputObject").getTokens(),d=[];e.length&&(a.each(c,function(c,f){var k=!0;a.each(e,function(c,e){if(f[a(b).data("settings").propertyToSearch]==e[a(b).data("settings").propertyToSearch])return k=!1});k&&d.push(f)}),c=d)}return c}function J(c,e){if((e=W(e))&&e.length){w.empty();var d=a(" ").appendTo(w).mouseover(function(b){K(a(b.target).closest("li"))}).mousedown(function(b){F(a(b.target).closest("li").data("tokeninput")); +n.change();return!1}).hide();a(b).data("settings").resultsLimit&&e.length>a(b).data("settings").resultsLimit&&(e=e.slice(0,a(b).data("settings").resultsLimit));a.each(e,function(e,f){var g=a(b).data("settings").resultsFormatter(f),k=f[a(b).data("settings").propertyToSearch],g=g.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+k.replace(S,"\\$&")+")(?![^<>]*>)(?![^&;]+;)","g"),V(k,c)),g=a(g).appendTo(d);e%2?g.addClass(a(b).data("settings").classes.dropdownItem):g.addClass(a(b).data("settings").classes.dropdownItem2); +0===e&&a(b).data("settings").autoSelectFirstResult&&K(g);a.data(g.get(0),"tokeninput",f)});H();a(b).data("settings").animateDropdown?d.slideDown("fast"):d.show()}else a(b).data("settings").noResultsText&&(w.html("
"+l(a(b).data("settings").noResultsText)+"
"),H())}function K(c){c&&(t&&(a(t).removeClass(a(b).data("settings").classes.selectedDropdownItem),t=null),c.addClass(a(b).data("settings").classes.selectedDropdownItem),t=c.get(0))}function T(){var c=f.val();c&&c.length&&(m&&B(a(m),1),c.length>= +a(b).data("settings").minChars?(a(b).data("settings").searchingText&&(w.html(""+l(a(b).data("settings").searchingText)+"
"),H()),clearTimeout(U),U=setTimeout(function(){X(c)},a(b).data("settings").searchDelay)):y())}function X(c){var e=c+L(),d=M.get(e);if(d)a.isFunction(a(b).data("settings").onCachedResult)&&(d=a(b).data("settings").onCachedResult.call(n,d)),J(c,d);else if(a(b).data("settings").url){var d=L(),k={data:{}};-1').css({outline:"none"}).attr("id", +a(b).data("settings").idPrefix+b.id).focus(function(){if(a(b).data("settings").disabled)return!1;null!==a(b).data("settings").tokenLimit&&a(b).data("settings").tokenLimit===x||!a(b).data("settings").hintText||(w.html(" "+l(a(b).data("settings").hintText)+"
"),H());r.addClass(a(b).data("settings").classes.focused)}).blur(function(){y();a(b).data("settings").allowFreeTagging&&N();a(this).val("");r.removeClass(a(b).data("settings").classes.focused)}).bind("keyup keydown blur update",A).keydown(function(c){var e, +d;switch(c.keyCode){case 37:case 39:case 38:case 40:0===this.value.length?(e=z.prev(),d=z.next(),e.length&&e.get(0)===m||d.length&&d.get(0)===m?37===c.keyCode||38===c.keyCode?B(a(m),0):B(a(m),1):37!==c.keyCode&&38!==c.keyCode||!e.length?39!==c.keyCode&&40!==c.keyCode||!d.length||E(a(d.get(0))):E(a(e.get(0)))):(e=null,40===c.keyCode||39===c.keyCode?(e=a(w).find("li").first(),t&&(e=a(t).next())):(e=a(w).find("li").last(),t&&(e=a(t).prev())),K(e));break;case 8:e=z.prev();if(0===this.value.length)return m? +(G(a(m)),n.change()):e.length&&E(a(e.get(0))),!1;1===a(this).val().length?y():setTimeout(function(){T()},5);break;case 9:case 13:case 108:case 188:if(t)F(a(t).data("tokeninput")),n.change();else{if(a(b).data("settings").allowFreeTagging){if(a(b).data("settings").allowTabOut&&""===a(this).val())return!0;N()}else if(a(this).val(""),a(b).data("settings").allowTabOut)return!0;c.stopPropagation();c.preventDefault()}return!1;case 27:return y(),!0;default:String.fromCharCode(c.which)&&setTimeout(function(){T()}, +5)}});g.placeholder&&f.attr("placeholder",g.placeholder);var n=a(b).hide().val("").focus(function(){D(f)}).blur(function(){f.blur();return n}),m=null,v=0,t=null,r=a("").addClass(a(b).data("settings").classes.tokenList).click(function(b){if((b=a(b.target).closest("li"))&&b.get(0)&&a.data(b.get(0),"tokeninput")){var c=m;m&&B(a(m),2);c===b.get(0)?B(b,2):E(b)}else m&&B(a(m),2),D(f)}).mouseover(function(c){(c=a(c.target).closest("li"))&&m!==this&&c.addClass(a(b).data("settings").classes.highlightedToken)}).mouseout(function(c){(c= +a(c.target).closest("li"))&&m!==this&&c.removeClass(a(b).data("settings").classes.highlightedToken)}).insertBefore(n),z=a("").addClass(a(b).data("settings").classes.inputToken).appendTo(r).append(f),w=a("").addClass(a(b).data("settings").classes.dropdown).appendTo("body").hide(),Q=a("
").insertAfter(f).css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:f.css("fontSize"),fontFamily:f.css("fontFamily"),fontWeight:f.css("fontWeight"),letterSpacing:f.css("letterSpacing"), +whiteSpace:"nowrap"});n.val("");p=a(b).data("settings").prePopulate||n.data("pre");a(b).data("settings").processPrePopulate&&a.isFunction(a(b).data("settings").onResult)&&(p=a(b).data("settings").onResult.call(n,p));p&&p.length&&a.each(p,function(a,b){C(b);P();f.attr("placeholder",null)});a(b).data("settings").disabled&&O(!0);"function"===typeof a(b).data("settings").onReady&&a(b).data("settings").onReady.call();this.clear=function(){r.children("li").each(function(){0===a(this).children("input").length&& +G(a(this))})};this.add=function(a){F(a)};this.remove=function(b){r.children("li").each(function(){if(0===a(this).children("input").length){var c=a(this).data("tokeninput"),d=!0,f;for(f in b)if(b[f]!==c[f]){d=!1;break}d&&G(a(this))}})};this.getTokens=function(){return u};this.toggleDisabled=function(a){O(a)};A();var S=RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g")};a.TokenList.Cache=function(b){var g,h={},l=0,q;g=a.extend({max_size:500},b);q=function(){h={};l=0};this.add=function(a,b){l>g.max_size&& +q();h[a]||(l+=1);h[a]=b};this.get=function(a){return h[a]}}})(jQuery);