From f89fd5ab637de4fd73eb413387d3c0db7a34025b Mon Sep 17 00:00:00 2001 From: alberto Date: Thu, 18 Feb 2016 13:54:08 +0100 Subject: [PATCH 1/3] Added .toLowerCase() in case of fuzzy search --- search/web/inc/details/tree.jsp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/search/web/inc/details/tree.jsp b/search/web/inc/details/tree.jsp index d5c8cd59ef..3e68584866 100644 --- a/search/web/inc/details/tree.jsp +++ b/search/web/inc/details/tree.jsp @@ -503,12 +503,12 @@ if(fq!=""){ fq += " OR "; } - fq += "pid_path:" + getPidPath(id).replace(/:/g, "\\:") + "*"; + fq += "pid_path:" + getPidPath(id).replace(/:/g, "\\:").toLowerCase() + "*"; }); fq = "&fq=" + fq; }else{ var fqval = $('#item_tree>li>ul>li:first').attr("id").split('_')[1]; - fq = "&fq=pid_path:" + fqval.replace(/:/g, "\\:") + "*"; + fq = "&fq=pid_path:" + fqval.toLowerCase().replace(/:/g, "\\:") + "*"; } //var url = "searchXSL.jsp?q="+q+"&offset="+offset+"&xsl=insearch.xsl&collapsed=false&facet=false&fq=pid_path:"+pid+"*"; var url = "inc/details/searchInside.jsp?q="+q+"&offset="+offset+"&xsl=insearch.xsl&collapsed=false&facet=false" + fq; From 8a07dd402b6bcc125cb84654baee5e5f4014d1f4 Mon Sep 17 00:00:00 2001 From: alberto Date: Thu, 18 Feb 2016 13:56:46 +0100 Subject: [PATCH 2/3] dont apply filters when search inside --- client/src/main/webapp/js/viewers/itemthumbs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/main/webapp/js/viewers/itemthumbs.js b/client/src/main/webapp/js/viewers/itemthumbs.js index 48e57cc155..62d476cf12 100644 --- a/client/src/main/webapp/js/viewers/itemthumbs.js +++ b/client/src/main/webapp/js/viewers/itemthumbs.js @@ -180,7 +180,7 @@ ItemThumbs.prototype = { } q += "&rows=5000&fq=pid_path:" + pid_path.replace(/:/g, "\\:") + "*"; var hl = "&hl=true&hl.fl=text_ocr&hl.mergeContiguous=true&hl.snippets=2"; - K5.api.askForSolr(q + hl + fq, _.bind(function(data) { + K5.api.askForSolr(q + hl, _.bind(function(data) { console.log("Hits: " + data.response.numFound); //console.log(JSON.stringify(data)); this.hits = data.response.docs; From 58beab4b4e1cb475bf4fd64da28ec0aae1e53fcd Mon Sep 17 00:00:00 2001 From: Pavel Stastny Date: Thu, 18 Feb 2016 15:49:43 +0100 Subject: [PATCH 3/3] Client changes --- client/src/main/resources/k5client_cs.properties | 2 +- client/src/main/webapp/WEB-INF/registration_form.vm | 2 +- client/src/main/webapp/js/api.js | 4 ++-- client/src/main/webapp/js/item/downloadItem.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/main/resources/k5client_cs.properties b/client/src/main/resources/k5client_cs.properties index ce3b593fa1..300795d6f9 100644 --- a/client/src/main/resources/k5client_cs.properties +++ b/client/src/main/resources/k5client_cs.properties @@ -93,7 +93,7 @@ ctx.actions.printtitle=Tisk titulu ctx.actions.print=Tisk -ctx.actions.persistenturl=Persisentní URL ... +ctx.actions.persistenturl=Persistentní URL ... ctx.actions.print=Tisk celé stránky ctx.actions.printpart=Pouze část stránky ctx.actions.printpage=Tisk celé stránky diff --git a/client/src/main/webapp/WEB-INF/registration_form.vm b/client/src/main/webapp/WEB-INF/registration_form.vm index e27afd806e..75b9b54bbd 100644 --- a/client/src/main/webapp/WEB-INF/registration_form.vm +++ b/client/src/main/webapp/WEB-INF/registration_form.vm @@ -123,7 +123,7 @@ results.push({ "message":"missing repeatedpassword field", //I18N, "validated": false, - "ident":"#registration_error_differentpasswords" + "ident":"#registration_ error_differentpasswords" }); } else { results.push({ diff --git a/client/src/main/webapp/js/api.js b/client/src/main/webapp/js/api.js index 6fe9c12609..29930dbea1 100644 --- a/client/src/main/webapp/js/api.js +++ b/client/src/main/webapp/js/api.js @@ -464,9 +464,9 @@ ClientAPIDev.prototype = { var href = ""; if (withParams) { $('#search_form input[name="page"]').val("doc") - href += "?" + $("#search_form").serialize() + "#" + pid; + href += "index.vm?" + $("#search_form").serialize() + "#" + pid; } else { - href += "page=doc#" + pid; + href += "index.vm?page=doc#" + pid; } window.location.assign(href); }, diff --git a/client/src/main/webapp/js/item/downloadItem.js b/client/src/main/webapp/js/item/downloadItem.js index a8ce18695b..8c16b124f3 100644 --- a/client/src/main/webapp/js/item/downloadItem.js +++ b/client/src/main/webapp/js/item/downloadItem.js @@ -55,7 +55,7 @@ DownloadItem.prototype.init = function() { function _message() { var optionsdiv = $("
"); - var span = $("",{"id":"download_action_message"}); + var span = $("",{"id":"download_action_message", "class":"translate","data-key":"downloads.message"}); optionsdiv.append(span); return optionsdiv; }