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
Less verbose logging when a widget makes new HTML on creation.
[mkws-moved-to-github.git]
/
src
/
mkws-team.js
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
2bac42e
..
c6c5490
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-430,20
+430,23
@@
function team($, teamName) {
that.addWidget = function(w) {
if (!m_widgets[w.type]) {
m_widgets[w.type] = w;
that.addWidget = function(w) {
if (!m_widgets[w.type]) {
m_widgets[w.type] = w;
- log("Registered '" + w.type + "' widget in team '" + m_teamName + "'");
+ //log("Added '" + w.type + "' widget to team '" + m_teamName + "'");
} else if (typeof(m_widgets[w.type]) !== 'number') {
m_widgets[w.type] = 2;
} else if (typeof(m_widgets[w.type]) !== 'number') {
m_widgets[w.type] = 2;
- log("Registered duplicate '" + w.type + "' widget in team '" + m_teamName + "'");
+ //log("Added duplicate '" + w.type + "' widget to team '" + m_teamName + "'");
} else {
m_widgets[w.type] += 1;
} else {
m_widgets[w.type] += 1;
- log("Registered '" + w.type + "' widget #" + m_widgets[w.type] + "' in team '" + m_teamName + "'");
+ //log("Added '" + w.type + "' widget #" + m_widgets[w.type] + "' to team '" + m_teamName + "'");
}
}
}
}
- that.widgetTypes = function() {
- var keys = [];
- for (var k in m_widgets) keys.push(k);
- return keys.sort();
+ that.visitWidgets = function(callback) {
+ for (var type in m_widgets) {
+ var res = callback(type, m_widgets[type]);
+ if (res !== undefined)
+ return res;
+ }
+ return undefined;
}
that.widget = function(type) {
}
that.widget = function(type) {