summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardDetails.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-10-31 10:27:20 +0100
committerMaxime Quandalle <maxime@quandalle.com>2015-10-31 12:49:58 +0100
commit2b134ff7a986eb97f8ec360321be284a7a8ea11e (patch)
tree0ff579909b402db5916b66ec7bc7469534881a15 /client/components/cards/cardDetails.js
parent3507c6565bb16b5f45c6f269f7376902f8b1ff37 (diff)
parent41b23f88aea0f421226f92b081cdb1b61c64bde4 (diff)
downloadwekan-2b134ff7a986eb97f8ec360321be284a7a8ea11e.tar.gz
wekan-2b134ff7a986eb97f8ec360321be284a7a8ea11e.tar.bz2
wekan-2b134ff7a986eb97f8ec360321be284a7a8ea11e.zip
Merge branch 'devel' into minicard-editor
Conflicts: client/components/lists/listBody.js
Diffstat (limited to 'client/components/cards/cardDetails.js')
-rw-r--r--client/components/cards/cardDetails.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 58ce28e4..fa818c5a 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -13,19 +13,19 @@ BlazeComponent.extendComponent({
},
reachNextPeak() {
- const activitiesComponent = this.componentChildren('activities')[0];
+ const activitiesComponent = this.childrenComponents('activities')[0];
activitiesComponent.loadNextPage();
},
onCreated() {
this.isLoaded = new ReactiveVar(false);
- this.componentParent().showOverlay.set(true);
- this.componentParent().mouseHasEnterCardDetails = false;
+ this.parentComponent().showOverlay.set(true);
+ this.parentComponent().mouseHasEnterCardDetails = false;
},
scrollParentContainer() {
const cardPanelWidth = 510;
- const bodyBoardComponent = this.componentParent();
+ const bodyBoardComponent = this.parentComponent();
const $cardContainer = bodyBoardComponent.$('.js-lists');
const $cardView = this.$(this.firstNode());
@@ -52,7 +52,7 @@ BlazeComponent.extendComponent({
},
onDestroyed() {
- this.componentParent().showOverlay.set(false);
+ this.parentComponent().showOverlay.set(false);
},
events() {
@@ -62,7 +62,8 @@ BlazeComponent.extendComponent({
},
};
- return [_.extend(events, {
+ return [{
+ ...events,
'click .js-close-card-details'() {
Utils.goBoardId(this.data().boardId);
},
@@ -74,8 +75,8 @@ BlazeComponent.extendComponent({
},
'submit .js-card-details-title'(evt) {
evt.preventDefault();
- const title = this.currentComponent().getValue();
- if ($.trim(title)) {
+ const title = this.currentComponent().getValue().trim();
+ if (title) {
this.data().setTitle(title);
}
},
@@ -83,10 +84,10 @@ BlazeComponent.extendComponent({
'click .js-add-members': Popup.open('cardMembers'),
'click .js-add-labels': Popup.open('cardLabels'),
'mouseenter .js-card-details'() {
- this.componentParent().showOverlay.set(true);
- this.componentParent().mouseHasEnterCardDetails = true;
+ this.parentComponent().showOverlay.set(true);
+ this.parentComponent().mouseHasEnterCardDetails = true;
},
- })];
+ }];
},
}).register('cardDetails');
@@ -105,7 +106,7 @@ BlazeComponent.extendComponent({
close(isReset = false) {
if (this.isOpen.get() && !isReset) {
- const draft = $.trim(this.getValue());
+ const draft = this.getValue().trim();
if (draft !== Cards.findOne(Session.get('currentCard')).description) {
UnsavedEdits.set(this._getUnsavedEditKey(), this.getValue());
}