Remove extraneous prefix.
[mkws-moved-to-github.git] / src / mkws-core.js
index 9cb794f..c49dc21 100644 (file)
@@ -84,39 +84,38 @@ if (mkws_config == null || typeof mkws_config != 'object') {
 }
 
 
-    mkws.log = function(string) {
-       if (!mkws.log_level)
-           return;
+mkws.log = function(string) {
+    if (!mkws.log_level)
+       return;
 
-       if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */
-           return;
-       }
+    if (typeof console === "undefined" || typeof console.log === "undefined") { /* ARGH!!! old IE */
+       return;
+    }
+
+    // you need to disable use strict at the top of the file!!!
+    if (mkws.log_level >= 3) {
+       console.log(arguments.callee.caller);
+    } else if (mkws.log_level >= 2) {
+       console.log(">>> called from function " + arguments.callee.caller.name + ' <<<');
+    }
+    console.log(string);
+};
 
-       // you need to disable use strict at the top of the file!!!
-       if (mkws.log_level >= 3) {
-           console.log(arguments.callee.caller);
-       } else if (mkws.log_level >= 2) {
-           console.log(">>> called from function " + arguments.callee.caller.name + ' <<<');
-       }
-       console.log(string);
-    };
 
+mkws.registerWidgetType = function(name, fn) {
+    mkws.widgetType2function[name] = fn;
+    mkws.log("registered widget-type '" + name + "'");
+};
+
+mkws.promotionFunction = function(name) {
+    return mkws.widgetType2function[name];
+};
 
 
 // wrapper to call team() after page load
 (function(j) {
     var log = mkws.log;
 
-    mkws.registerWidgetType = function(name, fn) {
-       mkws.widgetType2function[name] = fn;
-       log("registered widget-type '" + name + "'");
-    }
-
-    mkws.promotionFunction = function(name) {
-       return mkws.widgetType2function[name];
-    }
-
-
     function handleNodeWithTeam(node, callback) {
        // First branch for DOM objects; second branch for jQuery objects
        var classes = node.className || node.attr('class');
@@ -125,7 +124,7 @@ if (mkws_config == null || typeof mkws_config != 'object') {
            // undefined, we don't get an error message, but this
            // function and its callers, up several stack level,
            // silently return. What a crock.
-           mkws.log("handleNodeWithTeam() called on node with no classes");
+           log("handleNodeWithTeam() called on node with no classes");
            return;
        }
        var list = classes.split(/\s+/)
@@ -181,39 +180,39 @@ if (mkws_config == null || typeof mkws_config != 'object') {
     // this module.
     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();
-    }
+    };
 
 
     function defaultMkwsConfig() {