Commit 010de8df authored by Marc Duez's avatar Marc Duez
Browse files

database.js : function to display a warning before a dangerous action

parent 9d143584
......@@ -251,6 +251,15 @@ Database.prototype = {
}
});
},
warning: function(msg, fct) {
msg +="</br></br> <div class='center' > <button onclick=\"" + fct + "\">continue</button></div>"
this.display(msg)
},
wait: function () {
},
/*récupére et initialise le browser avec un fichier .data
* args => format json ( parametre attendu > patient_id, config_id)
......@@ -284,8 +293,7 @@ Database.prototype = {
}
});
},
//affiche la fenetre de dialogue avec le serveur et affiche ses réponses
display: function (msg) {
document.getElementById("db_div")
......@@ -301,5 +309,7 @@ Database.prototype = {
document.getElementById("db_msg")
.innerHTML = "";
}
}
......@@ -1603,4 +1603,5 @@ var msg = {
"browser_error": "It seems you used an incompatible web browser (too old or too weak)." + "</br>We recommend to install one of those for a better experience : " + "</br> <a href='http://www.mozilla.org/'> Firefox </a> " + "</br> <a href='www.google.com/chrome/'> Chrome </a> " + "</br> <a href='http://www.chromium.org/getting-involved/download-chromium'> Chromium </a> " + "</br></br> <div class='center' > <button onclick='popupMsg(msg.welcome)'>i want to try anyway</button></div>",
"delete_file": "warning, this file will be deleted, download it before if you want to keep it, all data generated with this file will also be deleted. " + "</br> are you sure you want to continue ?"
}
\ No newline at end of file
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