Commit ba52f8a2 authored by Téo Vasseur's avatar Téo Vasseur
Browse files

{info,main}.js : set info id in constructor

As for other views
parent 626d4a44
Pipeline #3065 passed with stages
in 2 minutes and 47 seconds
......@@ -21,8 +21,9 @@
* along with "Vidjil". If not, see <http://www.gnu.org/licenses/>
*/
function Info(model, builder) {
function Info(id, model, builder) {
View.call(this, model);
this.id = id;
this.builder = builder;
}
......@@ -31,7 +32,7 @@ Info.prototype = {
init : function () {
var self = this
try {
var parent = document.getElementById("info");
var parent = document.getElementById(this.id);
parent.removeAllChildren();
var patient_info = typeof this.m.info != 'undefined' ? this.m.info : "";
......
......@@ -75,7 +75,7 @@ try {
* TODO replace with a menu and info view
*/
var builder = new Builder(m, db);
var info = new Info(m, builder);
var info = new Info("info", m, builder);
/* [WIP] Shortcut (optional)
......
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