X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=experiments%2Fspclient%2Fmkws.js;h=d3749905da5574ea72e3042f1ee8c17a2ff11304;hb=ff24fce4143dcbda6d62e16e1c8112eaad0baac2;hp=82b431bd9fde66608cb55f86ae4243d09891c7e3;hpb=6b18f26300187eaa2d3c9abde60fb8cfb6a65daf;p=mkws-moved-to-github.git
diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js
index 82b431b..d374990 100644
--- a/experiments/spclient/mkws.js
+++ b/experiments/spclient/mkws.js
@@ -30,6 +30,11 @@ var mkws_locale_lang = {
"to": "von",
"of": "aus",
"found": "gefunden",
+ "Title": "Titel",
+ "Author": "Autor",
+ "Date": "Datum",
+ "Subject": "Schlagwort",
+ "Location": "Ort",
"dummy": "dummy"
},
@@ -49,6 +54,11 @@ var mkws_locale_lang = {
"to": "til",
"of": "ud af",
"found": "fandt",
+ "Title": "Title",
+ "Author": "Author",
+ "Date": "Dato",
+ "Subject": "Subject",
+ "Location": "Location",
"dummy": "dummy"
}
@@ -401,7 +411,7 @@ function renderDetails(data, marker)
var details = '
';
if (marker) details += ''+ marker + ' |
';
if (data["md-title"] != undefined) {
- details += 'Title | : '+data["md-title"];
+ details += ' |
' + M('Title') + ' | : '+data["md-title"];
if (data["md-title-remainder"] !== undefined) {
details += ' : ' + data["md-title-remainder"] + ' ';
}
@@ -411,15 +421,15 @@ function renderDetails(data, marker)
details += ' |
';
}
if (data["md-date"] != undefined)
- details += 'Date | : ' + data["md-date"] + ' |
';
+ details += '' + M('Date') + ' | : ' + data["md-date"] + ' |
';
if (data["md-author"] != undefined)
- details += 'Author | : ' + data["md-author"] + ' |
';
+ details += '' + M('Author') + ' | : ' + data["md-author"] + ' |
';
if (data["md-electronic-url"] != undefined)
details += 'URL | : ' + data["md-electronic-url"] + '' + ' |
';
if (data["location"][0]["md-subject"] != undefined)
- details += 'Subject | : ' + data["location"][0]["md-subject"] + ' |
';
+ details += '' + M('Subject') + ' | : ' + data["location"][0]["md-subject"] + ' |
';
if (data["location"][0]["@name"] != undefined)
- details += 'Location | : ' + data["location"][0]["@name"] + " (" +data["location"][0]["@id"] + ")" + ' |
';
+ details += '' + M('Location') + ' | : ' + data["location"][0]["@name"] + " (" +data["location"][0]["@id"] + ")" + ' |
';
details += '
';
return details;
}
@@ -437,7 +447,8 @@ function mkws_html_all(data) {
sort_default: "relevance",
perpage_default: 20,
query_width: 50,
- switch: true, /* show/hide Records|Targets menu */
+ switch_menu: true, /* show/hide Records|Targets menu */
+ lang_menu: true, /* show/hide language menu */
debug: 0, /* debug level for development: 0..2 */
dummy: "dummy"
@@ -455,16 +466,21 @@ function mkws_html_all(data) {
config[k] = data[k];
debug("Set config: " + k + ' => ' + data[k]);
}
+ if (mkws_config.query_width < 5 || mkws_config.query_width > 150) {
+ debug("Reset query width: " + mkws_config.query_width);
+ mkws_config.query_width = 50;
+ }
mkws_set_lang(mkws_config);
- mkws_html_lang(mkws_config);
+ if (mkws_config.lang_menu)
+ mkws_html_lang(mkws_config);
// For some reason, doing this programmatically results in
// document.search.query being undefined, hence the raw HTML.
debug("HTML search form");
$("#mkwsSearch").html('\
- ');
@@ -477,7 +493,7 @@ function mkws_html_all(data) {
\
\
| \
\
- \
- ');
+ ');
mkws_html_switch(config);
if (mkws_config.use_service_proxy)
@@ -532,8 +547,8 @@ function mkws_html_switch(config) {
');
$("#mkwsTargets").css("display", "none");
- if (!config.switch) {
- debug("disable switch");
+ if (!config.switch_menu) {
+ debug("disable switch menu");
$("#mkwsSwitch").css("display", "none");
}
}
@@ -657,7 +672,8 @@ jQuery.extend({
function debug(string) {
if (!mkws_debug)
return;
-
+
+ var console; // IE8 quirks
if (!console) { /* ARGH!!! */
return;
}