Changeset 1319880
- Timestamp:
- 01/02/2016 12:42:47 PM (10 years ago)
- Location:
- wpfilesearch
- Files:
-
- 6 edited
- 2 copied
-
tags/1.1 (copied) (copied from wpfilesearch/trunk)
-
tags/1.1/readme.txt (modified) (2 diffs)
-
tags/1.1/wpFileSearch_ajax.js (modified) (3 diffs)
-
tags/trunk (copied) (copied from wpfilesearch/trunk)
-
tags/trunk/readme.txt (modified) (2 diffs)
-
tags/trunk/wpFileSearch_ajax.js (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wpFileSearch_ajax.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpfilesearch/tags/1.1/readme.txt
r1319859 r1319880 5 5 Requires at least: 3.3 6 6 Tested up to: 4.4 7 Stable tag: trunk7 Stable tag: 1.1 8 8 License: GNU GENERAL PUBLIC LICENSE 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.en.html … … 46 46 47 47 == Changelog == 48 v1.0 - Initial Version 48 * v1.0 - Initial Version 49 * v1.1 - Improved code & bugfix. 50 51 == Upgrade Notice == 52 53 = 1.1 = 54 This version includes code improvements and a bug fix for an error message not being displayed properly. 55 56 = 1.0 = 57 Initial Version -
wpfilesearch/tags/1.1/wpFileSearch_ajax.js
r1307692 r1319880 3 3 4 4 function notFound(searchTerm){ 5 document.getElementById("status").innerHTML = "Sorry, none of the files contained "+searchTerm+".";5 $("#status").innerHTML = "Sorry, none of the files contained "+searchTerm+"."; 6 6 hideLoadContents(); 7 7 } 8 8 9 9 function showLoadContents(){ 10 if ( document.getElementById('searchResults').value !== ''){11 document.getElementById('loadContents').style.display='block';12 document.getElementById('status').value = "Fetching file content . . .";10 if ($('#searchResults').value !== ''){ 11 $('#loadContents').style.display='block'; 12 $('#status').value = "Fetching file content . . ."; 13 13 } 14 14 } 15 15 16 16 function resultsFound(){ 17 document.getElementById('resultsFound').style.display='block';17 $('#resultsFound').style.display='block'; 18 18 } 19 19 20 20 function hideLoadContents(){ 21 document.getElementById('resultsFound').style.display='none';22 document.getElementById('loadContents').style.display='none';21 $('#resultsFound').style.display='none'; 22 $('#loadContents').style.display='none'; 23 23 } 24 24 25 25 function wpFileSearch() { 26 document.getElementById("status").innerHTML = "User is typing.";26 $("#status").innerHTML = "User is typing."; 27 27 clearTimeout(wpFileSearchTimer); 28 28 wpFileSearchTimer = setTimeout(searchRequest, wpFileSearchDoneTypingInterval); … … 30 30 31 31 function searchRequest(){ 32 document.getElementById("status").innerHTML = "Searching . . .";33 var searchTerm = document.getElementById("searchTerm").value;32 $("#status").innerHTML = "Searching . . ."; 33 var searchTerm = $("#searchTerm").value; 34 34 if (searchTerm.length == 0 || searchTerm.length > 50) { 35 if (searchTerm.length > 50) document.getElementById("status").innerHTML = "Input is too long.";36 else document.getElementById("status").innerHTML = "Waiting for user input.";37 document.getElementById("searchTerm").value = "";35 if (searchTerm.length > 50) $("#status").innerHTML = "Input is too long."; 36 else $("#status").innerHTML = "Waiting for user input."; 37 $("#searchTerm").value = ""; 38 38 hideLoadContents(); 39 39 return; … … 68 68 data: { 69 69 'action':'wpFileSearch_fetch_file', 70 'file' : document.getElementById('searchResults').value70 'file' : $('#searchResults').value 71 71 }, 72 72 success:function(data) { 73 73 jQuery('#fileContents').html(data); 74 74 jQuery('#status').html("File has been fetched."); 75 document.getElementById('resultsFound').style.display='block';75 $('#resultsFound').style.display='block'; 76 76 }, 77 77 error: function(errorThrown){ -
wpfilesearch/tags/trunk/readme.txt
r1319859 r1319880 5 5 Requires at least: 3.3 6 6 Tested up to: 4.4 7 Stable tag: trunk7 Stable tag: 1.1 8 8 License: GNU GENERAL PUBLIC LICENSE 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.en.html … … 46 46 47 47 == Changelog == 48 v1.0 - Initial Version 48 * v1.0 - Initial Version 49 * v1.1 - Improved code & bugfix. 50 51 == Upgrade Notice == 52 53 = 1.1 = 54 This version includes code improvements and a bug fix for an error message not being displayed properly. 55 56 = 1.0 = 57 Initial Version -
wpfilesearch/tags/trunk/wpFileSearch_ajax.js
r1307692 r1319880 3 3 4 4 function notFound(searchTerm){ 5 document.getElementById("status").innerHTML = "Sorry, none of the files contained "+searchTerm+".";5 $("#status").innerHTML = "Sorry, none of the files contained "+searchTerm+"."; 6 6 hideLoadContents(); 7 7 } 8 8 9 9 function showLoadContents(){ 10 if ( document.getElementById('searchResults').value !== ''){11 document.getElementById('loadContents').style.display='block';12 document.getElementById('status').value = "Fetching file content . . .";10 if ($('#searchResults').value !== ''){ 11 $('#loadContents').style.display='block'; 12 $('#status').value = "Fetching file content . . ."; 13 13 } 14 14 } 15 15 16 16 function resultsFound(){ 17 document.getElementById('resultsFound').style.display='block';17 $('#resultsFound').style.display='block'; 18 18 } 19 19 20 20 function hideLoadContents(){ 21 document.getElementById('resultsFound').style.display='none';22 document.getElementById('loadContents').style.display='none';21 $('#resultsFound').style.display='none'; 22 $('#loadContents').style.display='none'; 23 23 } 24 24 25 25 function wpFileSearch() { 26 document.getElementById("status").innerHTML = "User is typing.";26 $("#status").innerHTML = "User is typing."; 27 27 clearTimeout(wpFileSearchTimer); 28 28 wpFileSearchTimer = setTimeout(searchRequest, wpFileSearchDoneTypingInterval); … … 30 30 31 31 function searchRequest(){ 32 document.getElementById("status").innerHTML = "Searching . . .";33 var searchTerm = document.getElementById("searchTerm").value;32 $("#status").innerHTML = "Searching . . ."; 33 var searchTerm = $("#searchTerm").value; 34 34 if (searchTerm.length == 0 || searchTerm.length > 50) { 35 if (searchTerm.length > 50) document.getElementById("status").innerHTML = "Input is too long.";36 else document.getElementById("status").innerHTML = "Waiting for user input.";37 document.getElementById("searchTerm").value = "";35 if (searchTerm.length > 50) $("#status").innerHTML = "Input is too long."; 36 else $("#status").innerHTML = "Waiting for user input."; 37 $("#searchTerm").value = ""; 38 38 hideLoadContents(); 39 39 return; … … 68 68 data: { 69 69 'action':'wpFileSearch_fetch_file', 70 'file' : document.getElementById('searchResults').value70 'file' : $('#searchResults').value 71 71 }, 72 72 success:function(data) { 73 73 jQuery('#fileContents').html(data); 74 74 jQuery('#status').html("File has been fetched."); 75 document.getElementById('resultsFound').style.display='block';75 $('#resultsFound').style.display='block'; 76 76 }, 77 77 error: function(errorThrown){ -
wpfilesearch/trunk/readme.txt
r1319859 r1319880 5 5 Requires at least: 3.3 6 6 Tested up to: 4.4 7 Stable tag: trunk7 Stable tag: 1.1 8 8 License: GNU GENERAL PUBLIC LICENSE 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.en.html … … 46 46 47 47 == Changelog == 48 v1.0 - Initial Version 48 * v1.0 - Initial Version 49 * v1.1 - Improved code & bugfix. 50 51 == Upgrade Notice == 52 53 = 1.1 = 54 This version includes code improvements and a bug fix for an error message not being displayed properly. 55 56 = 1.0 = 57 Initial Version -
wpfilesearch/trunk/wpFileSearch_ajax.js
r1307692 r1319880 3 3 4 4 function notFound(searchTerm){ 5 document.getElementById("status").innerHTML = "Sorry, none of the files contained "+searchTerm+".";5 $("#status").innerHTML = "Sorry, none of the files contained "+searchTerm+"."; 6 6 hideLoadContents(); 7 7 } 8 8 9 9 function showLoadContents(){ 10 if ( document.getElementById('searchResults').value !== ''){11 document.getElementById('loadContents').style.display='block';12 document.getElementById('status').value = "Fetching file content . . .";10 if ($('#searchResults').value !== ''){ 11 $('#loadContents').style.display='block'; 12 $('#status').value = "Fetching file content . . ."; 13 13 } 14 14 } 15 15 16 16 function resultsFound(){ 17 document.getElementById('resultsFound').style.display='block';17 $('#resultsFound').style.display='block'; 18 18 } 19 19 20 20 function hideLoadContents(){ 21 document.getElementById('resultsFound').style.display='none';22 document.getElementById('loadContents').style.display='none';21 $('#resultsFound').style.display='none'; 22 $('#loadContents').style.display='none'; 23 23 } 24 24 25 25 function wpFileSearch() { 26 document.getElementById("status").innerHTML = "User is typing.";26 $("#status").innerHTML = "User is typing."; 27 27 clearTimeout(wpFileSearchTimer); 28 28 wpFileSearchTimer = setTimeout(searchRequest, wpFileSearchDoneTypingInterval); … … 30 30 31 31 function searchRequest(){ 32 document.getElementById("status").innerHTML = "Searching . . .";33 var searchTerm = document.getElementById("searchTerm").value;32 $("#status").innerHTML = "Searching . . ."; 33 var searchTerm = $("#searchTerm").value; 34 34 if (searchTerm.length == 0 || searchTerm.length > 50) { 35 if (searchTerm.length > 50) document.getElementById("status").innerHTML = "Input is too long.";36 else document.getElementById("status").innerHTML = "Waiting for user input.";37 document.getElementById("searchTerm").value = "";35 if (searchTerm.length > 50) $("#status").innerHTML = "Input is too long."; 36 else $("#status").innerHTML = "Waiting for user input."; 37 $("#searchTerm").value = ""; 38 38 hideLoadContents(); 39 39 return; … … 68 68 data: { 69 69 'action':'wpFileSearch_fetch_file', 70 'file' : document.getElementById('searchResults').value70 'file' : $('#searchResults').value 71 71 }, 72 72 success:function(data) { 73 73 jQuery('#fileContents').html(data); 74 74 jQuery('#status').html("File has been fetched."); 75 document.getElementById('resultsFound').style.display='block';75 $('#resultsFound').style.display='block'; 76 76 }, 77 77 error: function(errorThrown){
Note: See TracChangeset
for help on using the changeset viewer.