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 config() accessor function. Used only by widget factory.
[mkws-moved-to-github.git]
/
src
/
mkws-widgets.js
diff --git
a/src/mkws-widgets.js
b/src/mkws-widgets.js
index
78e98cf
..
2366614
100644
(file)
--- a/
src/mkws-widgets.js
+++ b/
src/mkws-widgets.js
@@
-13,7
+13,7
@@
function widget($, team, type, node) {
that.toString = function() {
return '[Widget ' + team.name() + ':' + type + ']';
that.toString = function() {
return '[Widget ' + team.name() + ':' + type + ']';
- }
+ };
var fn = mkws.promotionFunction(type);
if (fn) {
var fn = mkws.promotionFunction(type);
if (fn) {
@@
-87,7
+87,8
@@
mkws.registerWidgetType('Termlists', function() {
}
// no facets: this should never happen
}
// no facets: this should never happen
- if (!mkws_config.facets || mkws_config.facets.length == 0) {
+ var facets = mkws.config.facets;
+ if (!facets || facets.length == 0) {
alert("onTerm called even though we have no facets: " + $.toJSON(data));
$(that.node).hide();
return;
alert("onTerm called even though we have no facets: " + $.toJSON(data));
$(that.node).hide();
return;
@@
-98,7
+99,6
@@
mkws.registerWidgetType('Termlists', function() {
var acc = [];
acc.push('<div class="title">' + M('Termlists') + '</div>');
var acc = [];
acc.push('<div class="title">' + M('Termlists') + '</div>');
- var facets = mkws_config.facets;
for (var i = 0; i < facets.length; i++) {
if (facets[i] == "xtargets") {
for (var i = 0; i < facets.length; i++) {
if (facets[i] == "xtargets") {