mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Work on the card activities and comments
This commit also introduces a new CSSEvents object that is used to abstract vendor specifics events related to CSS transitions and animations. Fixes #183. Fixes #179.
This commit is contained in:
parent
216887490e
commit
c894567987
31 changed files with 590 additions and 691 deletions
|
|
@ -49,10 +49,6 @@ BlazeComponent.extendComponent({
|
|||
return TAPi18n.__('this-board');
|
||||
},
|
||||
|
||||
cardLabel: function() {
|
||||
return TAPi18n.__('this-card');
|
||||
},
|
||||
|
||||
cardLink: function() {
|
||||
var card = this.currentData().card();
|
||||
return Blaze.toHTML(HTML.A({
|
||||
|
|
@ -75,3 +71,35 @@ BlazeComponent.extendComponent({
|
|||
}, attachment.name()));
|
||||
}
|
||||
}).register('activities');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
template: function() {
|
||||
return 'cardActivities';
|
||||
},
|
||||
|
||||
cardLabel: function() {
|
||||
return TAPi18n.__('this-card');
|
||||
},
|
||||
|
||||
events: function() {
|
||||
return [{
|
||||
// XXX We should use Popup.afterConfirmation here
|
||||
'click .js-delete-comment': function() {
|
||||
var commentId = this.currentData().commentId;
|
||||
CardComments.remove(commentId);
|
||||
},
|
||||
'submit .js-edit-comment': function(evt) {
|
||||
evt.preventDefault();
|
||||
var commentText = this.currentComponent().getValue();
|
||||
var commentId = Template.parentData().commentId;
|
||||
if ($.trim(commentText)) {
|
||||
CardComments.update(commentId, {
|
||||
$set: {
|
||||
text: commentText
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
}).register('cardActivities');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue