diff --git a/admin/js/tokeninput.js b/admin/js/tokeninput.js index c571299e..11eb0767 100755 --- a/admin/js/tokeninput.js +++ b/admin/js/tokeninput.js @@ -263,7 +263,7 @@ $.TokenList = function (input, url_or_data, settings) { } break; - case KEY.TAB: + // case KEY.TAB: case KEY.ENTER: case KEY.NUMPAD_ENTER: case KEY.COMMA: @@ -750,7 +750,7 @@ $.TokenList = function (input, url_or_data, settings) { // 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(); + var val = input_box.val(), query = val.toLowerCase(); if(query && query.length) { if(selected_token) { @@ -762,7 +762,7 @@ $.TokenList = function (input, url_or_data, settings) { clearTimeout(timeout); timeout = setTimeout(function(){ - run_search(query); + run_search(query, val); }, settings.searchDelay); } else { hide_dropdown(); @@ -771,7 +771,7 @@ $.TokenList = function (input, url_or_data, settings) { } // Do the actual search - function run_search(query) { + function run_search(query, val) { var cache_key = query + computeURL(); var cached_results = cache.get(cache_key); if(cached_results) { @@ -807,7 +807,7 @@ $.TokenList = function (input, url_or_data, settings) { // Attach the success callback ajax_params.success = function(results) { if($.isFunction(settings.onResult)) { - results = settings.onResult.call(hidden_input, results, query); + results = settings.onResult.call(hidden_input, results, query, val); } cache.add(cache_key, settings.jsonContainer ? results[settings.jsonContainer] : results); @@ -826,7 +826,7 @@ $.TokenList = function (input, url_or_data, settings) { }); if($.isFunction(settings.onResult)) { - results = settings.onResult.call(hidden_input, results, query); + results = settings.onResult.call(hidden_input, results, query, val); } cache.add(cache_key, results); populate_dropdown(query, results); diff --git a/admin/write-js.php b/admin/write-js.php index 958635fa..3e47a703 100644 --- a/admin/write-js.php +++ b/admin/write-js.php @@ -77,7 +77,7 @@ $(document).ready(function() { noResultsText : '', prePopulate : tagsPre, - onResult : function (result, query) { + onResult : function (result, query, val) { if (!query) { return result; } @@ -88,8 +88,8 @@ $(document).ready(function() { if (!result[0] || result[0]['id'] != query) { result.unshift({ - id : query, - tags : query + id : val, + tags : val }); } diff --git a/var/Widget/Archive.php b/var/Widget/Archive.php index b58b238c..2fc6fcd9 100644 --- a/var/Widget/Archive.php +++ b/var/Widget/Archive.php @@ -1832,11 +1832,11 @@ class Widget_Archive extends Widget_Abstract_Contents } } - /** 插件支持 */ - $this->pluginHandle()->header($header, $this); - /** 输出header */ echo $header; + + /** 插件支持 */ + $this->pluginHandle()->header($header, $this); } /**