summaryrefslogtreecommitdiffstats
path: root/client/components/cards
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
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')
-rw-r--r--client/components/cards/attachments.jade2
-rw-r--r--client/components/cards/cardDetails.js25
-rw-r--r--client/components/cards/labels.jade2
-rw-r--r--client/components/cards/labels.js4
-rw-r--r--client/components/cards/minicard.jade2
5 files changed, 18 insertions, 17 deletions
diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade
index 59eaf077..168fc2c8 100644
--- a/client/components/cards/attachments.jade
+++ b/client/components/cards/attachments.jade
@@ -15,7 +15,7 @@ template(name="attachmentsGalery")
.attachment-thumbnail
if isUploaded
if isImage
- img.attachment-thumbnail-img(src=url)
+ img.attachment-thumbnail-img(src="{{pathFor url}}")
else
span.attachment-thumbnail-ext= extension
else
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());
}
diff --git a/client/components/cards/labels.jade b/client/components/cards/labels.jade
index a868627c..31bd4d06 100644
--- a/client/components/cards/labels.jade
+++ b/client/components/cards/labels.jade
@@ -18,7 +18,7 @@ template(name="editLabelPopup")
form.edit-label
+formLabel
button.primary.wide.left(type="submit") {{_ 'save'}}
- span.right
+ button.js-delete-label.negate.wide.right {{_ 'delete'}}
template(name="deleteLabelPopup")
p {{_ "label-delete-pop"}}
diff --git a/client/components/cards/labels.js b/client/components/cards/labels.js
index d2ee0140..4e61a0c6 100644
--- a/client/components/cards/labels.js
+++ b/client/components/cards/labels.js
@@ -13,7 +13,7 @@ BlazeComponent.extendComponent({
},
labels() {
- return _.map(labelColors, (color) => {
+ return labelColors.map((color) => {
return { color, name: '' };
});
},
@@ -69,12 +69,12 @@ Template.formLabel.events({
Template.createLabelPopup.events({
// Create the new label
'submit .create-label'(evt, tpl) {
+ evt.preventDefault();
const board = Boards.findOne(Session.get('currentBoard'));
const name = tpl.$('#labelName').val().trim();
const color = Blaze.getData(tpl.find('.fa-check')).color;
board.addLabel(name, color);
Popup.back();
- evt.preventDefault();
},
});
diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade
index 660b0fa5..573b3da1 100644
--- a/client/components/cards/minicard.jade
+++ b/client/components/cards/minicard.jade
@@ -2,7 +2,7 @@ template(name="minicard")
.minicard
if cover
.minicard-cover
- img(src=cover.url)
+ img(src="{{pathFor cover.url}}")
if labels
.minicard-labels
each labels