- /* override standard config values by function parameters */
- for (var k in config_default) {
- if (typeof mkws_config[k] === 'undefined')
- mkws_config[k] = config_default[k];
- //log("Set config: " + k + ' => ' + mkws_config[k]);
- }
+
+// This code is from Douglas Crockford's article "Prototypal Inheritance in JavaScript"
+// http://javascript.crockford.com/prototypal.html
+// mkws.objectInheritingFrom behaves the same as Object.create,
+// but since the latter is not available in IE8 we can't use it.
+//
+mkws.objectInheritingFrom = function(o) {
+ function F() {}
+ F.prototype = o;
+ return new F();
+}
+
+
+// The following functions are dispatchers for team methods that
+// are called from the UI using a team-name rather than implicit
+// context.
+mkws.switchView = function(tname, view) {
+ mkws.teams[tname].switchView(view);
+};
+
+mkws.showDetails = function(tname, prefixRecId) {
+ mkws.teams[tname].showDetails(prefixRecId);
+};
+
+mkws.limitTarget = function(tname, id, name) {
+ mkws.teams[tname].limitTarget(id, name);
+};
+
+mkws.limitQuery = function(tname, field, value) {
+ mkws.teams[tname].limitQuery(field, value);
+};
+
+mkws.delimitTarget = function(tname, id) {
+ mkws.teams[tname].delimitTarget(id);
+};
+
+mkws.delimitQuery = function(tname, field, value) {
+ mkws.teams[tname].delimitQuery(field, value);
+};
+
+mkws.showPage = function(tname, pageNum) {
+ mkws.teams[tname].showPage(pageNum);
+};
+
+mkws.pagerPrev = function(tname) {
+ mkws.teams[tname].pagerPrev();
+};
+
+mkws.pagerNext = function(tname) {
+ mkws.teams[tname].pagerNext();