Merged bug25778 into default
This commit is contained in:
commit
611f1d5b99
|
|
@ -742,9 +742,16 @@ function replace_content(id, html) {
|
|||
$("#" + id).html(html);
|
||||
}
|
||||
|
||||
var ejs_cached = {};
|
||||
|
||||
function format(template, json) {
|
||||
try {
|
||||
var tmpl = new EJS({url: 'js/tmpl/' + template + '.ejs'});
|
||||
var cache = true;
|
||||
if (!(template in ejs_cached)) {
|
||||
ejs_cached[template] = true;
|
||||
cache = false;
|
||||
}
|
||||
var tmpl = new EJS({url: 'js/tmpl/' + template + '.ejs', cache: cache});
|
||||
return tmpl.render(json);
|
||||
} catch (err) {
|
||||
clearInterval(timer);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ module_path(Module) ->
|
|||
filename:dirname(filename:dirname(Here)).
|
||||
|
||||
respond(Req, LocalPaths, WMLoop) ->
|
||||
Path = Req:get(raw_path),
|
||||
Path = Req:get(path),
|
||||
Redirect = fun(L) -> {301, [{"Location", L}], ""} end,
|
||||
case Path of
|
||||
"/api/" ++ Rest when length(Rest) > 0 ->
|
||||
|
|
|
|||
Loading…
Reference in New Issue