Commit fcb0fc45 authored by Marc Duez's avatar Marc Duez

browser : warning message if analysis file need to be saved

parent c379748d
......@@ -642,7 +642,7 @@ span .substitution {
}
/* ////////////////////////////////////////////////////////////// */
#popup-container {
z-index: 5;
z-index: 20;
border: solid;
position: fixed;
top: 250px;
......
......@@ -642,7 +642,7 @@ span .substitution {
}
/* ////////////////////////////////////////////////////////////// */
#popup-container {
z-index: 5;
z-index: 20;
border: solid;
position: fixed;
top: 250px;
......
......@@ -774,7 +774,7 @@ span .substitution{
#popup-container{
z-index:5;
z-index:20;
border:solid;
position: fixed;
top: 250px;
......
......@@ -79,7 +79,10 @@ function Com(flash_id, log_id, popup_id, data_id) {
+ "</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>",
"database_timeout": "Cannot connect database, please retry in a few seconds"
"database_timeout": "Cannot connect database, please retry in a few seconds",
"save_analysis": "change will be lost, are you sure you want to load another file ?"
}
......
......@@ -392,6 +392,16 @@ Database.prototype = {
list.appendChild(a);
}
myConsole.closePopupMsg()
if (m.analysisHasChanged){
m.analysisHasChanged = false;
myConsole.popupMsg( myConsole.msg.save_analysis +
"<div class=\'center\'> <button onclick=\'db.load_data("+JSON.stringify(args)+",\""+filename+"\")\'>Continue</button> "
+" <button onclick='myConsole.closePopupMsg()'>Cancel</button> </div>"
)
return
}
var url = document.documentURI.split('?')[0]
var new_location = url+"?patient="+args.patient+"&config="+args.config
window.history.pushState('plop', 'plop', new_location);
......
......@@ -18,6 +18,17 @@
*/
function loadData() {
myConsole.closePopupMsg()
if (m.analysisHasChanged){
m.analysisHasChanged = false;
myConsole.popupMsg( myConsole.msg.save_analysis +
"<div class=\'center\'> <button onclick=\'loadData()\'>Continue</button> "
+" <button onclick='myConsole.closePopupMsg()'>Cancel</button> </div>"
)
return
}
document.getElementById("file_menu")
.style.display = "block";
document.getElementById("analysis_menu")
......
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