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:
88a5ef9
)
Reorder functions.
author
Mike Taylor
<mike@indexdata.com>
Wed, 27 Nov 2013 11:51:45 +0000
(11:51 +0000)
committer
Mike Taylor
<mike@indexdata.com>
Wed, 27 Nov 2013 11:51:45 +0000
(11:51 +0000)
tools/htdocs/mkws.js
patch
|
blob
|
history
diff --git
a/tools/htdocs/mkws.js
b/tools/htdocs/mkws.js
index
7d5856e
..
2ffffef
100644
(file)
--- a/
tools/htdocs/mkws.js
+++ b/
tools/htdocs/mkws.js
@@
-655,6
+655,23
@@
function renderDetails(data, marker)
return '<div class="details" id="mkwsDet_' + data.recid + '">' + details + '</div>';
}
return '<div class="details" id="mkwsDet_' + data.recid + '">' + details + '</div>';
}
+
+function maybeLoadTemplate(name)
+{
+ var source = $("#mkwsTemplate" + name).html();
+ if (!source) {
+ debug("no template '" + name + "': falling back to default behaviour");
+ // Mark template as not provided
+ mkws['template' + name] = 0;
+ return;
+ }
+
+ var template = Handlebars.compile(source);
+ debug("compiled template '" + name + "'");
+ mkws['template' + name] = template;
+}
+
+
function defaultRenderDetails(data, marker)
{
var details = '<table>';
function defaultRenderDetails(data, marker)
{
var details = '<table>';
@@
-680,22
+697,6
@@
function defaultRenderDetails(data, marker)
}
}
-function maybeLoadTemplate(name)
-{
- var source = $("#mkwsTemplate" + name).html();
- if (!source) {
- debug("no template '" + name + "': falling back to default behaviour");
- // Mark template as not provided
- mkws['template' + name] = 0;
- return;
- }
-
- var template = Handlebars.compile(source);
- debug("compiled template '" + name + "'");
- mkws['template' + name] = template;
-}
-
-
function renderField(caption, data, data2, data3) {
if (data === undefined) {
return "";
function renderField(caption, data, data2, data3) {
if (data === undefined) {
return "";