Fixes #2638 importing trello

This commit is contained in:
Justin Reynolds 2019-08-22 16:05:41 -05:00
parent 2c78aab3dc
commit 9d8a38f324
2 changed files with 11 additions and 13 deletions

View file

@ -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);
}
},
},
];
},

View file

@ -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