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:
2dfad81
)
Remove lumped team.widgetTypes method with more functional visitWidgets.
author
Mike Taylor
<mike@indexdata.com>
Thu, 1 May 2014 13:08:24 +0000
(14:08 +0100)
committer
Mike Taylor
<mike@indexdata.com>
Thu, 1 May 2014 13:08:24 +0000
(14:08 +0100)
src/mkws-team.js
patch
|
blob
|
history
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
ab53e94
..
c6c5490
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-440,10
+440,13
@@
function team($, 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) {