nodes that either belong to the specified team, or in the case that
the team is "AUTO", no team at all. This makes it possible for us to
avoid decorating nodes with mkwsTeam_AUTO classes.
Down the line, we should be able to make this cleaner by having each
class know what widgets it contains, so we don't need to do this
findnode magic -- ideally so we don't need findnode at all.
teamName = teamName || m_teamName;
selector = $.map(selector.split(','), function(s, i) {
- return s + '.mkwsTeam_' + teamName;
+ if (teamName === 'AUTO') {
+ return (s + '.mkwsTeam_' + teamName + ',' +
+ s + ':not([class^="mkwsTeam"],[class*=" mkwsTeam"])');
+ } else {
+ return s + '.mkwsTeam_' + teamName;
+ }
}).join(',');
var node = $(selector);