Commit 436ab1df authored by Marc Duez's avatar Marc Duez

main.js : separate db_menu from file_menu

parent 77d96bd6
......@@ -99,6 +99,19 @@
<!-- TOP-CONTAINER -->
<div id="top-container">
<div class="menu" id="db_menu" onmouseover="showSelector('dbSelector');" style="display : none"> Patient
<div id="dbSelector" class="selector"><div>
<div class="menu_box">
<a class="buttonSelector" onclick="javascript:db.reload()"> Open</a>
<a class="buttonSelector" onclick="javascript:db.save_analysis()">Save</a>
</div>
<div class="menu_box">
<div id="last_loaded_file">
</div>
</div>
</div></div>
</div>
<div class="menu" id="demo_file_menu" onmouseover="showSelector('demoSelector');"> file
<div id="demoSelector" class="selector"><div>
<div class="menu_box">
......
......@@ -38,6 +38,8 @@ Builder.prototype = {
this.build_info_container()
this.build_clusterSelector()
this.build_settings()
if (typeof config != 'undefined' && typeof config.use_database != 'undefined' && config.use_database) this.build_db()
},
update: function () {
......@@ -737,5 +739,9 @@ Builder.prototype = {
div.appendChild(span3)
return div;
},
build_db: function(){
},
}
\ No newline at end of file
......@@ -52,19 +52,8 @@ if (typeof config != 'undefined') {
}
if (config.use_database){
var a = document.createElement('a');
a.className = "buttonSelector"
a.onclick = function () { db.call('patient/index') }
a.appendChild(document.createTextNode("database"))
document.getElementById("demoSelector").firstChild.appendChild(a);
a = document.createElement('a');
a.className = "buttonSelector"
a.onclick = function () { db.save_analysis() }
a.appendChild(document.createTextNode("save analysis (database)"))
document.getElementById("demoSelector").firstChild.appendChild(a);
if (typeof config.use_database != 'undefined' && config.use_database){
$("#db_menu").css("display", "");
}
if (config.debug_mode) {
......
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