projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e2e082f
)
Simplify team-creation logic
author
Mike Taylor
<mike@indexdata.com>
Wed, 5 Feb 2014 16:13:44 +0000
(16:13 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 5 Feb 2014 16:13:44 +0000
(16:13 +0000)
tools/htdocs/mkws.js
patch
|
blob
|
history
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
40cde79
..
9f6c7b2
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-1293,17
+1293,16
@@
function _mkws_jquery_plugin ($) {
// For all MKWS-classed nodes that don't have a team
// specified, set the team to AUTO.
// For all MKWS-classed nodes that don't have a team
// specified, set the team to AUTO.
- $('div[class^="mkws"],div[class*=" mkws"]').each(function () {
+ $('[class^="mkws"],[class*=" mkws"]').each(function () {
if (!this.className.match(/mkwsTeam_/)) {
log("adding AUTO team to node with class '" + this.className + "'");
$(this).addClass('mkwsTeam_AUTO');
}
});
if (!this.className.match(/mkwsTeam_/)) {
log("adding AUTO team to node with class '" + this.className + "'");
$(this).addClass('mkwsTeam_AUTO');
}
});
- // Find all nodes with class (NOT id) mkwsRecords, and
- // determine their team from the mkwsTeam_* class. So:
- // <div class="mkwsRecords mkwsTeam_foo"/>
- $('.mkwsSearch, .mkwsResults, .mkwsRecords, .mkwsTermlists').each(function () {
+ // Find all nodes with an class, and determine their team from
+ // the mkwsTeam_* class. Make all team objects.
+ $('[class^="mkws"],[class*=" mkws"]').each(function () {
var node = this;
mkws.handle_node_with_team(node, function(tname) {
if (mkws.teams[tname]) {
var node = this;
mkws.handle_node_with_team(node, function(tname) {
if (mkws.teams[tname]) {