|
@@ -306,9 +306,32 @@ BlazeComponent.extendComponent({
|
|
}
|
|
}
|
|
}).register('addChecklistItemForm');
|
|
}).register('addChecklistItemForm');
|
|
|
|
|
|
-Template.editChecklistItemForm.onRendered(() => {
|
|
|
|
- autosize($('textarea.js-edit-checklist-item'));
|
|
|
|
-});
|
|
|
|
|
|
+BlazeComponent.extendComponent({
|
|
|
|
+ onRendered() {
|
|
|
|
+ autosize(this.$('textarea.js-edit-checklist-item'));
|
|
|
|
+ },
|
|
|
|
+ canModifyCard() {
|
|
|
|
+ return (
|
|
|
|
+ Meteor.user() &&
|
|
|
|
+ Meteor.user().isBoardMember() &&
|
|
|
|
+ !Meteor.user().isCommentOnly() &&
|
|
|
|
+ !Meteor.user().isWorker()
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ events() {
|
|
|
|
+ return [
|
|
|
|
+ {
|
|
|
|
+ 'click a.fa.fa-copy'(event) {
|
|
|
|
+ const $editor = this.$('textarea');
|
|
|
|
+ const promise = Utils.copyTextToClipboard($editor[0].value);
|
|
|
|
+
|
|
|
|
+ const $tooltip = this.$('.copied-tooltip');
|
|
|
|
+ Utils.showCopied(promise, $tooltip);
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+}).register('editChecklistItemForm');
|
|
|
|
|
|
Template.checklistDeleteDialog.onCreated(() => {
|
|
Template.checklistDeleteDialog.onCreated(() => {
|
|
const $cardDetails = this.$('.card-details');
|
|
const $cardDetails = this.$('.card-details');
|