Commit 8d2b8b49 authored by Marc Duez's avatar Marc Duez

com.js : store default msg

parent dfa6840c
......@@ -252,7 +252,7 @@
</div></div>
</div>
<div id="logo" style="float: right;" onclick="com.popupMsg(msg.welcome)">Vidjil <span class='logo'>(beta)</span></div>
<div id="logo" style="float: right;" onclick="myConsole.popupMsg(myConsole.msg.welcome)">Vidjil <span class='logo'>(beta)</span></div>
<div class="menu" style="float: right"> <a href="help" target="_blank">help</a></div>
......@@ -310,12 +310,12 @@
<div id="frame-container"></div>
<div id="popup-container">
<span class="closeButton" onclick="com.closePopupMsg()">X</span>
<span class="closeButton" onclick="myConsole.closePopupMsg()">X</span>
<div id="popup-msg"></div>
</div>
<div id="data-container">
<span class="closeButton" onclick="com.closeDataBox()">X</span>
<span class="closeButton" onclick="myConsole.closeDataBox()">X</span>
<div id="data-msg"></div>
</div>
......
......@@ -29,6 +29,23 @@ function Com(flash_id, log_id, popup_id, data_id) {
this.min_priority = 1; // minimum required to display message
this.log_container = document.getElementById(this.log_id);
this.msg = {
"align_error": "Error &ndash; connection to align server ("+return_URL_CGI()+") failed" + "</br> Please check your internet connection and retry." + "</br></br> <div class='center' > <button onclick='closePopupMsg()'>ok</button></div>",
"file_error": "Error &ndash; incorrect data file" + "</br> Please check you use a .data file generated by Vidjil." + "</br></br> <div class='center' > <button onclick='closePopupMsg()'>ok</button></div>",
"json_not_found":"Error &ndash; editDistanceFile.json not found" + "</br> Please to check the specified repository in the c++ program, or to run Vidjil program with the specified datas." + "</br></br> <div class='center'><button onclick='closePopupMsg()'>ok</button></div>",
"version_error": "Error &ndash; data file too old (version " + VIDJIL_JSON_VERSION + " required)" + "</br> This data file was generated by a too old version of Vidjil. " + "</br> Please regenerate a newer data file. " + "</br></br> <div class='center' > <button onclick='closePopupMsg()'>ok</button></div>",
"welcome": " <h2>Vidjil <span class='logo'>(beta)</span></h2>" + "(c) 2011-2014, the Vidjil team" + "<br />Marc Duez, Mathieu Giraud and Mikaël Salson" + " &ndash; <a href='http://www.vidjil.org'>http://www.vidjil.org/</a>" + "</br>" + "</br>Vidjil is developed by the <a href='http://www.lifl.fr/bonsai'>Bonsai bioinformatics team</a> (LIFL, CNRS, U. Lille 1, Inria Lille), in collaboration with the <a href='http://biologiepathologie.chru-lille.fr/organisation-fbp/91210.html'>department of Hematology</a> of CHRU Lille"
+ " the <a href='http://www.ircl.org/plate-forme-genomique.html'>Functional and Structural Genomic Platform</a> (U. Lille 2, IFR-114, IRCL)" + " and the <a href='http://www.euroclonality.org/'>EuroClonality-NGS</a> working group." + "<br/>" + "<br>Vidjil is free software, and you are welcome to redistribute it under <a href='http://git.vidjil.org/blob/master/doc/LICENSE'>certain conditions</a>. This software is for research use only and comes with no warranty." + "<br>" + "Please cite <a href='http://www.biomedcentral.com/1471-2164/15/409'>BMC Genomics 2014, 15:409</a> if you use Vidjil for your research." +"<br><br> <div class='center' > <button onclick='myConsole.closePopupMsg()'>start</button></div>",
"browser_error": "The web browser you are using has not been tested with Vidjil." + "</br>Note in particular that Vidjil is <b>not compatible</b> with Internet Explorer 9.0 or below." +"</br>For a better experience, we recommend to install one of those browsers : " + "</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>",
}
}
Com.prototype = {
......
......@@ -5,7 +5,7 @@ var CGI_ADDRESS = "http://127.0.1.1/cgi-bin/";
/*tools
*
* */
var myConsole = new Com("flash_container", "log_container")
var myConsole = new Com("flash_container", "log_container", "popup-container", "data-container")
......@@ -116,7 +116,7 @@ if (location.search != ''){
//wait 1sec to check ssl
setTimeout(function () { db.call("patient/index.html")}, 1000);
}else{
myConsole.popupMsg(msg.welcome)
myConsole.popupMsg(myConsole.msg.welcome)
}
/*Statements and functions which allows to active the ALT key, and the movement of the SVG frame*/
......
......@@ -162,11 +162,11 @@ Model.prototype = {
try {
var data = JSON.parse(oFREvent.target.result);
} catch (e) {
popupMsg(msg.file_error);
popupMsg(myConsole.msgfile_error);
return 0
}
if ((typeof (data.vidjil_json_version) == 'undefined') || (data.vidjil_json_version < VIDJIL_JSON_VERSION)) {
popupMsg(msg.version_error);
popupMsg(myConsole.msgversion_error);
return 0;
}
self.reset()
......@@ -1789,7 +1789,7 @@ Model.prototype = {
if (this.browser != "Chrome" &&
this.browser != "Firefox" &&
this.browser != "Safari") {
popupMsg(msg.browser_error)
popupMsg(myConsole.msgbrowser_error)
}
},
......@@ -1937,20 +1937,7 @@ function return_URL_CGI() {
else return "No_CGI_found";
}
var msg = {
"align_error": "Error &ndash; connection to align server ("+return_URL_CGI()+") failed" + "</br> Please check your internet connection and retry." + "</br></br> <div class='center' > <button onclick='closePopupMsg()'>ok</button></div>",
"file_error": "Error &ndash; incorrect data file" + "</br> Please check you use a .data file generated by Vidjil." + "</br></br> <div class='center' > <button onclick='closePopupMsg()'>ok</button></div>",
"json_not_found":"Error &ndash; editDistanceFile.json not found" + "</br> Please to check the specified repository in the c++ program, or to run Vidjil program with the specified datas." + "</br></br> <div class='center'><button onclick='closePopupMsg()'>ok</button></div>",
"version_error": "Error &ndash; data file too old (version " + VIDJIL_JSON_VERSION + " required)" + "</br> This data file was generated by a too old version of Vidjil. " + "</br> Please regenerate a newer data file. " + "</br></br> <div class='center' > <button onclick='closePopupMsg()'>ok</button></div>",
"welcome": " <h2>Vidjil <span class='logo'>(beta)</span></h2>" + "(c) 2011-2014, the Vidjil team" + "<br />Marc Duez, Mathieu Giraud and Mikaël Salson" + " &ndash; <a href='http://www.vidjil.org'>http://www.vidjil.org/</a>" + "</br>" + "</br>Vidjil is developed by the <a href='http://www.lifl.fr/bonsai'>Bonsai bioinformatics team</a> (LIFL, CNRS, U. Lille 1, Inria Lille), in collaboration with the <a href='http://biologiepathologie.chru-lille.fr/organisation-fbp/91210.html'>department of Hematology</a> of CHRU Lille"
+ " the <a href='http://www.ircl.org/plate-forme-genomique.html'>Functional and Structural Genomic Platform</a> (U. Lille 2, IFR-114, IRCL)" + " and the <a href='http://www.euroclonality.org/'>EuroClonality-NGS</a> working group." + "<br/>" + "<br>Vidjil is free software, and you are welcome to redistribute it under <a href='http://git.vidjil.org/blob/master/doc/LICENSE'>certain conditions</a>. This software is for research use only and comes with no warranty." + "<br>" + "Please cite <a href='http://www.biomedcentral.com/1471-2164/15/409'>BMC Genomics 2014, 15:409</a> if you use Vidjil for your research." +"<br><br> <div class='center' > <button onclick='closePopupMsg()'>start</button></div>",
"browser_error": "The web browser you are using has not been tested with Vidjil." + "</br>Note in particular that Vidjil is <b>not compatible</b> with Internet Explorer 9.0 or below." +"</br>For a better experience, we recommend to install one of those browsers : " + "</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>",
}
var rootTab = []
......
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