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
Add boolean target_filtered() function.
[mkws-moved-to-github.git]
/
tools
/
htdocs
/
mkws.js
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
2abcfca
..
7b6041e
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-329,11
+329,13
@@
function team($, teamName) {
for (var i = 0; i < data.length && i < max; i++) {
acc.push('<div class="term">');
acc.push('<a href="#" ');
for (var i = 0; i < data.length && i < max; i++) {
acc.push('<div class="term">');
acc.push('<a href="#" ');
- var action;
+ var action = '';
if (!pzIndex) {
// Special case: target selection
acc.push('target_id='+data[i].id+' ');
if (!pzIndex) {
// Special case: target selection
acc.push('target_id='+data[i].id+' ');
- action = 'mkws.limitTarget(\'' + m_teamName + '\', this.getAttribute(\'target_id\'),this.firstChild.nodeValue)';
+ if (!target_filtered(data[i].id)) {
+ action = 'mkws.limitTarget(\'' + m_teamName + '\', this.getAttribute(\'target_id\'),this.firstChild.nodeValue)';
+ }
} else {
action = 'mkws.limitQuery(\'' + m_teamName + '\', \'' + pzIndex + '\', this.firstChild.nodeValue)';
}
} else {
action = 'mkws.limitQuery(\'' + m_teamName + '\', \'' + pzIndex + '\', this.firstChild.nodeValue)';
}
@@
-345,6
+347,18
@@
function team($, teamName) {
}
}
+ function target_filtered(id) {
+ debug("target_filtered(" + id + ")");
+ for (var i = 0; i < m_filters.length; i++) {
+ if (m_filters[i].id === id ||
+ m_filters[i].id === 'pz:id=' + id) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
function my_onrecord(data, args, teamName) {
debug("record: teamName=" + teamName + ", m_teamName=" + m_teamName);
// FIXME: record is async!!
function my_onrecord(data, args, teamName) {
debug("record: teamName=" + teamName + ", m_teamName=" + m_teamName);
// FIXME: record is async!!