X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=experiments%2Fspclient%2Fmkws.js;h=9d6f28d231871d7a8eceff6b2062b26890a8d397;hb=50b2b65dc191cc9c61773b1d9b00d388fc865dff;hp=a6dbbdd1092cff6bea9c9a687225d4a321498ad8;hpb=cdec51fddc3d0ad7a0f1136ef6799dbd217befa0;p=mkws-moved-to-github.git diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index a6dbbdd..9d6f28d 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -242,9 +242,9 @@ function my_onbytarget(data) { function domReady () { document.search.onsubmit = onFormSubmitEventHandler; - document.search.query.value = ''; - document.select.sort.onchange = onSelectDdChange; - document.select.perpage.onchange = onSelectDdChange; + document.search.mkwsQuery.value = ''; + document.mkwsSelect.mkwsSort.onchange = onSelectDdChange; + document.mkwsSelect.mkwsPerpage.onchange = onSelectDdChange; } // when search button pressed @@ -275,13 +275,13 @@ function resetPage() function triggerSearch () { - my_paz.search(document.search.query.value, recPerPage, curSort, curFilter); + my_paz.search(document.search.mkwsQuery.value, recPerPage, curSort, curFilter); } function loadSelect () { - curSort = document.select.sort.value; - recPerPage = document.select.perpage.value; + curSort = document.mkwsSelect.mkwsSort.value; + recPerPage = document.mkwsSelect.mkwsPerpage.value; } // limit the query after clicking the facet @@ -331,9 +331,9 @@ function drawPager (pagerDiv) ? firstClkbl + 2*onsides : pages; - var prev = '<< ' + M('Prev') + ' | '; + var prev = '<< ' + M('Prev') + ' | '; if (curPage > 1) - prev = '' +'<< ' + M('Prev') + ' | '; var middle = ''; @@ -346,9 +346,9 @@ function drawPager (pagerDiv) + numLabel + ' '; } - var next = ' | ' + M('Next') + ' >>'; + var next = ' | ' + M('Next') + ' >>'; if (pages - curPage > 0) - next = ' | ' + M('Next') + ' >>'; var predots = ''; @@ -532,11 +532,11 @@ function mkws_html_all(config) { mkws_html_lang(mkws_config); // For some reason, doing this programmatically results in - // document.search.query being undefined, hence the raw HTML. + // document.search.mkwsQuery being undefined, hence the raw HTML. debug("HTML search form"); $("#mkwsSearch").html('\
\ - \ + \ \
'); @@ -548,8 +548,8 @@ function mkws_html_all(config) {
\ \ \ -
\ -
\ +
\ + \ ' + M('Sort by') + ' ' + mkws_html_sort(config) + '\ ' + M('and show') + ' ' + mkws_html_perpage(config) + '\ ' + M('per page') + '.\ @@ -585,7 +585,7 @@ function mkws_responsive_design () { $(window).resize( function(e) { if (timeout) clearTimeout(timeout); - timeout = setTimeout(function () { mkws_mobile_resize() }, 100); + timeout = setTimeout(function () { mkws_mobile_resize() }, 50); }); // initial check after page load @@ -634,7 +634,7 @@ function mkws_html_switch(config) { function mkws_html_sort(config) { debug("HTML sort"); - var sort_html = ''; for(var i = 0; i < config.sort.length; i++) { var key = config.sort[i][0]; @@ -653,7 +653,7 @@ function mkws_html_sort(config) { function mkws_html_perpage(config) { debug("HTML perpage"); - var perpage_html = ''; for(var i = 0; i < config.perpage.length; i++) { var key = config.perpage[i]; @@ -787,7 +787,7 @@ jQuery.extend({
\
\
\ -