From: Wolfram Schneider Date: Thu, 12 Dec 2013 15:00:37 +0000 (+0000) Subject: Revert "Eliminate superfluous temporary assignments." X-Git-Tag: 0.9.1~60^2~8 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=99fdcf8c4e10b7da14cc23221318f24148dd0acf;p=mkws-moved-to-github.git Revert "Eliminate superfluous temporary assignments." This reverts commit bba27d39caf95d9f0c4684f1f4d49ac8747ca03c. Actually, these are not superfluous. The variables are used in the jasmine framework to check if the config values make sense before calling new pz2( {}) with an json object. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 281f5b2..892acef 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -22,6 +22,11 @@ if (!mkws_config) // Wrapper for jQuery (function ($) { +var pazpar2_url = mkws_config.pazpar2_url || "http://mkws.indexdata.com/service-proxy/"; + +mkws.pazpar2path = pazpar2_url; +mkws.usesessions = mkws_config.use_service_proxy ? false : true; + mkws.locale_lang = { "de": { "Authors": "Autoren", @@ -218,13 +223,13 @@ for (var key in mkws_config) { // autoInit is set to true on default var my_paz = new pz2( { "onshow": my_onshow, "showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way - "pazpar2path": mkws_config.pazpar2_url || "http://mkws.indexdata.com/service-proxy/", + "pazpar2path": mkws.pazpar2path, "oninit": my_oninit, "onstat": my_onstat, "onterm": my_onterm, "termlist": "xtargets,subject,author", "onbytarget": my_onbytarget, - "usesessions" : mkws_config.use_service_proxy ? false : true, + "usesessions" : mkws.usesessions, "showResponseType": '', // or "json" (for debugging?) "onrecord": my_onrecord } );