More use of widgetNode
[mkws-moved-to-github.git] / src / mkws-team.js
index b986988..38b8507 100644 (file)
@@ -333,7 +333,7 @@ function team($, teamName) {
     // switching view between targets and records
     function switchView(view) {
        var targets = widgetNode('Targets');
-       var results = findnode('.mkwsResults,.mkwsRecords');
+       var results = widgetNode('Results') || widgetNode('Records');
        var blanket = widgetNode('Blanket');
        var motd    = widgetNode('MOTD');
 
@@ -452,13 +452,13 @@ function team($, teamName) {
        mkwsHtmlSwitch();
 
        findnode('.mkwsSearchForm').submit(function() {
-           var val = findnode('.mkwsQuery').val();
+           var val = widgetNode('Query').val();
            newSearch(val);
            return false;
        });
 
        // on first page, hide the termlist
-       $(document).ready(function() { findnode(".mkwsTermlists").hide(); });
+       $(document).ready(function() { widgetNode("Termlists").hide(); });
         var container = findnode(".mkwsMOTDContainer");
        if (container.length) {
            // Move the MOTD from the provided element down into the container