Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ceskaexpedice/kramerius
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-stastny committed Dec 17, 2015
2 parents 8ddd0cf + 2ed03a5 commit 77f91aa
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 9 deletions.
13 changes: 10 additions & 3 deletions client/src/main/resources/k5client.properties
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ ctx.actions.sites.fb=Share Fb ...
ctx.actions.sites.gp=Share Google plus ...

buttons.showinfo=Show info
facet.model_path=Type of title
facet.model_path=Type of document
searchinside.dialog=Search inside this document
facet.rok=Year
common.results=Results
Expand Down Expand Up @@ -295,7 +295,7 @@ feedback.title=Error
feedback.email.title=Your name or email
feedback.message.title=Message

feedback.footer.title=\u26A0 Feedback
feedback.footer.title=\u26a0 Feedback
feedback.message.placeholder=Error in document


Expand All @@ -306,7 +306,7 @@ generatepdf.busy.message=Please repeat the action later
generatepdf.wait.title=Generating pdf
generatepdf.wait.message=Generating pdf, wait please
generatepdf.wait.pagelimit= Number of printing page is :
facet.typ_titulu=Type of title
facet.typ_titulu=Type of document
query.placeholder=Search digital library
buttons.outofdocument=Leave document
browse.placeholder=Search in titles and authors
Expand All @@ -333,3 +333,10 @@ mods.page.partType.listOfIllustrations=list of illustrations
mods.page.partType.listOfMaps=list of maps
mods.page.partType.listOfTables=list of tables
mods.page.partType.tableOfContents=table of contents

dctitle.none=unknown

common.founded=Found
common.page.singural=page
common.page.plural_1=pages
common.page.plural_2=pages
13 changes: 10 additions & 3 deletions client/src/main/resources/k5client_cs.properties
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ common.all= Všechny
common.apply=Aplikovat
common.browse=Procházet
common.change=Změna
common.close=Zavrít
common.close=Zavřít
common.saveandclose=Zavřít a uložit

common.url.handle=Persistentní URL
Expand Down Expand Up @@ -183,7 +183,7 @@ mods.subtitle=Podnázev
mods.title.alternative=Souběžný název
facets.used=Použité filtry
buttons.showinfo=Zobrazit informace
facet.model_path=Typ titulu
facet.model_path=Typ dokumentu
searchinside.dialog=Hledání v rámci dokumentu
facet.rok=Rok vydání
common.results=Výsledky
Expand Down Expand Up @@ -277,7 +277,7 @@ generatepdf.busy.message=Opakujte akci později
generatepdf.wait.title=Generuju pdf
generatepdf.wait.message=Čekejte, generuju pdf
generatepdf.wait.pagelimit= Počet generovaných stránek je :
facet.typ_titulu=Typ titulu
facet.typ_titulu=Typ dokumentu
query.placeholder=Hledej v digitální knihovně
buttons.outofdocument=Opustit dokument
browse.placeholder=Hledat v názvech a autorech
Expand All @@ -304,3 +304,10 @@ mods.page.partType.listOfIllustrations=seznam ilustrací
mods.page.partType.listOfMaps=seznam map
mods.page.partType.listOfTables=seznam tabulek
mods.page.partType.tableOfContents=obsah

dctitle.none=neuvedeno

common.found=Bylo nalezeno
common.page.singural=stránka
common.page.plural_1=stránky
common.page.plural_2=stránek
6 changes: 6 additions & 0 deletions client/src/main/webapp/WEB-INF/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"policy.public.color" : "#00dd00",
"policy.private.color" :"#dd0000",
"linkColor" : "white",
"hitColor" : "rgba(0, 30, 60, 0.7)",
Expand All @@ -45,6 +47,10 @@ body {
height:100%;
}

a{
color: $params.linkColor;
}

/*
body * {
position: relative;
Expand Down
6 changes: 5 additions & 1 deletion client/src/main/webapp/js/browse.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ Browse.prototype = {
var doc = arr[i];
var div = $('<li/>', {class: 'res policy'});
div.data("pid", doc.PID);
var title = $('<span class="title">' + doc['dc.title'] + '</span>');
var dcTitle = doc['dc.title'];
if(dcTitle.length === 0){
dcTitle = K5.i18n.translatable("dctitle.none");
}
var title = $('<span class="title">' + dcTitle + '</span>');
title.click(function() {
K5.api.gotoDisplayingItemPage($(this).parent().data("pid"));
});
Expand Down
17 changes: 15 additions & 2 deletions client/src/main/webapp/js/leftthumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,11 @@ LeftThumbs.prototype = {
$(this).tooltip("option", "content", $(this).data("tt"));
});
$('td.thumb').removeClass("hit chit");
this.getHits();
this.getHits(true);
}
cleanWindow();
},
getHits: function() {
getHits: function(showalert) {
if ($("#q").val() === "") {
return;
}
Expand All @@ -195,11 +195,24 @@ LeftThumbs.prototype = {
var q = "q=" + $("#q").val() + "&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, _.bind(function(data) {
var numFound = data.response.numFound;
console.log("Hits: " + data.response.numFound);
//console.log(JSON.stringify(data));
this.hits = data.response.docs;
this.highlighting = data.highlighting;
this.setHitClass();

if(showalert){
var key = 'common.page.plural_2';
if (numFound > 4) {
key = 'common.page.plural_2';
} else if (numFound > 1) {
key = 'common.page.plural_1';
} else {
key = 'common.page.singural';
}
alert(K5.i18n.ctx.dictionary["common.found"] + " " + numFound + " " + K5.i18n.ctx.dictionary[key]);
}
}, this));
} else {
this.setHitClass();
Expand Down

0 comments on commit 77f91aa

Please sign in to comment.