diff options
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/boards/boardBody.jade | 2 | ||||
-rw-r--r-- | client/components/boards/boardBody.js | 8 | ||||
-rw-r--r-- | client/components/boards/boardHeader.jade | 6 | ||||
-rw-r--r-- | client/components/boards/boardHeader.js | 8 | ||||
-rw-r--r-- | client/components/cards/cardDetails.jade | 6 | ||||
-rw-r--r-- | client/components/cards/checklists.jade | 2 | ||||
-rw-r--r-- | client/components/cards/subtasks.jade | 6 | ||||
-rw-r--r-- | client/components/lists/list.js | 4 | ||||
-rw-r--r-- | client/components/lists/listBody.jade | 2 | ||||
-rw-r--r-- | client/components/lists/listBody.js | 18 | ||||
-rw-r--r-- | client/components/lists/listHeader.js | 2 | ||||
-rw-r--r-- | client/components/main/editor.jade | 3 | ||||
-rw-r--r-- | client/components/sidebar/sidebarSearches.jade | 2 | ||||
-rw-r--r-- | client/components/swimlanes/swimlanes.js | 2 |
14 files changed, 38 insertions, 33 deletions
diff --git a/client/components/boards/boardBody.jade b/client/components/boards/boardBody.jade index 32f8629f..017d0b0a 100644 --- a/client/components/boards/boardBody.jade +++ b/client/components/boards/boardBody.jade @@ -30,6 +30,8 @@ template(name="boardBody") +listsGroup(currentBoard) else if isViewCalendar +calendarView + else + +listsGroup(currentBoard) template(name="calendarView") if isViewCalendar diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js index 9105e624..301c0742 100644 --- a/client/components/boards/boardBody.js +++ b/client/components/boards/boardBody.js @@ -191,19 +191,19 @@ BlazeComponent.extendComponent({ isViewSwimlanes() { const currentUser = Meteor.user(); if (!currentUser) return false; - return (currentUser.profile.boardView === 'board-view-swimlanes'); + return ((currentUser.profile || {}).boardView === 'board-view-swimlanes'); }, isViewLists() { const currentUser = Meteor.user(); if (!currentUser) return true; - return (currentUser.profile.boardView === 'board-view-lists'); + return ((currentUser.profile || {}).boardView === 'board-view-lists'); }, isViewCalendar() { const currentUser = Meteor.user(); if (!currentUser) return false; - return (currentUser.profile.boardView === 'board-view-cal'); + return ((currentUser.profile || {}).boardView === 'board-view-cal'); }, openNewListForm() { @@ -335,6 +335,6 @@ BlazeComponent.extendComponent({ isViewCalendar() { const currentUser = Meteor.user(); if (!currentUser) return false; - return (currentUser.profile.boardView === 'board-view-cal'); + return ((currentUser.profile || {}).boardView === 'board-view-cal'); }, }).register('calendarView'); diff --git a/client/components/boards/boardHeader.jade b/client/components/boards/boardHeader.jade index 823bd806..8bc61975 100644 --- a/client/components/boards/boardHeader.jade +++ b/client/components/boards/boardHeader.jade @@ -98,7 +98,7 @@ template(name="boardHeaderBar") a.board-header-btn.js-toggle-board-view( title="{{_ 'board-view'}}") i.fa.fa-th-large - span {{_ currentUser.profile.boardView}} + span {{#if currentUser.profile.boardView}}{{_ currentUser.profile.boardView}}{{else}}{{_ 'board-view-lists'}}{{/if}} if canModifyBoard a.board-header-btn.js-multiselection-activate( @@ -193,10 +193,10 @@ template(name="boardChangeTitlePopup") form label | {{_ 'title'}} - input.js-board-name(type="text" value=title autofocus) + input.js-board-name(type="text" value=title autofocus dir="auto") label | {{_ 'description'}} - textarea.js-board-desc= description + textarea.js-board-desc(dir="auto")= description input.primary.wide(type="submit" value="{{_ 'rename'}}") template(name="boardCreateRulePopup") diff --git a/client/components/boards/boardHeader.js b/client/components/boards/boardHeader.js index 86fbebb3..f2b5c4f5 100644 --- a/client/components/boards/boardHeader.js +++ b/client/components/boards/boardHeader.js @@ -89,12 +89,14 @@ BlazeComponent.extendComponent({ }, 'click .js-toggle-board-view'() { const currentUser = Meteor.user(); - if (currentUser.profile.boardView === 'board-view-swimlanes') { + if ((currentUser.profile || {}).boardView === 'board-view-swimlanes') { currentUser.setBoardView('board-view-cal'); - } else if (currentUser.profile.boardView === 'board-view-lists') { + } else if ((currentUser.profile || {}).boardView === 'board-view-lists') { currentUser.setBoardView('board-view-swimlanes'); - } else if (currentUser.profile.boardView === 'board-view-cal') { + } else if ((currentUser.profile || {}).boardView === 'board-view-cal') { currentUser.setBoardView('board-view-lists'); + } else { + currentUser.setBoardView('board-view-swimlanes'); } }, 'click .js-toggle-sidebar'() { diff --git a/client/components/cards/cardDetails.jade b/client/components/cards/cardDetails.jade index bb633754..88f97adc 100644 --- a/client/components/cards/cardDetails.jade +++ b/client/components/cards/cardDetails.jade @@ -197,20 +197,20 @@ template(name="cardDetails") +activities(card=this mode="card") template(name="editCardTitleForm") - textarea.js-edit-card-title(rows='1' autofocus) + textarea.js-edit-card-title(rows='1' autofocus dir="auto") = getTitle .edit-controls.clearfix button.primary.confirm.js-submit-edit-card-title-form(type="submit") {{_ 'save'}} a.fa.fa-times-thin.js-close-inlined-form template(name="editCardRequesterForm") - input.js-edit-card-requester(type='text' autofocus value=getRequestedBy) + input.js-edit-card-requester(type='text' autofocus value=getRequestedBy dir="auto") .edit-controls.clearfix button.primary.confirm.js-submit-edit-card-requester-form(type="submit") {{_ 'save'}} a.fa.fa-times-thin.js-close-inlined-form template(name="editCardAssignerForm") - input.js-edit-card-assigner(type='text' autofocus value=getAssignedBy) + input.js-edit-card-assigner(type='text' autofocus value=getAssignedBy dir="auto") .edit-controls.clearfix button.primary.confirm.js-submit-edit-card-assigner-form(type="submit") {{_ 'save'}} a.fa.fa-times-thin.js-close-inlined-form diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade index e45e7ad9..279d3671 100644 --- a/client/components/cards/checklists.jade +++ b/client/components/cards/checklists.jade @@ -56,7 +56,7 @@ template(name="addChecklistItemForm") a.fa.fa-times-thin.js-close-inlined-form template(name="editChecklistItemForm") - textarea.js-edit-checklist-item(rows='1' autofocus) + textarea.js-edit-checklist-item(rows='1' autofocus dir="auto") if $eq type 'item' = item.title else diff --git a/client/components/cards/subtasks.jade b/client/components/cards/subtasks.jade index b0ef2f33..7e64e23f 100644 --- a/client/components/cards/subtasks.jade +++ b/client/components/cards/subtasks.jade @@ -50,13 +50,13 @@ template(name="subtaskDeleteDialog") button.toggle-delete-subtask-dialog(type="button") {{_ 'cancel'}} template(name="addSubtaskItemForm") - textarea.js-add-subtask-item(rows='1' autofocus) + textarea.js-add-subtask-item(rows='1' autofocus dir="auto") .edit-controls.clearfix button.primary.confirm.js-submit-add-subtask-item-form(type="submit") {{_ 'save'}} a.fa.fa-times-thin.js-close-inlined-form template(name="editSubtaskItemForm") - textarea.js-edit-subtask-item(rows='1' autofocus) + textarea.js-edit-subtask-item(rows='1' autofocus dir="auto") if $eq type 'item' = item.title else @@ -76,7 +76,7 @@ template(name="subtasksItems") else +subtaskItemDetail(item = item subtasks = subtasks) if canModifyCard - +inlinedForm(autoclose=false classNames="js-add-subtask-item" subtasks = subtasks) + +inlinedForm(autoclose=false classNames="js-add-subtask-item" subtasks = subtasks dir="auto") +addSubtaskItemForm else a.add-subtask-item.js-open-inlined-form diff --git a/client/components/lists/list.js b/client/components/lists/list.js index 12932a82..ea0068eb 100644 --- a/client/components/lists/list.js +++ b/client/components/lists/list.js @@ -69,10 +69,10 @@ BlazeComponent.extendComponent({ const listId = Blaze.getData(ui.item.parents('.list').get(0))._id; const currentBoard = Boards.findOne(Session.get('currentBoard')); let swimlaneId = ''; - const boardView = Meteor.user().profile.boardView; + const boardView = (Meteor.user().profile || {}).boardView; if (boardView === 'board-view-swimlanes' || currentBoard.isTemplatesBoard()) swimlaneId = Blaze.getData(ui.item.parents('.swimlane').get(0))._id; - else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal')) + else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal') || !boardView) swimlaneId = currentBoard.getDefaultSwimline()._id; // Normally the jquery-ui sortable library moves the dragged DOM element diff --git a/client/components/lists/listBody.jade b/client/components/lists/listBody.jade index 61fec93a..71ad7f90 100644 --- a/client/components/lists/listBody.jade +++ b/client/components/lists/listBody.jade @@ -105,7 +105,7 @@ template(name="searchElementPopup") each boards option(value="{{_id}}") {{title}} form.js-search-term-form - input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus) + input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus dir="auto") .list-body.js-perfect-scrollbar.search-card-results .minicards.clearfix.js-minicards if isBoardTemplateSearch diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 43619890..a5ccba3f 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -48,7 +48,7 @@ BlazeComponent.extendComponent({ const board = this.data().board(); let linkedId = ''; let swimlaneId = ''; - const boardView = Meteor.user().profile.boardView; + const boardView = (Meteor.user().profile || {}).boardView; let cardType = 'cardType-card'; if (title) { if (board.isTemplatesBoard()) { @@ -72,7 +72,7 @@ BlazeComponent.extendComponent({ } } else if (boardView === 'board-view-swimlanes') swimlaneId = this.parentComponent().parentComponent().data()._id; - else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal')) + else if ((boardView === 'board-view-lists') || (boardView === 'board-view-cal') || !boardView) swimlaneId = board.getDefaultSwimline()._id; const _id = Cards.insert({ @@ -149,7 +149,7 @@ BlazeComponent.extendComponent({ idOrNull(swimlaneId) { const currentUser = Meteor.user(); - if (currentUser.profile.boardView === 'board-view-swimlanes' || + if ((currentUser.profile || {}).boardView === 'board-view-swimlanes' || this.data().board().isTemplatesBoard()) return swimlaneId; return undefined; @@ -356,10 +356,10 @@ BlazeComponent.extendComponent({ // Swimlane where to insert card const swimlane = $(Popup._getTopStack().openerElement).closest('.js-swimlane'); this.swimlaneId = ''; - const boardView = Meteor.user().profile.boardView; + const boardView = (Meteor.user().profile || {}).boardView; if (boardView === 'board-view-swimlanes') this.swimlaneId = Blaze.getData(swimlane[0])._id; - else if (boardView === 'board-view-lists') + else if (boardView === 'board-view-lists' || !boardView) this.swimlaneId = Swimlanes.findOne({boardId: this.boardId})._id; }, @@ -485,13 +485,13 @@ BlazeComponent.extendComponent({ this.isBoardTemplateSearch; let board = {}; if (this.isTemplateSearch) { - board = Boards.findOne(Meteor.user().profile.templatesBoardId); + board = Boards.findOne((Meteor.user().profile || {}).templatesBoardId); } else { // Prefetch first non-current board id board = Boards.findOne({ archived: false, 'members.userId': Meteor.userId(), - _id: {$nin: [Session.get('currentBoard'), Meteor.user().profile.templatesBoardId]}, + _id: {$nin: [Session.get('currentBoard'), (Meteor.user().profile || {}).templatesBoardId]}, }); } if (!board) { @@ -510,7 +510,7 @@ BlazeComponent.extendComponent({ this.swimlaneId = ''; // Swimlane where to insert card const swimlane = $(Popup._getTopStack().openerElement).parents('.js-swimlane'); - if (Meteor.user().profile.boardView === 'board-view-swimlanes') + if ((Meteor.user().profile || {}).boardView === 'board-view-swimlanes') this.swimlaneId = Blaze.getData(swimlane[0])._id; else this.swimlaneId = Swimlanes.findOne({boardId: this.boardId})._id; @@ -620,7 +620,7 @@ BlazeComponent.extendComponent({ this.listId = this.parentComponent().data()._id; this.swimlaneId = ''; - const boardView = Meteor.user().profile.boardView; + const boardView = (Meteor.user().profile || {}).boardView; if (boardView === 'board-view-swimlanes') this.swimlaneId = this.parentComponent().parentComponent().parentComponent().data()._id; }, diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index 25e6cb69..923d6063 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -30,7 +30,7 @@ BlazeComponent.extendComponent({ cardsCount() { const list = Template.currentData(); let swimlaneId = ''; - const boardView = Meteor.user().profile.boardView; + const boardView = (Meteor.user().profile || {}).boardView; if (boardView === 'board-view-swimlanes') swimlaneId = this.parentComponent().parentComponent().data()._id; diff --git a/client/components/main/editor.jade b/client/components/main/editor.jade index 31f533e6..dbd61715 100644 --- a/client/components/main/editor.jade +++ b/client/components/main/editor.jade @@ -1,5 +1,6 @@ template(name="editor") textarea.editor( + dir="auto" class="{{class}}" id=id autofocus=autofocus @@ -7,7 +8,7 @@ template(name="editor") +Template.contentBlock template(name="viewer") - .viewer + .viewer(dir="auto") +mentions +markdown {{> UI.contentBlock }} diff --git a/client/components/sidebar/sidebarSearches.jade b/client/components/sidebar/sidebarSearches.jade index 2ad5b00f..96877c50 100644 --- a/client/components/sidebar/sidebarSearches.jade +++ b/client/components/sidebar/sidebarSearches.jade @@ -1,6 +1,6 @@ template(name="searchSidebar") form.js-search-term-form - input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus) + input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus dir="auto") .list-body.js-perfect-scrollbar .minicards.clearfix.js-minicards each (results) diff --git a/client/components/swimlanes/swimlanes.js b/client/components/swimlanes/swimlanes.js index 519b00d2..d0ec3f4a 100644 --- a/client/components/swimlanes/swimlanes.js +++ b/client/components/swimlanes/swimlanes.js @@ -8,7 +8,7 @@ function currentListIsInThisSwimlane(swimlaneId) { function currentCardIsInThisList(listId, swimlaneId) { const currentCard = Cards.findOne(Session.get('currentCard')); const currentUser = Meteor.user(); - if (currentUser && currentUser.profile.boardView === 'board-view-swimlanes') + if (currentUser && currentUser.profile && currentUser.profile.boardView === 'board-view-swimlanes') return currentCard && currentCard.listId === listId && currentCard.swimlaneId === swimlaneId; else // Default view: board-view-lists return currentCard && currentCard.listId === listId; |