diff --git a/cdn/dev/keyboard-search/search.js b/cdn/dev/keyboard-search/search.js index fa6ab467..4715993b 100644 --- a/cdn/dev/keyboard-search/search.js +++ b/cdn/dev/keyboard-search/search.js @@ -11,14 +11,15 @@ var embed_query_x = embed_query == '' ? '' : '&'+embed_query; var counter = 0; -function getCurrentPath(q, page) { +function getCurrentPath(q, page, obsolete) { var r = q.match(/^(c|l)\:(id)\:(.+)$/); + obsolete = obsolete ? '&obsolete=1' : ''; if(r && r[1].charAt(0) == 'c') { - return '/keyboards/countries/'+r[3]+'?page='+page; + return '/keyboards/countries/'+r[3]+'?page='+page+obsolete; } else if(r && r[1].charAt(0) == 'l') { - return '/keyboards/languages/'+r[3]+'?page='+page; + return '/keyboards/languages/'+r[3]+'?page='+page+obsolete; } else { - return '/keyboards?q='+encodeURIComponent(q)+'&page='+page; + return '/keyboards?q='+encodeURIComponent(q)+'&page='+page+obsolete; } } @@ -30,6 +31,8 @@ function wrapSearch(localCounter, updateHistory) { var page = parseInt(document.f.page.value, 10); if(isNaN(page) || page < 1 || page > 999) page = 1; + var obsolete = document.f.obsolete.value == 1; + var q = document.f.q.value.trim(); // Workaround for HTML form encoding spaces with "+", which breaks keyboard searches q = q.replace(/\+/g, ' '); @@ -50,14 +53,18 @@ function wrapSearch(localCounter, updateHistory) { url += '&embed='+embed; } + if(obsolete) { + url += '&obsolete='+obsolete; + } + if(detail_page) { - location.href = getCurrentPath(q, page); + location.href = getCurrentPath(q, page, obsolete); return false; } var xhr = createCORSRequest('GET', url); - var currentPath = getCurrentPath(q, page); + var currentPath = getCurrentPath(q, page, obsolete); xhr.onload = function() { if(counter > localCounter) { @@ -69,11 +76,11 @@ function wrapSearch(localCounter, updateHistory) { //hide_loading(); $('#search-box').removeClass('searching'); - currentPath = getCurrentPath(q, page); + currentPath = getCurrentPath(q, page, obsolete); if(updateHistory) { - history.pushState({q: q, text: responseText}, q + ' - Keyboard search', currentPath); + history.pushState({q: q, obsolete: obsolete, text: responseText}, q + ' - Keyboard search', currentPath); } - process_response(q, xhr.responseText); + process_response(q, obsolete, xhr.responseText); // process the response. }; @@ -94,13 +101,13 @@ function wrapSearch(localCounter, updateHistory) { window.onpopstate = function(e) { if(e.state) { - process_response(e.state.q, e.state.text); + process_response(e.state.q, e.state.obsolete, e.state.text); $('#search-q').val(e.state.q); return true; } else return false; }; -function process_response(q, res) { +function process_response(q, obsolete, res) { var resultsElement = $('#search-results'); res = JSON.parse(res); resultsElement.empty(); @@ -197,18 +204,18 @@ function process_response(q, res) { }); if(res.context.totalPages > 1) { - buildPager(res, q).appendTo(resultsElement); + buildPager(res, q, obsolete).appendTo(resultsElement); } } else { $('
Keyboards that are non-Unicode or older versions may be downloaded from the following link. Generally, unless you know you have a specific +need for an older keyboard, you should download the latest version from the Keyboard Search. Note that the search +for obsolete keyboards will return both current and obsolete keyboards.
+ + +Keyman Desktop 9.0 and earlier versions are now available for free. We have made special builds of two older versions of Keyman Desktop available which do not require any activation: 9.0.528.0 and 8.0.361.0. These are feature identical to the Professional Editions.
diff --git a/keyboards/index.php b/keyboards/index.php index 7b3e1d8e..3e4dc455 100644 --- a/keyboards/index.php +++ b/keyboards/index.php @@ -66,6 +66,7 @@