From 08b18ff7200ba38e56c3d638d5ee1dbfcd3d1f23 Mon Sep 17 00:00:00 2001
From: Bryan Brancotte <bryan.brancotte@pasteur.fr>
Date: Fri, 1 Feb 2019 16:37:06 +0100
Subject: [PATCH] set callback as attribute

---
 ippisite/ippidb/static/js/ippidb-marvinjsmodal.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ippisite/ippidb/static/js/ippidb-marvinjsmodal.js b/ippisite/ippidb/static/js/ippidb-marvinjsmodal.js
index ffb6d26a..99a0e791 100644
--- a/ippisite/ippidb/static/js/ippidb-marvinjsmodal.js
+++ b/ippisite/ippidb/static/js/ippidb-marvinjsmodal.js
@@ -4,6 +4,7 @@ class MarvinModal {
         this.modalEl = $('#' + modalId);
         this.applyEl = $('#' + applyId);
         this.textAreaEl = $('#' + textAreaId);
+        this.exportCallback = exportCallback;
         this.marvinSketcherInstance = null;
         MarvinJSUtil.getEditor("marviniframe").then(function(sketcherInstance) {
             this.marvinSketcherInstance = sketcherInstance;
@@ -25,7 +26,7 @@ class MarvinModal {
         }.bind(this));
         this.applyEl.click(function(){
             this.modalEl.modal('hide');
-            this.exportSmiles(exportCallback.bind(this));
+            this.exportSmiles(this.exportCallback.bind(this));
         }.bind(this));
         this.textAreaEl.on('input', function(){
             this.importSmiles(this.textAreaEl.val())
-- 
GitLab