diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/components/import/import.js | 22 | ||||
-rw-r--r-- | client/lib/popup.js | 2 |
2 files changed, 11 insertions, 13 deletions
diff --git a/client/components/import/import.js b/client/components/import/import.js index 62c7e525..6368885b 100644 --- a/client/components/import/import.js +++ b/client/components/import/import.js @@ -211,22 +211,20 @@ BlazeComponent.extendComponent({ this.parentComponent().nextStep(); }, - onMapMember(evt) { - const memberToMap = this.currentData(); - if (memberToMap.wekan) { - // todo xxx ask for confirmation? - this.unmapMember(memberToMap.id); - } else { - this.setSelectedMember(memberToMap.id); - Popup.open('importMapMembersAdd')(evt); - } - }, - events() { return [ { submit: this.onSubmit, - 'click .js-select-member': this.onMapMember, + 'click .js-select-member'(evt) { + const memberToMap = this.currentData(); + if (memberToMap.wekan) { + // todo xxx ask for confirmation? + this.unmapMember(memberToMap.id); + } else { + this.setSelectedMember(memberToMap.id); + Popup.open('importMapMembersAdd')(evt); + } + }, }, ]; }, diff --git a/client/lib/popup.js b/client/lib/popup.js index 6c294d32..8095fbd2 100644 --- a/client/lib/popup.js +++ b/client/lib/popup.js @@ -67,7 +67,7 @@ window.Popup = new (class { title: self._getTitle(popupName), depth: self._stack.length, offset: self._getOffset(openerElement), - dataContext: (this.currentData && this.currentData()) || this, + dataContext: (this && this.currentData && this.currentData()) || this, }); // If there are no popup currently opened we use the Blaze API to render |