Eliminate the addSingleScaffold function, inlining its code.
authorMike Taylor <mike@indexdata.com>
Fri, 4 Apr 2014 15:28:24 +0000 (16:28 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 4 Apr 2014 15:28:24 +0000 (16:28 +0100)
src/mkws-widget-termlists.js

index 166c853..96862e9 100644 (file)
@@ -30,12 +30,8 @@ mkws.registerWidgetType('Termlists', function() {
            if (!ref) {
                alert("bad facet configuration: '" + name + "'");
            } else {
-               addSingleScaffold(acc, ref[0]);
-               function addSingleScaffold(acc, caption) {
-                   var teamName = that.team.name();
-                   acc.push('<div class="mkwsFacet mkwsFacet' + caption + ' mkwsTeam_' + teamName + '">');
-                   acc.push('</div>');
-               }
+               acc.push('<div class="mkwsFacet mkwsFacet' + ref[0] + ' mkwsTeam_' + that.team.name() + '">');
+               acc.push('</div>');
            }
        }