Commit 2b8de937 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

database.js: looks at res.success to have either an INFO or a WARN flash

parent d251d9e8
......@@ -188,10 +188,11 @@ Database.prototype = {
m.parseJsonAnalysis(result)
m.initClones()
}
//TODO server need to return message priority too ( 0=console, 1=ok, 2=error)
if (res.message) console.log({"type": "flash", "msg": "database : " + res.message , "priority": 1})
// server message
if (res.message) console.log({"type": "flash",
"msg": "database : " + res.message,
"priority": res.success == "false" ? 2 : 1}) // res.success can be 'undefined'
return res
if (this.url.length == 1) $("#db_back").addClass("inactive");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment