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
Tweak prettysimple demo for mobile.
[mkws-moved-to-github.git]
/
src
/
mkws-team.js
diff --git
a/src/mkws-team.js
b/src/mkws-team.js
index
509fc2f
..
7ec9c2f
100644
(file)
--- a/
src/mkws-team.js
+++ b/
src/mkws-team.js
@@
-408,7
+408,7
@@
mkws.makeTeam = function($, teamName) {
}
function renderDetails(data, marker) {
}
function renderDetails(data, marker) {
- var template = loadTemplate("Record");
+ var template = loadTemplate("details");
var details = template(data);
return '<div class="mkws-details mkwsDetails mkwsTeam_' + m_teamName + '" ' +
'id="' + recordDetailsId(data.recid[0]) + '">' + details + '</div>';
var details = template(data);
return '<div class="mkws-details mkwsDetails mkwsTeam_' + m_teamName + '" ' +
'id="' + recordDetailsId(data.recid[0]) + '">' + details + '</div>';
@@
-417,11
+417,20
@@
mkws.makeTeam = function($, teamName) {
that.registerTemplate = function(name, text) {
that.registerTemplate = function(name, text) {
+ if(mkws._old2new.hasOwnProperty(name)) {
+ mkws.log("Warning: registerTemplate old widget name: " + name + " => " + mkws._old2new[name]);
+ name = mkws._old2new[name];
+ }
m_templateText[name] = text;
};
function loadTemplate(name, fallbackString) {
m_templateText[name] = text;
};
function loadTemplate(name, fallbackString) {
+ if(mkws._old2new.hasOwnProperty(name)) {
+ mkws.log("Warning loadTemplate: old widget name: " + name + " => " + mkws._old2new[name]);
+ name = mkws._old2new[name];
+ }
+
var template = m_template[name];
if (template === undefined && Handlebars.compile) {
var source;
var template = m_template[name];
if (template === undefined && Handlebars.compile) {
var source;
@@
-429,12
+438,6
@@
mkws.makeTeam = function($, teamName) {
if (node && node.length < 1) {
node = $(".mkws-template-" + name);
}
if (node && node.length < 1) {
node = $(".mkws-template-" + name);
}
- if (node && node.length < 1) {
- node = $(".mkws-template_" + name + " .mkws-team-" + that.name());
- }
- if (node && node.length < 1) {
- node = $(".mkws-template_" + name);
- }
if (node) source = node.html();
if (!source) source = m_templateText[name];
if (source) {
if (node) source = node.html();
if (!source) source = m_templateText[name];
if (source) {