Permalink
Browse files

Issue #455

  • Loading branch information...
Pavel Stastny
Pavel Stastny committed May 19, 2017
1 parent ab788c1 commit 789b123c061ab8e539687e527294212fbf70c3c2
Showing with 33 additions and 21 deletions.
  1. +13 −12 client/src/main/webapp/js/api.js
  2. +5 −1 client/src/main/webapp/js/results.js
  3. +15 −8 client/src/main/webapp/js/vc.js
@@ -93,19 +93,20 @@ ClientAPIDev.prototype = {
* @method
*/
askForCollections : function(sort, sortType, whenready) {
if (!sort) {
sort = "ASC";
}
if (!sortType) {
sortType = "ALPHABET"
}
var url = "api/vc?sort="+sort+"&sortType="+sortType+"&langCode=";
if (K5 && K5.i18n.ctx.language){
url += K5.i18n.ctx.language;
} else {
url += 'cs';
}
var url = "api/vc";
if (sort) {
if (!sortType) {
sortType = "ALPHABET"
}
url = "api/vc?sort="+sort+"&sortType="+sortType+"&langCode="
if (K5 && K5.i18n.ctx.language){
url += K5.i18n.ctx.language;
} else {
url += 'cs';
}
}
$.getJSON(url, _.bind(function(data) {
var collections = {};
for (var i = 0; i < data.length; i++) {
@@ -311,7 +311,11 @@ Result.prototype = {
var policy = $('<div/>', {class: 'policy'});
if (doc['dostupnost']) {
policy.addClass(doc['dostupnost']);
policy.attr("title", doc['dostupnost']);
policy.addClass("translate_title");
policy.attr("data-key","dostupnost."+doc['dostupnost']);
//policy.attr("title", doc['dostupnost']);
policy.attr("title", K5.i18n.translate("dostupnost."+doc['dostupnost']));
}
var divimg = $('<div/>', {class: 'img'});
@@ -9,18 +9,21 @@ var VirtualCollections = function(application) {
K5.api.askForCollections(this.sort, this.sortType);
}
if (type === "api/vc") {
this.check();
this.init();
if (K5.gui.page && K5.gui.page === "collections") {
this.check();
this.init();
this.translate(K5.i18n.ctx.language);
this.translate(K5.i18n.ctx.language);
this.resizediv();
this.resizediv();
$("#yearRows").bind("wresize", function() {
K5.gui.vc.resizediv();
});
$("#yearRows").bind("wresize", function() {
K5.gui.vc.resizediv();
});
this.checkArrows();
this.checkArrows();
} else return;
}
},this);
@@ -345,7 +348,11 @@ VirtualCollection.prototype = {
this.container.append(thumb);
var policy = $('<div/>', {class: 'policy'});
if (docs[i]['dostupnost']) {
policy.addClass("translate_title");
policy.attr("data-key","dostupnost."+docs[i]['dostupnost']);
policy.addClass(docs[i]['dostupnost']);
policy.attr("title", K5.i18n.translate("dostupnost."+docs[i]['dostupnost']));
}
thumb.append(policy);

0 comments on commit 789b123

Please sign in to comment.