Changeset 361619
- Timestamp:
- 03/18/2011 02:24:13 PM (15 years ago)
- Location:
- autocompleter/trunk
- Files:
-
- 2 edited
-
autocompleter.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
autocompleter/trunk/autocompleter.php
r358868 r361619 4 4 Plugin URI: http://nik.chankov.net/autocompleter 5 5 Description: Create autocomplete search form. 6 Version: 1.3.5 6 Version: 1.3.5.1 7 7 Author: Nik Chankov 8 8 Author URI: http://nik.chankov.net … … 59 59 function javascript_autocompleter(){ 60 60 $matches = (get_option('autocompleter_matches_label')!='')?get_option('autocompleter_matches_label'):'matches'; 61 $autosubmit = (get_option('autocompleter_autosubmit')==1)?'function onSelectItem(row){if(typeof(jQuery(row).find("span").attr("attr")) != "undefined"){ window.location = jQuery(row).find("span").attr("attr");} else {jQuery("input[name=s]").parents("form").submit();}}':'function onSelectItem(row){jQuery("input#s").focus();}'; 62 $extra = (get_option('autocompleter_show_items')==1)?'function formatItem(row) {if(row.length == 3){var attr = "attr=\"" + row[2] + "\""} else {attr = "";} return "<span "+attr+">" + row[1] + " '.$matches.'</span>" + row[0];}':'function formatItem(row) {if(row.length == 3){var attr = "attr=\"" + row[2] + "\""} else {attr = "";}return row[0] + "<span "+attr+"></span>"}'; 61 $autosubmit = (get_option('autocompleter_autosubmit')==1)?' 62 function onSelectItem(row){var extra = jQuery(row).attr(\'extra\').toString();var extraPos = extra.indexOf(\',\');if(extraPos != -1){window.location = extra.substring(extraPos*1+1, extra.length);} else {jQuery("input[name=s]").parents("form").submit();}}':'function onSelectItem(row){jQuery("input#s").focus();}'; 63 $extra = (get_option('autocompleter_show_items')==1)?'function formatItem(row) {if(row.length == 3){var attr = "attr=\"" + row[2] + "\"";} else {attr = "";} return "<span "+attr+">" + row[1] + " '.$matches.'</span>" + row[0];}':'function formatItem(row) {var attr;if(row.length == 3){attr = "attr=\"" + row[2] + "\"";} else {attr = "";} return row[0] + "<span "+attr+"></span>"}'; 63 64 $results = (get_option('autocompleter_results')!='')?get_option('autocompleter_results'):1; 64 65 echo '<script type="text/javascript"> -
autocompleter/trunk/readme.txt
r358973 r361619 5 5 Requires at least: 3.x 6 6 Tested up to: 3.1 7 Stable tag: 1.3.5 7 Stable tag: 1.3.5.1 8 8 9 9 Adding autocomplete functionality to the blog search input field. The values provided are the tags and categories used in the blog. … … 65 65 == Change log == 66 66 67 * 1.3.5.1 [18 Mar 2011] - Bugfix for the IE for skiping the search result page. 67 68 * 1.3.5 [09 Mar 2011] - added posibility to skip search result's page and goes directly to the post or page. See Description tab for more details. 68 69 * 1.3.0 [12 Jul 2010] - added type of displayed results in the dropdown. From now on you can choose which type of results will be displayed (option in admin).
Note: See TracChangeset
for help on using the changeset viewer.