projects
/
mkws-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New team object made for relevant mkwsResults, mkwsRecords or mkwsTermlists.
[mkws-moved-to-github.git]
/
tools
/
htdocs
/
mkws.js
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
1bcebda
..
e721d8c
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-1409,7
+1409,7
@@
function _mkws_jquery_plugin ($) {
// <div class="mkwsRecords mkwsTeam_foo"/>
// ### Down the line we will also want teams that have facet
// divs but no results. But not today.
// <div class="mkwsRecords mkwsTeam_foo"/>
// ### Down the line we will also want teams that have facet
// divs but no results. But not today.
- $('.mkwsRecords').each(function () {
+ $('.mkwsResults, .mkwsRecords, .mkwsTermlists').each(function () {
var node = this;
var classes = this.className;
var list = classes.split(/\s+/)
var node = this;
var classes = this.className;
var list = classes.split(/\s+/)
@@
-1420,11
+1420,13
@@
function _mkws_jquery_plugin ($) {
tname = cname.replace(/^mkwsTeam_/, '');
}
}
tname = cname.replace(/^mkwsTeam_/, '');
}
}
- if (tname) {
+ if (!tname) {
+ alert("No MKWS team specified for mkwsRecords element with classes '" + classes + "'");
+ } else if (mkws.teams[tname]) {
+ log("MKWS team '" + tname + "' already exists, skipping");
+ } else {
mkws.teams[tname] = _make_mkws_team(j, tname);
log("Made MKWS team '" + tname + "'");
mkws.teams[tname] = _make_mkws_team(j, tname);
log("Made MKWS team '" + tname + "'");
- } else {
- alert("No MKWS team specified for mkwsRecords element with classes '" + classes + "'");
}
});
}
});