Merged bug25778 into default

This commit is contained in:
Emile Joubert 2013-09-26 10:02:11 +01:00
commit 611f1d5b99
2 changed files with 9 additions and 2 deletions

View File

@ -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);

View File

@ -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 ->