\
+
\
No information available yet.\
');
$("#mkwsTargets").css("display", "none");
@@ -603,25 +676,22 @@ function mkws_html_perpage(config) {
*/
function mkws_service_proxy_auth(auth_url) {
if (!auth_url)
- auth_url = "/service-proxy-auth";
-
+ auth_url = "http://mkws.indexdata.com/service-proxy-auth";
+
debug("Run service proxy auth URL: " + auth_url);
- var jqxhr = jQuery.get(auth_url)
- .fail(function() {
- alert("service proxy authentication failed, give up!");
- })
- .success(function(data) {
- if (!jQuery.isXMLDoc(data)) {
- alert("service proxy auth response document is not valid XML document, give up!");
- return;
- }
- var status = $(data).find("status");
- if (status.text() != "OK") {
- alert("service proxy auth repsonse status: " + status.text() + ", give up!");
- return;
- }
- });
+ var request = new pzHttpRequest(auth_url);
+ request.get(null, function(data) {
+ if (!jQuery.isXMLDoc(data)) {
+ alert("service proxy auth response document is not valid XML document, give up!");
+ return;
+ }
+ var status = $(data).find("status");
+ if (status.text() != "OK") {
+ alert("service proxy auth repsonse status: " + status.text() + ", give up!");
+ return;
+ }
+ });
}
/* create locale language menu */
@@ -636,34 +706,59 @@ function mkws_html_lang(mkws_config) {
for (var i = 0; i < lang_display.length; i++) {
hash[lang_display[i]] = 1;
}
-
- if (hash[lang_default] == 1)
- list.push(lang_default);
for (var k in mkws_locale_lang) {
if (hash[k] == 1 || lang_display.length == 0)
list.push(k);
}
+
+ // add english link
+ if (lang_display.length == 0 || hash[lang_default] == 1)
+ list.push(lang_default);
+
debug("Language menu for: " + list.join(", "));
/* the HTML part */
- var data = "";
+ var data = "";
for(var i = 0; i < list.length; i++) {
var l = list[i];
-
+
if (data)
data += ' | ';
-
+
if (lang == l) {
- data += l;
+ data += '
' + l + ' ';
} else {
data += '
' + l + ' '
}
}
-
+
$("#mkwsLang").html(data);
}
+function mkws_mobile_resize () {
+ debug("resize width: " + $(window).height() + ", width: " + $(window).width());
+ var list = ["mkwsSwitch"];
+ var obj;
+ // alert($(window).width());
+
+ if ($(window).width() <= 980) {
+ for(var i = 0; i < list.length; i++) {
+ $("#" + list[i]).hide();
+ }
+
+ $("#mkwsTermlists").parent().hide();
+ obj = $("#mkwsTermlists").parent().html();
+ $("#mkwsShiftedTermlists").html("
" + obj);
+ } else {
+ for(var i = 0; i < list.length; i++) {
+ $("#" + list[i]).show();
+ }
+ $("#mkwsTermlists").parent().show();
+ $("#mkwsShiftedTermlists").html("");
+ }
+};
+
/* locale */
function M(word) {
var lang = mkws_config.lang;
@@ -676,7 +771,7 @@ function M(word) {
/* implement jQuery.parseQuerystring() for parsing URL parameters */
jQuery.extend({
- parseQuerystring: function() {
+ parseQuerystring: function() {
var nvpair = {};
var qs = window.location.search.replace('?', '');
var pairs = qs.split('&');
@@ -685,13 +780,27 @@ jQuery.extend({
nvpair[pair[0]] = pair[1];
});
return nvpair;
-} });
+ },
+ pazpar2: function(data) {
+ document.write('
\
+
\
+
\
+
\
+
\
+ ');
+
+ mkws_html_all(mkws_config);
+ }
+});
function debug(string) {
if (!mkws_debug)
return;
- if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! */
+ if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */
return;
}