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
Tidy up other SP authentication message.
[mkws-moved-to-github.git]
/
src
/
mkws-team.js
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
2e6db95
..
f4e0c88
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-126,6
+126,7
@@
function team($, teamName) {
queue("firstrecords").publish(hitcount);
}
if (parseInt(data.activeclients[0], 10) === 0) {
queue("firstrecords").publish(hitcount);
}
if (parseInt(data.activeclients[0], 10) === 0) {
+ log("complete");
queue("complete").publish(hitcount);
}
}
queue("complete").publish(hitcount);
}
}
@@
-385,7
+386,7
@@
function team($, teamName) {
};
};
- function loadTemplate(name) {
+ function loadTemplate(name, fallbackString) {
var template = m_template[name];
if (template === undefined) {
var template = m_template[name];
if (template === undefined) {
@@
-399,13
+400,20
@@
function team($, teamName) {
source = node.html();
}
source = node.html();
}
+ // If the template is not defined in HTML, check the following
+ // in order: template registered in the team by a widget;
+ // fallback string provided on this invocation; global default.
if (!source) {
source = m_templateText[name];
}
if (!source) {
if (!source) {
source = m_templateText[name];
}
if (!source) {
+ source = fallbackString;
+ }
+ if (!source) {
source = mkws.defaultTemplate(name);
}
source = mkws.defaultTemplate(name);
}
+ if (!source) return null;
template = Handlebars.compile(source);
log("compiled template '" + name + "'");
m_template[name] = template;
template = Handlebars.compile(source);
log("compiled template '" + name + "'");
m_template[name] = template;