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:
4ee3bb8
)
mkwsTeam_AUTO is now added to add teamless MKWS elements.
author
Mike Taylor
<mike@indexdata.com>
Tue, 4 Feb 2014 16:44:37 +0000
(16:44 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Tue, 4 Feb 2014 16:44:37 +0000
(16:44 +0000)
tools/htdocs/mkws.js
patch
|
blob
|
history
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
17c10b1
..
1de5514
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-1311,11
+1311,20
@@
function _mkws_jquery_plugin ($) {
var id = 'mkws' + ids[i];
var node = $('#' + id);
if (node.attr('id')) {
var id = 'mkws' + ids[i];
var node = $('#' + id);
if (node.attr('id')) {
- node.addClass(id + " mkwsTeam_AUTO");
- log("added magic classes to '" + node.attr('id') + "'");
+ node.addClass(id);
+ log("added magic class to '" + node.attr('id') + "'");
}
}
}
}
+ // 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 () {
+ 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"/>
// Find all nodes with class (NOT id) mkwsRecords, and
// determine their team from the mkwsTeam_* class. So:
// <div class="mkwsRecords mkwsTeam_foo"/>
@@
-1352,8
+1361,6
@@
function _mkws_jquery_plugin ($) {
tname = cname.replace(/^mkwsTeam_/, '');
}
}
tname = cname.replace(/^mkwsTeam_/, '');
}
}
- if (!tname)
- tname = "AUTO";
callback(tname);
}
callback(tname);
}