Copy mkws_config into mkws.config, and thereafter use that
[mkws-moved-to-github.git] / src / mkws-widgets.js
index 104ac91..34b66c0 100644 (file)
@@ -13,14 +13,14 @@ function widget($, team, type, node) {
 
     that.toString = function() {
        return '[Widget ' + team.name() + ':' + type + ']';
-    }
+    };
 
     var fn = mkws.promotionFunction(type);
     if (fn) {
        fn.call(that);
        log("made " + type + " widget(node=" + node + ")");
     } else {
-       log("made UNENCAPSULATED widget(type=" + type + ", node=" + node + ")");
+       log("made UNPROMOTED widget(type=" + type + ", node=" + node + ")");
     }
 
     return that;
@@ -87,7 +87,7 @@ mkws.registerWidgetType('Termlists', function() {
        }
 
        // no facets: this should never happen
-       if (!mkws_config.facets || mkws_config.facets.length == 0) {
+       if (!mkws.config.facets || mkws.config.facets.length == 0) {
            alert("onTerm called even though we have no facets: " + $.toJSON(data));
            $(that.node).hide();
            return;
@@ -98,7 +98,7 @@ mkws.registerWidgetType('Termlists', function() {
 
        var acc = [];
        acc.push('<div class="title">' + M('Termlists') + '</div>');
-       var facets = mkws_config.facets;
+       var facets = mkws.config.facets;
 
        for (var i = 0; i < facets.length; i++) {
            if (facets[i] == "xtargets") {
@@ -271,7 +271,7 @@ mkws.registerWidgetType('Navi', function() {
 mkws.registerWidgetType('Sort', function() {
     var that = this;
 
-    $(this.node).change(function () {
+    $(this.node).change(function() {
        that.team.set_sortOrder($(that.node).val());
        if (that.team.submitted()) {
            that.team.resetPage();