};
+mkws.objectWithParent = function(parent) {
+ function thing() {} // Must be function so `prototype' works
+
+ thing.prototype = parent;
+ var res = new thing();
+ thing.prototype = null;
+ return res;
+};
+
+
mkws.registerWidgetType = function(name, fn) {
mkws.widgetType2function[name] = fn;
mkws.log("registered widget-type '" + name + "'");
$(document).ready(function() {
mkws.defaultMkwsConfig();
- if (mkws_config.query_width < 5 || mkws_config.query_width > 150) {
- log("Reset query width: " + mkws_config.query_width);
- mkws_config.query_width = 50;
- }
-
for (var key in mkws_config) {
if (mkws_config.hasOwnProperty(key)) {
if (key.match(/^language_/)) {
}
}
- if (mkws_config.responsive_design_width) {
- // Responsive web design - change layout on the fly based on
- // current screen width. Required for mobile devices.
- $(window).resize(resizePage);
- // initial check after page load
- $(document).ready(resizePage);
+ if (mkws_config.query_width < 5 || mkws_config.query_width > 150) {
+ log("Reset query width: " + mkws_config.query_width);
+ mkws_config.query_width = 50;
}
// protocol independent link for pazpar2: "//mkws/sp" -> "https://mkws/sp"
log("adjust protocol independent links: " + mkws_config.pazpar2_url);
}
+ if (mkws_config.responsive_design_width) {
+ // Responsive web design - change layout on the fly based on
+ // current screen width. Required for mobile devices.
+ $(window).resize(resizePage);
+ // initial check after page load
+ $(document).ready(resizePage);
+ }
+
// Backwards compatibility: set new magic class names on any
// elements that have the old magic IDs.
var ids = [ "Switch", "Lang", "Search", "Pager", "Navi",