diff options
Diffstat (limited to 'client/components/cards')
-rw-r--r-- | client/components/cards/attachments.jade | 29 | ||||
-rw-r--r-- | client/components/cards/cardDate.js | 3 | ||||
-rw-r--r-- | client/components/cards/cardDetails.jade | 475 | ||||
-rw-r--r-- | client/components/cards/cardDetails.js | 102 | ||||
-rw-r--r-- | client/components/cards/cardDetails.styl | 32 | ||||
-rw-r--r-- | client/components/cards/checklists.jade | 4 | ||||
-rw-r--r-- | client/components/cards/checklists.js | 12 | ||||
-rw-r--r-- | client/components/cards/minicard.jade | 17 | ||||
-rw-r--r-- | client/components/cards/minicard.js | 26 | ||||
-rw-r--r-- | client/components/cards/subtasks.jade | 4 | ||||
-rw-r--r-- | client/components/cards/subtasks.js | 9 |
11 files changed, 504 insertions, 209 deletions
diff --git a/client/components/cards/attachments.jade b/client/components/cards/attachments.jade index a5a5c00b..e6e50d7a 100644 --- a/client/components/cards/attachments.jade +++ b/client/components/cards/attachments.jade @@ -45,19 +45,22 @@ template(name="attachmentsGalery") | {{_ 'download'}} if currentUser.isBoardMember unless currentUser.isCommentOnly - if isImage - a(class="{{#if $eq ../coverId _id}}js-remove-cover{{else}}js-add-cover{{/if}}") - i.fa.fa-thumb-tack - if($eq ../coverId _id) - | {{_ 'remove-cover'}} - else - | {{_ 'add-cover'}} - a.js-confirm-delete - i.fa.fa-close - | {{_ 'delete'}} + unless currentUser.isWorker + if isImage + a(class="{{#if $eq ../coverId _id}}js-remove-cover{{else}}js-add-cover{{/if}}") + i.fa.fa-thumb-tack + if($eq ../coverId _id) + | {{_ 'remove-cover'}} + else + | {{_ 'add-cover'}} + a.js-confirm-delete + i.fa.fa-close + | {{_ 'delete'}} if currentUser.isBoardMember unless currentUser.isCommentOnly - li.attachment-item.add-attachment - a.js-add-attachment {{_ 'add-attachment' }} - + unless currentUser.isWorker + //li.attachment-item.add-attachment + a.js-add-attachment + i.fa.fa-paperclip + | {{_ 'add-attachment' }} diff --git a/client/components/cards/cardDate.js b/client/components/cards/cardDate.js index cb54b033..c4b5c6d8 100644 --- a/client/components/cards/cardDate.js +++ b/client/components/cards/cardDate.js @@ -97,7 +97,8 @@ Template.dateBadge.helpers({ return ( Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, }); diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index 53a264ec..615ae1d5 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -4,15 +4,27 @@ template(name="cardDetails") +inlinedForm(classNames="js-card-details-title") +editCardTitleForm else - 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 + unless isMiniScreen + 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 }}") + a.fa.fa-link.card-copy-button.js-copy-link( + class="fa-link" + title="{{_ 'copy-card-link-to-clipboard'}}" + value="{{ absoluteUrl }}" + ) + if isMiniScreen + a.fa.fa-times-thin.close-card-details-mobile-web.js-close-card-details + if currentUser.isBoardMember + a.fa.fa-navicon.card-details-menu-mobile-web.js-open-card-details-menu + a.fa.fa-link.card-copy-mobile-button h2.card-details-title.js-card-title( class="{{#if canModifyCard}}js-open-inlined-form is-editable{{/if}}") +viewer = getTitle - if isWatching - i.fa.fa-eye.card-details-watch + if isWatching + i.card-details-watch.fa.fa-eye .card-details-path each parentList | > @@ -31,70 +43,105 @@ template(name="cardDetails") p.warning {{_ 'card-archived'}} .card-details-items - .card-details-item.card-details-item-received - h3.card-details-item-title {{_ 'card-received'}} - if getReceived - +cardReceivedDate - else - if canModifyCard - a.js-received-date {{_ 'add'}} - - .card-details-item.card-details-item-start - h3.card-details-item-title {{_ 'card-start'}} - if getStart - +cardStartDate - else - if canModifyCard - a.js-start-date {{_ 'add'}} - - .card-details-item.card-details-item-due - h3.card-details-item-title {{_ 'card-due'}} - if getDue - +cardDueDate - else + if currentBoard.allowsReceivedDate + .card-details-item.card-details-item-received + h3 + i.fa.fa-sign-out + card-details-item-title {{_ 'card-received'}} + if getReceived + +cardReceivedDate + else + if canModifyCard + unless currentUser.isWorker + a.card-label.add-label.js-received-date + i.fa.fa-plus + + if currentBoard.allowsStartDate + .card-details-item.card-details-item-start + h3 + i.fa.fa-hourglass-start + card-details-item-title {{_ 'card-start'}} + if getStart + +cardStartDate + else + if canModifyCard + unless currentUser.isWorker + 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 + h3 + i.fa.fa-hourglass-end + card-details-item-title {{_ 'card-end'}} + if getEnd + +cardEndDate + else + if canModifyCard + unless currentUser.isWorker + a.card-label.add-label.js-end-date + i.fa.fa-plus + + //.card-details-items + if currentBoard.allowsMembers + .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 - a.js-due-date {{_ 'add'}} - - .card-details-item.card-details-item-end - h3.card-details-item-title {{_ 'card-end'}} - if getEnd - +cardEndDate - else + unless currentUser.isWorker + a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}") + i.fa.fa-plus + + //if assigneeSelected + if currentBoard.allowsAssignee + .card-details-item.card-details-item-assignees + h3 + i.fa.fa-user + card-details-item-title {{_ 'assignee'}} + each getAssignees + +userAvatarAssignee(userId=this cardId=../_id) + | {{! XXX Hack to hide syntaxic coloration /// }} if canModifyCard - a.js-end-date {{_ 'add'}} - - .card-details-items - .card-details-item.card-details-item-members - h3.card-details-item-title {{_ 'members'}} - each getMembers - +userAvatar(userId=this cardId=../_id) - | {{! XXX Hack to hide syntaxic coloration /// }} - if canModifyCard - a.member.add-member.card-details-item-add-button.js-add-members(title="{{_ 'card-members-title'}}") - i.fa.fa-plus - - .card-details-item.card-details-item-assignees - h3.card-details-item-title {{_ 'assignee'}} - each getAssignees - +userAvatarAssignee(userId=this cardId=../_id) - | {{! XXX Hack to hide syntaxic coloration /// }} - if canModifyCard - unless assigneeSelected a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}") i.fa.fa-plus + if currentUser.isWorker + unless assigneeSelected + a.assignee.add-assignee.card-details-item-add-button.js-add-assignees(title="{{_ 'assignee'}}") + 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-item.card-details-item-labels - h3.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 - a.card-label.add-label.js-add-labels(title="{{_ 'card-labels-title'}}") - i.fa.fa-plus - - .card-details-items + //.card-details-items each customFieldsWD .card-details-item.card-details-item-customfield h3.card-details-item-title @@ -102,7 +149,7 @@ template(name="cardDetails") = definition.name +cardCustomField - .card-details-items + //.card-details-items if getSpentTime .card-details-item.card-details-item-spent if getIsOvertime @@ -111,84 +158,103 @@ template(name="cardDetails") h3.card-details-item-title {{_ 'spent-time-hours'}} +cardSpentTime - //- XXX We should use "editable" to avoid repetiting ourselves - if canModifyCard - h3.card-details-item-title {{_ 'description'}} - +inlinedCardDescription(classNames="card-description js-card-description") - +editor(autofocus=true) - | {{getUnsavedValue 'cardDescription' _id getDescription}} - .edit-controls.clearfix - button.primary(type="submit") {{_ 'save'}} - a.fa.fa-times-thin.js-close-inlined-form - else - a.js-open-inlined-form - if getDescription + //.card-details-items + if currentBoard.allowsRequestedBy + .card-details-item.card-details-item-name + h3 + i.fa.fa-shopping-cart + card-details-item-title {{_ 'requested-by'}} + if canModifyCard + unless currentUser.isWorker + +inlinedForm(classNames="js-card-details-requester") + +editCardRequesterForm + else + a.js-open-inlined-form + if getRequestedBy + +viewer + = getRequestedBy + else + | {{_ 'add'}} + else if getRequestedBy +viewer - = getDescription - else - | {{_ 'edit'}} - if (hasUnsavedValue 'cardDescription' _id) - p.quiet - | {{_ 'unsaved-description'}} - a.js-open-inlined-form {{_ 'view-it'}} - = ' - ' - a.js-close-inlined-form {{_ 'discard'}} - else if getDescription - h3.card-details-item-title {{_ 'description'}} - +viewer - = getDescription + = getRequestedBy - .card-details-items - .card-details-item.card-details-item-name - h3.card-details-item-title {{_ 'requested-by'}} - if canModifyCard - +inlinedForm(classNames="js-card-details-requester") - +editCardRequesterForm - else - a.js-open-inlined-form - if getRequestedBy - +viewer - = getRequestedBy - else - | {{_ 'add'}} - else if getRequestedBy - +viewer - = getRequestedBy - - .card-details-item.card-details-item-name - h3.card-details-item-title {{_ 'assigned-by'}} - if canModifyCard - +inlinedForm(classNames="js-card-details-assigner") - +editCardAssignerForm - else - a.js-open-inlined-form - if getAssignedBy - +viewer - = getAssignedBy + if currentBoard.allowsAssignedBy + .card-details-item.card-details-item-name + h3 + i.fa.fa-user-plus + card-details-item-title {{_ 'assigned-by'}} + if canModifyCard + unless currentUser.isWorker + +inlinedForm(classNames="js-card-details-assigner") + +editCardAssignerForm else - | {{_ 'add'}} - else if getRequestedBy - +viewer - = getAssignedBy - - hr - +checklists(cardId = _id) - - if currentBoard.allowsSubtasks - hr - +subtasks(cardId = _id) - - hr - h3 - i.fa.fa-paperclip - | {{_ 'attachments'}} + a.js-open-inlined-form + if getAssignedBy + +viewer + = getAssignedBy + else + | {{_ 'add'}} + else if getRequestedBy + +viewer + = getAssignedBy - +attachmentsGalery + //- XXX We should use "editable" to avoid repetiting ourselves + if canModifyCard + unless currentUser.isWorker + if currentBoard.allowsDescriptionTitle + h3 + i.fa.fa-align-left + card-details-item-title {{_ 'description'}} + if currentBoard.allowsDescriptionText + +inlinedCardDescription(classNames="card-description js-card-description") + +editor(autofocus=true) + | {{getUnsavedValue 'cardDescription' _id getDescription}} + .edit-controls.clearfix + button.primary(type="submit") {{_ 'save'}} + a.fa.fa-times-thin.js-close-inlined-form + else + if currentBoard.allowsDescriptionText + a.js-open-inlined-form + if getDescription + +viewer + = getDescription + else + | {{_ 'edit'}} + if (hasUnsavedValue 'cardDescription' _id) + p.quiet + | {{_ 'unsaved-description'}} + a.js-open-inlined-form {{_ 'view-it'}} + = ' - ' + a.js-close-inlined-form {{_ 'discard'}} + else if getDescription + if currentBoard.allowsDescriptionTitle + h3.card-details-item-title {{_ 'description'}} + if currentBoard.allowsDescriptionText + +viewer + = getDescription + + .card-checklist-attachmentGalerys + .card-checklist-attachmentGalery.card-checklists + if currentBoard.allowsChecklists + +checklists(cardId = _id) + if currentBoard.allowsSubtasks + hr + +subtasks(cardId = _id) + if currentBoard.allowsAttachments + //- hr + //- h3 + //- i.fa.fa-paperclip + //- | {{_ 'attachments'}} + .card-checklist-attachmentGalery.card-attachmentGalery + +attachmentsGalery hr unless currentUser.isNoComments .activity-title - h3 {{ _ 'activity'}} + h3 + i.fa.fa-history + | {{ _ 'activity'}} if currentUser.isBoardMember .material-toggle-switch span.toggle-switch-title {{_ 'hide-system-messages'}} @@ -197,9 +263,10 @@ template(name="cardDetails") else input.toggle-switch(type="checkbox" id="toggleButton") label.toggle-label(for="toggleButton") - if currentUser.isBoardMember - unless currentUser.isNoComments - +commentForm + if currentBoard.allowsComments + if currentUser.isBoardMember + unless currentUser.isNoComments + +commentForm unless currentUser.isNoComments if isLoaded.get if isLinkedCard @@ -230,32 +297,79 @@ template(name="editCardAssignerForm") template(name="cardDetailsActionsPopup") ul.pop-over-list - li: a.js-toggle-watch-card {{#if isWatching}}{{_ 'unwatch'}}{{else}}{{_ 'watch'}}{{/if}} + li + a.js-toggle-watch-card + if isWatching + i.fa.fa-eye + | {{_ 'unwatch'}} + else + i.fa.fa-eye-slash + | {{_ 'watch'}} if canModifyCard - hr - ul.pop-over-list - //li: a.js-members {{_ 'card-edit-members'}} - //li: a.js-labels {{_ 'card-edit-labels'}} - //li: a.js-attachments {{_ 'card-edit-attachments'}} - li: a.js-custom-fields {{_ 'card-edit-custom-fields'}} - //li: a.js-received-date {{_ 'editCardReceivedDatePopup-title'}} - //li: a.js-start-date {{_ 'editCardStartDatePopup-title'}} - //li: a.js-due-date {{_ 'editCardDueDatePopup-title'}} - //li: a.js-end-date {{_ 'editCardEndDatePopup-title'}} - li: a.js-spent-time {{_ 'editCardSpentTimePopup-title'}} - li: a.js-set-card-color {{_ 'setCardColorPopup-title'}} - hr - ul.pop-over-list - li: a.js-move-card-to-top {{_ 'moveCardToTop-title'}} - li: a.js-move-card-to-bottom {{_ 'moveCardToBottom-title'}} - hr + unless currentUser.isWorker + hr + ul.pop-over-list + //li: a.js-members {{_ 'card-edit-members'}} + //li: a.js-labels {{_ 'card-edit-labels'}} + //li: a.js-attachments {{_ 'card-edit-attachments'}} + li + a.js-custom-fields + i.fa.fa-list-alt + | {{_ 'card-edit-custom-fields'}} + //li: a.js-received-date {{_ 'editCardReceivedDatePopup-title'}} + //li: a.js-start-date {{_ 'editCardStartDatePopup-title'}} + //li: a.js-due-date {{_ 'editCardDueDatePopup-title'}} + //li: a.js-end-date {{_ 'editCardEndDatePopup-title'}} + li + a.js-spent-time + i.fa.fa-clock-o + | {{_ 'editCardSpentTimePopup-title'}} + li + a.js-set-card-color + i.fa.fa-paint-brush + | {{_ 'setCardColorPopup-title'}} + hr ul.pop-over-list - li: a.js-move-card {{_ 'moveCardPopup-title'}} - li: a.js-copy-card {{_ 'copyCardPopup-title'}} - li: a.js-copy-checklist-cards {{_ 'copyChecklistToManyCardsPopup-title'}} + li + a.js-move-card-to-top + i.fa.fa-arrow-up + | {{_ 'moveCardToTop-title'}} + li + a.js-move-card-to-bottom + i.fa.fa-arrow-down + | {{_ 'moveCardToBottom-title'}} + unless currentUser.isWorker + hr + ul.pop-over-list + li + a.js-move-card + i.fa.fa-arrow-right + | {{_ 'moveCardPopup-title'}} + li + a.js-copy-card + i.fa.fa-copy + | {{_ 'copyCardPopup-title'}} + hr + ul.pop-over-list + li + a.js-copy-checklist-cards + i.fa.fa-list + i.fa.fa-copy + | {{_ 'copyChecklistToManyCardsPopup-title'}} unless archived - li: a.js-archive {{_ 'archive-card'}} - li: a.js-more {{_ 'cardMorePopup-title'}} + hr + ul.pop-over-list + li + a.js-archive + i.fa.fa-arrow-right + i.fa.fa-archive + | {{_ 'archive-card'}} + hr + ul.pop-over-list + li + a.js-more + i.fa.fa-link + | {{_ 'cardMorePopup-title'}} template(name="moveCardPopup") +boardsAndLists @@ -307,16 +421,27 @@ template(name="cardMembersPopup") i.fa.fa-check template(name="cardAssigneesPopup") - ul.pop-over-list.js-card-assignee-list - each board.activeMembers - li.item(class="{{#if isCardAssignee}}active{{/if}}") - a.name.js-select-assignee(href="#") - +userAvatar(userId=user._id) - span.full-name - = user.profile.fullname - | (<span class="username">{{ user.username }}</span>) - if isCardAssignee - i.fa.fa-check + unless currentUser.isWorker + ul.pop-over-list.js-card-assignee-list + each board.activeMembers + li.item(class="{{#if isCardAssignee}}active{{/if}}") + a.name.js-select-assignee(href="#") + +userAvatar(userId=user._id) + span.full-name + = user.profile.fullname + | (<span class="username">{{ user.username }}</span>) + if isCardAssignee + i.fa.fa-check + if currentUser.isWorker + ul.pop-over-list.js-card-assignee-list + li.item(class="{{#if currentUser.isCardAssignee}}active{{/if}}") + a.name.js-select-assignee(href="#") + +userAvatar(userId=currentUser._id) + span.full-name + = currentUser.profile.fullname + | (<span class="username">{{ currentUser.username }}</span>) + if currentUser.isCardAssignee + i.fa.fa-check template(name="userAvatarAssignee") a.assignee.js-assignee(title="{{userData.profile.fullname}} ({{userData.username}})") @@ -344,11 +469,13 @@ template(name="cardAssigneePopup") p.quiet @{{ user.username }} ul.pop-over-list if currentUser.isNotCommentOnly + unless currentUser.isWorker li: a.js-remove-assignee {{_ 'remove-member-from-card'}} - if $eq currentUser._id user._id - with currentUser - li: a.js-edit-profile {{_ 'edit-profile'}} + unless currentUser.isWorker + if $eq currentUser._id user._id + with currentUser + li: a.js-edit-profile {{_ 'edit-profile'}} template(name="userAvatarAssigneeInitials") svg.avatar.avatar-assignee-initials(viewBox="0 0 {{viewPortWidth}} 15") diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 7bb54223..5fdc5579 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -51,7 +51,8 @@ BlazeComponent.extendComponent({ return ( Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, @@ -252,6 +253,12 @@ BlazeComponent.extendComponent({ if ($subtasksDom.data('sortable')) { $subtasksDom.sortable('option', 'disabled', !userIsMember()); } + if ($checklistsDom.data('sortable')) { + $checklistsDom.sortable('option', 'disabled', Utils.isMiniScreen()); + } + if ($subtasksDom.data('sortable')) { + $subtasksDom.sortable('option', 'disabled', Utils.isMiniScreen()); + } }); }, @@ -278,6 +285,29 @@ BlazeComponent.extendComponent({ 'click .js-close-card-details'() { Utils.goBoardId(this.data().boardId); }, + 'click .js-copy-link'() { + StringToCopyElement = document.getElementById('cardURL_copy'); + StringToCopyElement.select(); + if (document.execCommand('copy')) { + StringToCopyElement.blur(); + } else { + document.getElementById('cardURL_copy').selectionStart = 0; + document.getElementById('cardURL_copy').selectionEnd = 999; + document.execCommand('copy'); + if (window.getSelection) { + if (window.getSelection().empty) { + // Chrome + window.getSelection().empty(); + } else if (window.getSelection().removeAllRanges) { + // Firefox + window.getSelection().removeAllRanges(); + } + } else if (document.selection) { + // IE? + document.selection.empty(); + } + } + }, 'click .js-open-card-details-menu': Popup.open('cardDetailsActions'), 'submit .js-card-description'(event) { event.preventDefault(); @@ -291,6 +321,8 @@ BlazeComponent.extendComponent({ .trim(); if (title) { this.data().setTitle(title); + } else { + this.data().setTitle(''); } }, 'submit .js-card-details-assigner'(event) { @@ -300,6 +332,8 @@ BlazeComponent.extendComponent({ .trim(); if (assigner) { this.data().setAssignedBy(assigner); + } else { + this.data().setAssignedBy(''); } }, 'submit .js-card-details-requester'(event) { @@ -309,6 +343,8 @@ BlazeComponent.extendComponent({ .trim(); if (requester) { this.data().setRequestedBy(requester); + } else { + this.data().setRequestedBy(''); } }, 'click .js-member': Popup.open('cardMember'), @@ -364,6 +400,54 @@ Template.cardDetails.helpers({ }); }, + receivedSelected() { + if (this.getReceived().length === 0) { + return false; + } else { + return true; + } + }, + + startSelected() { + if (this.getStart().length === 0) { + return false; + } else { + return true; + } + }, + + endSelected() { + if (this.getEnd().length === 0) { + return false; + } else { + return true; + } + }, + + dueSelected() { + if (this.getDue().length === 0) { + return false; + } else { + return true; + } + }, + + memberSelected() { + if (this.getMembers().length === 0) { + return false; + } else { + return true; + } + }, + + labelSelected() { + if (this.getLabels().length === 0) { + return false; + } else { + return true; + } + }, + assigneeSelected() { if (this.getAssignees().length === 0) { return false; @@ -372,6 +456,22 @@ Template.cardDetails.helpers({ } }, + requestBySelected() { + if (this.getRequestBy().length === 0) { + return false; + } else { + return true; + } + }, + + assigneeBySelected() { + if (this.getAssigneeBy().length === 0) { + return false; + } else { + return true; + } + }, + memberType() { const user = Users.findOne(this.userId); return user && user.isBoardAdmin() ? 'admin' : 'normal'; diff --git a/client/components/cards/cardDetails.styl b/client/components/cards/cardDetails.styl index e4549e44..80fa87c0 100644 --- a/client/components/cards/cardDetails.styl +++ b/client/components/cards/cardDetails.styl @@ -4,6 +4,12 @@ avatar-radius = 50% +#cardURL_copy + // Have clipboard text not visible by moving it to far left + position: absolute + left: -2000px + top: 0px + .assignee border-radius: 3px display: block @@ -107,7 +113,11 @@ avatar-radius = 50% border-bottom: 1px solid darken(white, 14%) .close-card-details, - .card-details-menu + .card-details-menu, + .card-copy-button, + .card-copy-mobile-button, + .close-card-details-mobile-web, + .card-details-menu-mobile-web float: right .close-card-details @@ -115,10 +125,30 @@ avatar-radius = 50% padding: 5px margin-right: -8px + .close-card-details-mobile-web + font-size: 24px + 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 + .card-details-menu-mobile-web + font-size: 17px + padding: 10px + margin-right: 30px + .card-details-watch font-size: 17px padding-left: 7px diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade index 279d3671..391769e9 100644 --- a/client/components/cards/checklists.jade +++ b/client/components/cards/checklists.jade @@ -1,5 +1,7 @@ template(name="checklists") - h3 {{_ 'checklists'}} + h3 + i.fa.fa-check + | {{_ 'checklists'}} if toggleDeleteDialog.get .board-overlay#card-details-overlay +checklistDeleteDialog(checklist = checklistToDelete) diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js index 57939eb8..c88fdd82 100644 --- a/client/components/cards/checklists.js +++ b/client/components/cards/checklists.js @@ -60,6 +60,9 @@ BlazeComponent.extendComponent({ if ($itemsDom.data('sortable')) { $(self.itemsDom).sortable('option', 'disabled', !userIsMember()); } + if ($itemsDom.data('sortable')) { + $(self.itemsDom).sortable('option', 'disabled', Utils.isMiniScreen()); + } }); }, @@ -67,7 +70,8 @@ BlazeComponent.extendComponent({ return ( Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, }).register('checklistDetail'); @@ -120,7 +124,8 @@ BlazeComponent.extendComponent({ return ( Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, @@ -228,7 +233,8 @@ Template.checklistItemDetail.helpers({ return ( Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, }); diff --git a/client/components/cards/minicard.jade b/client/components/cards/minicard.jade index 0a35bd3a..6a073424 100644 --- a/client/components/cards/minicard.jade +++ b/client/components/cards/minicard.jade @@ -4,8 +4,8 @@ template(name="minicard") class="{{#if isLinkedBoard}}linked-board{{/if}}" class="minicard-{{colorClass}}") if isMiniScreen - .handle - .fa.fa-arrows + //.handle + // .fa.fa-arrows unless isMiniScreen if showDesktopDragHandles .handle @@ -67,14 +67,15 @@ template(name="minicard") .minicard-custom-fields each customFieldsWD if definition.showOnCard - .minicard-custom-field - if definition.showLabelOnMiniCard + if trueValue + .minicard-custom-field + if definition.showLabelOnMiniCard + .minicard-custom-field-item + +viewer + = definition.name .minicard-custom-field-item +viewer - = definition.name - .minicard-custom-field-item - +viewer - = trueValue + = trueValue if getAssignees .minicard-assignees.js-minicard-assignees diff --git a/client/components/cards/minicard.js b/client/components/cards/minicard.js index 430042f4..200e019d 100644 --- a/client/components/cards/minicard.js +++ b/client/components/cards/minicard.js @@ -1,3 +1,5 @@ +import { Cookies } from 'meteor/ostrio:cookies'; +const cookies = new Cookies(); // Template.cards.events({ // 'click .member': Popup.open('cardMember') // }); @@ -18,7 +20,11 @@ BlazeComponent.extendComponent({ }, { 'click .js-toggle-minicard-label-text'() { - Meteor.call('toggleMinicardLabelText'); + if (cookies.has('hiddenMinicardLabelText')) { + cookies.remove('hiddenMinicardLabelText'); //true + } else { + cookies.set('hiddenMinicardLabelText', 'true'); //true + } }, }, ]; @@ -27,10 +33,24 @@ BlazeComponent.extendComponent({ Template.minicard.helpers({ showDesktopDragHandles() { - return Meteor.user().hasShowDesktopDragHandles(); + currentUser = Meteor.user(); + if (currentUser) { + return (currentUser.profile || {}).showDesktopDragHandles; + } else if (cookies.has('showDesktopDragHandles')) { + return true; + } else { + return false; + } }, hiddenMinicardLabelText() { - return Meteor.user().hasHiddenMinicardLabelText(); + currentUser = Meteor.user(); + if (currentUser) { + return (currentUser.profile || {}).hiddenMinicardLabelText; + } else if (cookies.has('hiddenMinicardLabelText')) { + return true; + } else { + return false; + } }, coverUrl() { return Attachments.findOne(this.coverId).link('original', '/'); diff --git a/client/components/cards/subtasks.jade b/client/components/cards/subtasks.jade index 7e64e23f..df35bed3 100644 --- a/client/components/cards/subtasks.jade +++ b/client/components/cards/subtasks.jade @@ -1,5 +1,7 @@ template(name="subtasks") - h3 {{_ 'subtasks'}} + h3 + i.fa.fa-sitemap + | {{_ 'subtasks'}} if toggleDeleteDialog.get .board-overlay#card-details-overlay +subtaskDeleteDialog(subtask = subtaskToDelete) diff --git a/client/components/cards/subtasks.js b/client/components/cards/subtasks.js index fab860bb..34348fe1 100644 --- a/client/components/cards/subtasks.js +++ b/client/components/cards/subtasks.js @@ -3,7 +3,8 @@ BlazeComponent.extendComponent({ return ( Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, }).register('subtaskDetail'); @@ -55,7 +56,8 @@ BlazeComponent.extendComponent({ return ( Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, @@ -154,7 +156,8 @@ Template.subtaskItemDetail.helpers({ return ( Meteor.user() && Meteor.user().isBoardMember() && - !Meteor.user().isCommentOnly() + !Meteor.user().isCommentOnly() && + !Meteor.user().isWorker() ); }, }); |