diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/components/boards/boardHeader.js | 2 | ||||
-rw-r--r-- | client/components/cards/cardDetails.jade | 133 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 2 | ||||
-rw-r--r-- | client/components/cards/cardDetails.styl | 12 | ||||
-rwxr-xr-x | client/components/main/editor.js | 4 | ||||
-rw-r--r-- | client/components/rules/actions/boardActions.jade | 37 | ||||
-rw-r--r-- | client/components/rules/actions/boardActions.js | 30 | ||||
-rw-r--r-- | client/components/sidebar/sidebar.jade | 87 | ||||
-rw-r--r-- | client/components/sidebar/sidebar.js | 201 |
9 files changed, 396 insertions, 112 deletions
diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index 8dea0f85..8ab117f6 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -30,7 +30,7 @@ Template.boardMenuPopup.events({ 'click .js-outgoing-webhooks': Popup.open('outgoingWebhooks'), 'click .js-import-board': Popup.open('chooseBoardSource'), 'click .js-subtask-settings': Popup.open('boardSubtaskSettings'), - 'click .js-Date-settings': Popup.open('boardDateSettings') + 'click .js-card-settings': Popup.open('boardCardSettings') }); Template.boardMenuPopup.helpers({ diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index aec95486..41ab8ca2 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -8,7 +8,7 @@ template(name="cardDetails") a.fa.fa-times-thin.close-card-details.js-close-card-details if currentUser.isBoardMember a.fa.fa-navicon.card-details-menu.js-open-card-details-menu - input.inline-input(type="text" id="cardURL_copy" value="{{ absoluteUrl }}" autofocus="autofocus") + input.inline-input(type="hidden" id="cardURL_copy" value="{{ absoluteUrl }}") a.fa.fa-link.card-copy-button.js-copy-link if isMiniScreen a.fa.fa-times-thin.close-card-details-mobile-web.js-close-card-details @@ -49,7 +49,8 @@ template(name="cardDetails") else if canModifyCard unless currentUser.isWorker - a.js-received-date {{_ 'add'}} + a.card-label.add-label.js-received-date + i.fa.fa-plus if currentBoard.allowsStartDate .card-details-item.card-details-item-start @@ -61,7 +62,21 @@ template(name="cardDetails") else if canModifyCard unless currentUser.isWorker - a.js-start-date {{_ 'add'}} + a.card-label.add-label.js-start-date + i.fa.fa-plus + + if currentBoard.allowsDueDate + .card-details-item.card-details-item-due + h3 + i.fa.fa-sign-in + card-details-item-title {{_ 'card-due'}} + if getDue + +cardDueDate + else + if canModifyCard + unless currentUser.isWorker + a.card-label.add-label.js-due-date + i.fa.fa-plus if currentBoard.allowsEndDate .card-details-item.card-details-item-end @@ -73,34 +88,25 @@ template(name="cardDetails") else if canModifyCard unless currentUser.isWorker - a.js-end-date {{_ 'add'}} + a.card-label.add-label.js-end-date + i.fa.fa-plus .card-details-items - .card-details-item.card-details-item-members - h3 - i.fa.fa-users - card-details-item-title {{_ 'members'}} - each getMembers - +userAvatar(userId=this cardId=../_id) - | {{! XXX Hack to hide syntaxic coloration /// }} - if canModifyCard - unless currentUser.isWorker - a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}") - i.fa.fa-plus - if currentBoard.allowsDueDate - .card-details-item.card-details-item-due + if currentBoard.allowsMembers + .card-details-item.card-details-item-members h3 - i.fa.fa-sign-in - card-details-item-title {{_ 'card-due'}} - if getDue - +cardDueDate - else - if canModifyCard - unless currentUser.isWorker - a.card-label.add-label.js-due-date - i.fa.fa-plus + i.fa.fa-users + card-details-item-title {{_ 'members'}} + each getMembers + +userAvatar(userId=this cardId=../_id) + | {{! XXX Hack to hide syntaxic coloration /// }} + if canModifyCard + unless currentUser.isWorker + a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}") + i.fa.fa-plus - if assigngeeSelected + //if assigneeSelected + if currentBoard.allowsAssignee .card-details-item.card-details-item-assignees h3 i.fa.fa-user @@ -116,19 +122,20 @@ template(name="cardDetails") a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}") i.fa.fa-plus - .card-details-item.card-details-item-labels - h3 - i.fa.fa-tags - card-details-item-title {{_ 'labels'}} - a(class="{{#if canModifyCard}}js-add-labels{{else}}is-disabled{{/if}}" title="{{_ 'card-labels-title'}}") - each labels - span.card-label(class="card-label-{{color}}" title=name) - +viewer - = name - if canModifyCard - unless currentUser.isWorker - a.card-label.add-label.js-add-labels(title="{{_ 'card-labels-title'}}") - i.fa.fa-plus + if currentBoard.allowsLabels + .card-details-item.card-details-item-labels + h3 + i.fa.fa-tags + card-details-item-title {{_ 'labels'}} + a(class="{{#if canModifyCard}}js-add-labels{{else}}is-disabled{{/if}}" title="{{_ 'card-labels-title'}}") + each labels + span.card-label(class="card-label-{{color}}" title=name) + +viewer + = name + if canModifyCard + unless currentUser.isWorker + a.card-label.add-label.js-add-labels(title="{{_ 'card-labels-title'}}") + i.fa.fa-plus .card-details-items each customFieldsWD @@ -151,8 +158,8 @@ template(name="cardDetails") if canModifyCard unless currentUser.isWorker //h3 - //- i.fa.fa-align-left - //- card-details-item-title {{_ 'description'}} + // i.fa.fa-align-left + // card-details-item-title {{_ 'description'}} +inlinedCardDescription(classNames="card-description js-card-description") +editor(autofocus=true) | {{getUnsavedValue 'cardDescription' _id getDescription}} @@ -178,7 +185,7 @@ template(name="cardDetails") = getDescription .card-details-items - if requestBySelected + if currentBoard.allowsRequestedBy .card-details-item.card-details-item-name h3 i.fa.fa-shopping-cart @@ -198,7 +205,7 @@ template(name="cardDetails") +viewer = getRequestedBy - if assigneeBySelected + if currentBoard.allowsAssignedBy .card-details-item.card-details-item-name h3 i.fa.fa-user-plus @@ -220,16 +227,17 @@ template(name="cardDetails") .card-checklist-attachmentGalerys .card-checklist-attachmentGalery.card-checklists + if currentBoard.allowsChecklists +checklists(cardId = _id) - if currentBoard.allowsSubtasks - hr - +subtasks(cardId = _id) - - //- hr - //- h3 - //- i.fa.fa-paperclip - //- | {{_ 'attachments'}} - .card-checklist-attachmentGalery.card-attachmentGalery + if currentBoard.allowsSubtasks + hr + +subtasks(cardId = _id) + if currentBoard.allowsAttachments + //- hr + //- h3 + //- i.fa.fa-paperclip + //- | {{_ 'attachments'}} + .card-checklist-attachmentGalery.card-attachmentGalery +attachmentsGalery hr @@ -246,15 +254,16 @@ template(name="cardDetails") else input.toggle-switch(type="checkbox" id="toggleButton") label.toggle-label(for="toggleButton") - if currentUser.isBoardMember - unless currentUser.isNoComments - if canModifyCard - +inlinedForm(autoclose=false classNames="js-new-comment-form") - +commentForm - else - +userAvatar(userId=currentUser._id) - a.comment-item.add-comment.js-open-inlined-form - | {{_ 'Write Comment'}} + if currentBoard.allowsComments + if currentUser.isBoardMember + unless currentUser.isNoComments + if canModifyCard + +inlinedForm(autoclose=false classNames="js-new-comment-form") + +commentForm + else + +userAvatar(userId=currentUser._id) + a.comment-item.add-comment.js-open-inlined-form + | {{_ 'Write Comment'}} unless currentUser.isNoComments if isLoaded.get if isLinkedCard diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 231cbb10..92edec38 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -403,7 +403,7 @@ Template.cardDetails.helpers({ }, startSelected() { - if (this.getstart().length === 0) { + if (this.getStart().length === 0) { return false; } else { return true; diff --git a/client/components/cards/cardDetails.styl b/client/components/cards/cardDetails.styl index 3fc4d047..fd6122eb 100644 --- a/client/components/cards/cardDetails.styl +++ b/client/components/cards/cardDetails.styl @@ -108,6 +108,8 @@ avatar-radius = 50% .close-card-details, .card-details-menu, + .card-copy-button, + .card-copy-mobile-button, .close-card-details-mobile-web, .card-details-menu-mobile-web float: right @@ -122,6 +124,16 @@ avatar-radius = 50% padding: 5px margin-right: 40px + .card-copy-button + font-size: 17px + padding: 10px + margin-right: 10px + + .card-copy-mobile-button + font-size: 17px + padding: 10px + margin-right: 10px + .card-details-menu font-size: 17px padding: 10px diff --git a/client/components/main/editor.js b/client/components/main/editor.js index 6c5b72b7..39c03aa9 100755 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -120,10 +120,6 @@ Template.editor.onRendered(() => { autosize($textarea); $textarea.escapeableTextComplete(mentions); }; -<<<<<<< HEAD -======= - ->>>>>>> ac37e360b69b799c12f03e1c158cfc0367d26e55 if (Meteor.settings.public.RICHER_CARD_COMMENT_EDITOR !== false) { const isSmall = Utils.isMiniScreen(); const toolbar = isSmall diff --git a/client/components/rules/actions/boardActions.jade b/client/components/rules/actions/boardActions.jade index 6034184c..fda15062 100644 --- a/client/components/rules/actions/boardActions.jade +++ b/client/components/rules/actions/boardActions.jade @@ -1,29 +1,42 @@ template(name="boardActions") div.trigger-item div.trigger-content - div.trigger-text + div.trigger-text | {{_'r-move-card-to'}} div.trigger-dropdown select(id="move-gen-action") option(value="top") {{_'r-top-of'}} option(value="bottom") {{_'r-bottom-of'}} - div.trigger-text + div.trigger-text | {{_'r-its-list'}} div.trigger-button.js-add-gen-move-action.js-goto-rules i.fa.fa-plus div.trigger-item div.trigger-content - div.trigger-text + div.trigger-text | {{_'r-move-card-to'}} div.trigger-dropdown select(id="move-spec-action") option(value="top") {{_'r-top-of'}} option(value="bottom") {{_'r-bottom-of'}} - div.trigger-text - | {{_'r-list'}} + div.trigger-text + | {{_'r-the-board'}} + div.trigger-dropdown + select(id="board-id") + each boards + if $eq _id currentBoard._id + option(value="{{_id}}" selected) {{_ 'current'}} + else + option(value="{{_id}}") {{title}} + div.trigger-text + | {{_'r-in-list'}} div.trigger-dropdown input(id="listName",type=text,placeholder="{{_'r-name'}}") + div.trigger-text + | {{_'r-in-swimlane'}} + div.trigger-dropdown + input(id="swimlaneName",type=text,placeholder="{{_'r-name'}}") div.trigger-button.js-add-spec-move-action.js-goto-rules i.fa.fa-plus @@ -33,14 +46,14 @@ template(name="boardActions") select(id="arch-action") option(value="archive") {{_'r-archive'}} option(value="unarchive") {{_'r-unarchive'}} - div.trigger-text + div.trigger-text | {{_'r-card'}} div.trigger-button.js-add-arch-action.js-goto-rules i.fa.fa-plus div.trigger-item div.trigger-content - div.trigger-text + div.trigger-text | {{_'r-add-swimlane'}} div.trigger-dropdown input(id="swimlane-name",type=text,placeholder="{{_'r-name'}}") @@ -49,15 +62,15 @@ template(name="boardActions") div.trigger-item div.trigger-content - div.trigger-text + div.trigger-text | {{_'r-create-card'}} div.trigger-dropdown input(id="card-name",type=text,placeholder="{{_'r-name'}}") - div.trigger-text + div.trigger-text | {{_'r-in-list'}} div.trigger-dropdown input(id="list-name",type=text,placeholder="{{_'r-name'}}") - div.trigger-text + div.trigger-text | {{_'r-in-swimlane'}} div.trigger-dropdown input(id="swimlane-name2",type=text,placeholder="{{_'r-name'}}") @@ -65,8 +78,8 @@ template(name="boardActions") i.fa.fa-plus - - + + diff --git a/client/components/rules/actions/boardActions.js b/client/components/rules/actions/boardActions.js index 8568d2bf..c2f2375a 100644 --- a/client/components/rules/actions/boardActions.js +++ b/client/components/rules/actions/boardActions.js @@ -1,6 +1,22 @@ BlazeComponent.extendComponent({ onCreated() {}, + boards() { + const boards = Boards.find( + { + archived: false, + 'members.userId': Meteor.userId(), + _id: { + $ne: Meteor.user().getTemplatesBoardId(), + }, + }, + { + sort: ['title'], + }, + ); + return boards; + }, + events() { return [ { @@ -52,15 +68,18 @@ BlazeComponent.extendComponent({ const ruleName = this.data().ruleName.get(); const trigger = this.data().triggerVar.get(); const actionSelected = this.find('#move-spec-action').value; - const listTitle = this.find('#listName').value; + const swimlaneName = this.find('#swimlaneName').value; + const listName = this.find('#listName').value; const boardId = Session.get('currentBoard'); + const destBoardId = this.find('#board-id').value; const desc = Utils.getTriggerActionDesc(event, this); if (actionSelected === 'top') { const triggerId = Triggers.insert(trigger); const actionId = Actions.insert({ actionType: 'moveCardToTop', - listTitle, - boardId, + listName, + swimlaneName, + boardId: destBoardId, desc, }); Rules.insert({ @@ -74,8 +93,9 @@ BlazeComponent.extendComponent({ const triggerId = Triggers.insert(trigger); const actionId = Actions.insert({ actionType: 'moveCardToBottom', - listTitle, - boardId, + listName, + swimlaneName, + boardId: destBoardId, desc, }); Rules.insert({ diff --git a/client/components/sidebar/sidebar.jade b/client/components/sidebar/sidebar.jade index fc5ff3a6..fe0810a5 100644 --- a/client/components/sidebar/sidebar.jade +++ b/client/components/sidebar/sidebar.jade @@ -72,24 +72,87 @@ template(name="boardChangeColorPopup") if isSelected i.fa.fa-check -template(name="boardDateSettingsPopup") - form.board-Date-settings +template(name="boardCardSettingsPopup") + form.board-card-settings + h3 {{_ 'show-on-card'}} div.check-div a.flex.js-field-has-receiveddate(class="{{#if allowsReceivedDate}}is-checked{{/if}}") .materialCheckBox(class="{{#if allowsReceivedDate}}is-checked{{/if}}") - span {{_ 'show-receiveddate-field'}} + span + i.fa.fa-sign-out + | {{_ 'card-received'}} div.check-div a.flex.js-field-has-startdate(class="{{#if allowsStartDate}}is-checked{{/if}}") .materialCheckBox(class="{{#if allowsStartDate}}is-checked{{/if}}") - span {{_ 'show-startdate-field'}} + span + i.fa.fa-hourglass-start + | {{_ 'card-start'}} + div.check-div + a.flex.js-field-has-duedate(class="{{#if allowsDueDate}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsDueDate}}is-checked{{/if}}") + span + i.fa.fa-sign-in + | {{_ 'card-due'}} div.check-div a.flex.js-field-has-enddate(class="{{#if allowsEndDate}}is-checked{{/if}}") .materialCheckBox(class="{{#if allowsEndDate}}is-checked{{/if}}") - span {{_ 'show-enddate-field'}} + span + i.fa.fa-hourglass-end + | {{_ 'card-end'}} div.check-div - a.flex.js-field-has-duedate(class="{{#if allowsDueDate}}is-checked{{/if}}") - .materialCheckBox(class="{{#if allowsDueDate}}is-checked{{/if}}") - span {{_ 'show-duedate-field'}} + a.flex.js-field-has-members(class="{{#if allowsMembers}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsMembers}}is-checked{{/if}}") + span + i.fa.fa-users + | {{_ 'members'}} + div.check-div + a.flex.js-field-has-assignee(class="{{#if allowsAssignee}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsAssignee}}is-checked{{/if}}") + span + i.fa.fa-user + | {{_ 'assignee'}} + div.check-div + a.flex.js-field-has-assigned-by(class="{{#if allowsAssignedBy}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsAssignedBy}}is-checked{{/if}}") + span + i.fa.fa-shopping-cart + | {{_ 'assigned-by'}} + div.check-div + a.flex.js-field-has-requested-by(class="{{#if allowsRequestedBy}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsRequestedBy}}is-checked{{/if}}") + span + i.fa.fa-user-plus + | {{_ 'requested-by'}} + div.check-div + a.flex.js-field-has-labels(class="{{#if allowsLabels}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsLabels}}is-checked{{/if}}") + span + i.fa.fa-tags + | {{_ 'labels'}} + div.check-div + a.flex.js-field-has-checklists(class="{{#if allowsChecklists}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsChecklists}}is-checked{{/if}}") + span + i.fa.fa-check + | {{_ 'checklists'}} + div.check-div + a.flex.js-field-has-subtasks(class="{{#if allowsSubtasks}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsSubtasks}}is-checked{{/if}}") + span + i.fa.fa-sitemap + | {{_ 'subtasks'}} + div.check-div + a.flex.js-field-has-attachments(class="{{#if allowsAttachments}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsAttachments}}is-checked{{/if}}") + span + i.fa.fa-paperclip + | {{_ 'attachments'}} + div.check-div + a.flex.js-field-has-comments(class="{{#if allowsComments}}is-checked{{/if}}") + .materialCheckBox(class="{{#if allowsComments}}is-checked{{/if}}") + span + i.fa.fa-comment-o + | {{_ 'comment'}} template(name="boardSubtaskSettingsPopup") form.board-subtask-settings @@ -217,13 +280,13 @@ template(name="boardMenuPopup") i.fa.fa-globe | {{_ 'outgoing-webhooks'}} li + a.js-card-settings + i.fa.fa-id-card-o + | {{_ 'card-settings'}} + li a.js-subtask-settings i.fa.fa-sitemap | {{_ 'subtask-settings'}} - li - a.js-Date-settings - i.fa.fa-calendar - | {{_ 'Date-settings'}} unless currentBoard.isTemplatesBoard hr ul.pop-over-list diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js index d909a8ae..678c16d2 100644 --- a/client/components/sidebar/sidebar.js +++ b/client/components/sidebar/sidebar.js @@ -208,7 +208,7 @@ Template.boardMenuPopup.events({ 'click .js-outgoing-webhooks': Popup.open('outgoingWebhooks'), 'click .js-import-board': Popup.open('chooseBoardSource'), 'click .js-subtask-settings': Popup.open('boardSubtaskSettings'), - 'click .js-Date-settings': Popup.open('boardDateSettings') + 'click .js-card-settings': Popup.open('boardCardSettings'), }); Template.boardMenuPopup.helpers({ @@ -473,6 +473,10 @@ BlazeComponent.extendComponent({ return this.currentBoard.allowsSubtasks; }, + allowsReceivedDate() { + return this.currentBoard.allowsReceivedDate; + }, + isBoardSelected() { return this.currentBoard.subtasksDefaultBoardId === this.currentData()._id; }, @@ -587,28 +591,64 @@ BlazeComponent.extendComponent({ }).register('boardSubtaskSettingsPopup'); BlazeComponent.extendComponent({ - onCreated(){ + onCreated() { this.currentBoard = Boards.findOne(Session.get('currentBoard')); }, - allowsReceivedDate(){ + allowsReceivedDate() { return this.currentBoard.allowsReceivedDate; }, - allowsStartDate(){ + allowsStartDate() { return this.currentBoard.allowsStartDate; }, - allowsEndDate(){ + allowsDueDate() { + return this.currentBoard.allowsDueDate; + }, + + allowsEndDate() { return this.currentBoard.allowsEndDate; }, - allowsDueDate(){ - return this.currentBoard.allowsDueDate; + allowsSubtasks() { + return this.currentBoard.allowsSubtasks; + }, + + allowsMembers() { + return this.currentBoard.allowsMembers; + }, + + allowsAssignee() { + return this.currentBoard.allowsAssignee; + }, + + allowsAssignedBy() { + return this.currentBoard.allowsAssignedBy; + }, + + allowsRequestedBy() { + return this.currentBoard.allowsRequestedBy; + }, + + allowsLabels() { + return this.currentBoard.allowsLabels; + }, + + allowsChecklists() { + return this.currentBoard.allowsChecklists; + }, + + allowsAttachments() { + return this.currentBoard.allowsAttachments; }, - isBoardSelected(){ - return this.currentBoard.dateSettingsDefaultBoardID + allowsComments() { + return this.currentBoard.allowsComments; + }, + + isBoardSelected() { + return this.currentBoard.dateSettingsDefaultBoardID; }, isNullBoardSelected() { @@ -647,7 +687,9 @@ BlazeComponent.extendComponent({ }, isListSelected() { - return this.currentBoard.dateSettingsDefaultBoardId === this.currentData()._id; + return ( + this.currentBoard.dateSettingsDefaultBoardId === this.currentData()._id + ); }, events() { @@ -655,8 +697,11 @@ BlazeComponent.extendComponent({ { 'click .js-field-has-receiveddate'(evt) { evt.preventDefault(); - this.currentBoard.allowsReceivedDate = !this.currentBoard.allowsReceivedDate; - this.currentBoard.setAllowsReceivedDate(this.currentBoard.allowsReceivedDate); + this.currentBoard.allowsReceivedDate = !this.currentBoard + .allowsReceivedDate; + this.currentBoard.setAllowsReceivedDate( + this.currentBoard.allowsReceivedDate, + ); $(`.js-field-has-receiveddate ${MCB}`).toggleClass( CKCLS, this.currentBoard.allowsReceivedDate, @@ -668,8 +713,11 @@ BlazeComponent.extendComponent({ }, 'click .js-field-has-startdate'(evt) { evt.preventDefault(); - this.currentBoard.allowsStartDate = !this.currentBoard.allowsStartDate; - this.currentBoard.setAllowsStartDate(this.currentBoard.allowsStartDate); + this.currentBoard.allowsStartDate = !this.currentBoard + .allowsStartDate; + this.currentBoard.setAllowsStartDate( + this.currentBoard.allowsStartDate, + ); $(`.js-field-has-startdate ${MCB}`).toggleClass( CKCLS, this.currentBoard.allowsStartDate, @@ -705,10 +753,133 @@ BlazeComponent.extendComponent({ this.currentBoard.allowsDueDate, ); }, + 'click .js-field-has-subtasks'(evt) { + evt.preventDefault(); + this.currentBoard.allowsSubtasks = !this.currentBoard.allowsSubtasks; + this.currentBoard.setAllowsSubtasks(this.currentBoard.allowsSubtasks); + $(`.js-field-has-subtasks ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsSubtasks, + ); + $('.js-field-has-subtasks').toggleClass( + CKCLS, + this.currentBoard.allowsSubtasks, + ); + }, + 'click .js-field-has-members'(evt) { + evt.preventDefault(); + this.currentBoard.allowsMembers = !this.currentBoard.allowsMembers; + this.currentBoard.setAllowsMembers(this.currentBoard.allowsMembers); + $(`.js-field-has-members ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsMembers, + ); + $('.js-field-has-members').toggleClass( + CKCLS, + this.currentBoard.allowsMembers, + ); + }, + 'click .js-field-has-assignee'(evt) { + evt.preventDefault(); + this.currentBoard.allowsAssignee = !this.currentBoard.allowsAssignee; + this.currentBoard.setAllowsAssignee(this.currentBoard.allowsAssignee); + $(`.js-field-has-assignee ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsAssignee, + ); + $('.js-field-has-assignee').toggleClass( + CKCLS, + this.currentBoard.allowsAssignee, + ); + }, + 'click .js-field-has-assigned-by'(evt) { + evt.preventDefault(); + this.currentBoard.allowsAssignedBy = !this.currentBoard.allowsAssignedBy; + this.currentBoard.setAllowsAssignedBy(this.currentBoard.allowsAssignedBy); + $(`.js-field-has-assigned-by ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsAssignedBy, + ); + $('.js-field-has-assigned-by').toggleClass( + CKCLS, + this.currentBoard.allowsAssignedBy, + ); + }, + 'click .js-field-has-requested-by'(evt) { + evt.preventDefault(); + this.currentBoard.allowsRequestedBy = !this.currentBoard.allowsRequestedBy; + this.currentBoard.setAllowsRequestedBy(this.currentBoard.allowsRequestedBy); + $(`.js-field-has-requested-by ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsRequestedBy, + ); + $('.js-field-has-requested-by').toggleClass( + CKCLS, + this.currentBoard.allowsRequestedBy, + ); + }, + 'click .js-field-has-labels'(evt) { + evt.preventDefault(); + this.currentBoard.allowsLabels = !this.currentBoard.allowsLabels; + this.currentBoard.setAllowsLabels(this.currentBoard.allowsLabels); + $(`.js-field-has-labels ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsAssignee, + ); + $('.js-field-has-labels').toggleClass( + CKCLS, + this.currentBoard.allowsLabels, + ); + }, + 'click .js-field-has-checklists'(evt) { + evt.preventDefault(); + this.currentBoard.allowsChecklists = !this.currentBoard + .allowsChecklists; + this.currentBoard.setAllowsChecklists( + this.currentBoard.allowsChecklists, + ); + $(`.js-field-has-checklists ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsChecklists, + ); + $('.js-field-has-checklists').toggleClass( + CKCLS, + this.currentBoard.allowsChecklists, + ); + }, + 'click .js-field-has-attachments'(evt) { + evt.preventDefault(); + this.currentBoard.allowsAttachments = !this.currentBoard + .allowsAttachments; + this.currentBoard.setAllowsAttachments( + this.currentBoard.allowsAttachments, + ); + $(`.js-field-has-attachments ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsAttachments, + ); + $('.js-field-has-attachments').toggleClass( + CKCLS, + this.currentBoard.allowsAttachments, + ); + }, + 'click .js-field-has-comments'(evt) { + evt.preventDefault(); + this.currentBoard.allowsComments = !this.currentBoard.allowsComments; + this.currentBoard.setAllowsComments(this.currentBoard.allowsComments); + $(`.js-field-has-comments ${MCB}`).toggleClass( + CKCLS, + this.currentBoard.allowsComments, + ); + $('.js-field-has-comments').toggleClass( + CKCLS, + this.currentBoard.allowsComments, + ); + }, }, ]; }, -}).register('boardDateSettingsPopup'); +}).register('boardCardSettingsPopup'); BlazeComponent.extendComponent({ onCreated() { |