mirror of
https://github.com/wekan/wekan.git
synced 2026-02-02 22:51:47 +01:00
Merge remote-tracking branch 'upstream/devel' into devel
This commit is contained in:
commit
e304185c23
42 changed files with 542 additions and 316 deletions
|
|
@ -1,4 +1,4 @@
|
|||
Template.headerTitle.events({
|
||||
Template.boardHeaderBar.events({
|
||||
'click .js-open-archived-board'() {
|
||||
Modal.open('archivedBoards');
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
template(name="headerBoard")
|
||||
template(name="boardHeaderBar")
|
||||
h1.header-board-menu
|
||||
with currentBoard
|
||||
a(class="{{#if currentUser.isBoardAdmin}}js-edit-board-title{{else}}is-disabled{{/if}}")
|
||||
|
|
@ -125,4 +125,4 @@ template(name="boardChangeTitlePopup")
|
|||
|
||||
template(name="archiveBoardPopup")
|
||||
p {{_ 'close-board-pop'}}
|
||||
button.js-confirm.negate.full(type="submit") {{_ 'close'}}
|
||||
button.js-confirm.negate.full(type="submit") {{_ 'archive'}}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ Template.boardChangeTitlePopup.events({
|
|||
|
||||
BlazeComponent.extendComponent({
|
||||
template() {
|
||||
return 'headerBoard';
|
||||
return 'boardHeaderBar';
|
||||
},
|
||||
|
||||
isStarred() {
|
||||
|
|
@ -94,7 +94,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
}];
|
||||
},
|
||||
}).register('headerBoard');
|
||||
}).register('boardHeaderBar');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
template() {
|
||||
|
|
|
|||
|
|
@ -23,3 +23,12 @@ template(name="boardList")
|
|||
p.board-list-item-desc= description
|
||||
li.js-add-board
|
||||
a.board-list-item.label {{_ 'add-board'}}
|
||||
|
||||
|
||||
template(name="boardListHeaderBar")
|
||||
h1 {{_ 'my-boards'}}
|
||||
|
||||
.board-header-btns.right
|
||||
a.board-header-btn.js-open-archived-board
|
||||
i.fa.fa-archive
|
||||
span {{_ 'archives'}}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ template(name="moveCardPopup")
|
|||
|
||||
template(name="cardMembersPopup")
|
||||
ul.pop-over-list.js-card-member-list
|
||||
each board.members
|
||||
each board.activeMembers
|
||||
li.item(class="{{#if isCardMember}}active{{/if}}")
|
||||
a.name.js-select-member(href="#")
|
||||
+userAvatar(userId=user._id)
|
||||
|
|
|
|||
|
|
@ -133,5 +133,6 @@
|
|||
margin: 0
|
||||
padding: 0
|
||||
max-height: 162px
|
||||
min-height: 54px
|
||||
min-height: 36px
|
||||
margin-bottom: 20px
|
||||
overflow-y: auto
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ BlazeComponent.extendComponent({
|
|||
|
||||
// We keep the form opened, empty it, and scroll to it.
|
||||
textarea.val('').focus();
|
||||
autosize.update(textarea);
|
||||
if (position === 'bottom') {
|
||||
this.scrollToBottom();
|
||||
}
|
||||
|
|
@ -180,13 +181,17 @@ BlazeComponent.extendComponent({
|
|||
|
||||
onRendered() {
|
||||
const editor = this;
|
||||
this.$('textarea').escapeableTextComplete([
|
||||
const $textarea = this.$('textarea');
|
||||
|
||||
autosize($textarea);
|
||||
|
||||
$textarea.escapeableTextComplete([
|
||||
// User mentions
|
||||
{
|
||||
match: /\B@(\w*)$/,
|
||||
search(term, callback) {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
callback($.map(currentBoard.members, (member) => {
|
||||
callback($.map(currentBoard.activeMembers(), (member) => {
|
||||
const user = Users.findOne(member.userId);
|
||||
return user.username.indexOf(term) === 0 ? user : null;
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -21,16 +21,11 @@ template(name="listActionPopup")
|
|||
li: a.js-add-card {{_ 'add-card'}}
|
||||
if cards.count
|
||||
li: a.js-select-cards {{_ 'list-select-cards'}}
|
||||
li: a.js-move-cards {{_ 'list-move-cards'}}
|
||||
li: a.js-archive-cards {{_ 'list-archive-cards'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li: a.js-import-card {{_ 'import-card'}}
|
||||
li: a.js-close-list {{_ 'archive-list'}}
|
||||
|
||||
template(name="listMoveCardsPopup")
|
||||
+boardLists
|
||||
|
||||
template(name="boardLists")
|
||||
ul.pop-over-list
|
||||
each currentBoard.lists
|
||||
|
|
@ -39,7 +34,3 @@ template(name="boardLists")
|
|||
a.disabled {{title}} ({{_ 'current'}})
|
||||
else
|
||||
a.js-select-list= title
|
||||
|
||||
template(name="listArchiveCardsPopup")
|
||||
p {{_ 'list-archive-cards-pop'}}
|
||||
input.js-confirm.negate.full(type="submit" value="{{_ 'archive-all'}}")
|
||||
|
|
|
|||
|
|
@ -34,28 +34,9 @@ Template.listActionPopup.events({
|
|||
Popup.close();
|
||||
},
|
||||
'click .js-import-card': Popup.open('listImportCard'),
|
||||
'click .js-move-cards': Popup.open('listMoveCards'),
|
||||
'click .js-archive-cards': Popup.afterConfirm('listArchiveCards', function() {
|
||||
this.allCards().forEach((card) => {
|
||||
card.archive();
|
||||
});
|
||||
Popup.close();
|
||||
}),
|
||||
|
||||
'click .js-close-list'(evt) {
|
||||
evt.preventDefault();
|
||||
this.archive();
|
||||
Popup.close();
|
||||
},
|
||||
});
|
||||
|
||||
Template.listMoveCardsPopup.events({
|
||||
'click .js-select-list'() {
|
||||
const fromList = Template.parentData(2).data;
|
||||
const toList = this._id;
|
||||
fromList.allCards().forEach((card) => {
|
||||
card.move(toList);
|
||||
});
|
||||
Popup.close();
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Template.editor.onRendered(() => {
|
|||
match: /\B@(\w*)$/,
|
||||
search(term, callback) {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
callback(currentBoard.members.map((member) => {
|
||||
callback(currentBoard.activeMembers().map((member) => {
|
||||
const username = Users.findOne(member.userId).username;
|
||||
return username.includes(term) ? username : null;
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -32,10 +32,7 @@ template(name="header")
|
|||
current page. This bar is contextual based.
|
||||
If the user is not connected we display "sign in" and "log in" buttons.
|
||||
#header-main-bar(class="{{#if wrappedHeader}}wrapper{{/if}}")
|
||||
if $.Session.get 'currentBoard'
|
||||
+headerBoard
|
||||
else if($eq currentRouteName 'home')
|
||||
+headerTitle
|
||||
+Template.dynamic(template=headerBar)
|
||||
|
||||
//-
|
||||
On sandstorm, the logo shouldn't be clickable, because we only have one
|
||||
|
|
@ -47,11 +44,3 @@ template(name="header")
|
|||
else
|
||||
a.wekan-logo(href="{{pathFor 'home'}}" title="{{_ 'header-logo-title'}}")
|
||||
img(src="{{pathFor '/wekan-logo-header.png'}}" alt="Wekan")
|
||||
|
||||
template(name="headerTitle")
|
||||
h1 {{_ 'my-boards'}}
|
||||
|
||||
.board-header-btns.right
|
||||
a.board-header-btn.js-open-archived-board
|
||||
i.fa.fa-archive
|
||||
span {{_ 'archives'}}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
Template.header.helpers({
|
||||
// Reactively set the color of the page from the color of the current board.
|
||||
headerTemplate() {
|
||||
return 'headerBoard';
|
||||
},
|
||||
|
||||
wrappedHeader() {
|
||||
return !Session.get('currentBoard');
|
||||
},
|
||||
|
|
|
|||
|
|
@ -85,6 +85,14 @@
|
|||
float: left
|
||||
border-radius: 3px
|
||||
|
||||
a.fa, a i.fa
|
||||
color: white
|
||||
|
||||
.back-btn
|
||||
font-size: 0.9em
|
||||
margin-right: 10px
|
||||
|
||||
|
||||
.wekan-logo
|
||||
display: block
|
||||
margin: 3px auto 0
|
||||
|
|
|
|||
19
client/components/main/keyboardShortcuts.jade
Normal file
19
client/components/main/keyboardShortcuts.jade
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
template(name="shortcutsHeaderBar")
|
||||
h1
|
||||
a.back-btn(href="{{pathFor 'home'}}")
|
||||
i.fa.fa-chevron-left
|
||||
| {{_ 'keyboard-shortcuts'}}
|
||||
|
||||
template(name="shortcutsModalTitle")
|
||||
h2
|
||||
i.fa.fa-keyboard-o
|
||||
| {{_ 'keyboard-shortcuts'}}
|
||||
|
||||
template(name="keyboardShortcuts")
|
||||
.wrapper.shortcuts-list
|
||||
each mapping
|
||||
.shortcuts-list-item
|
||||
.shortcuts-list-item-keys
|
||||
each keys
|
||||
kbd= this
|
||||
.shortcuts-list-item-action {{_ action}}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
.wrapper.shortcuts-list
|
||||
h2
|
||||
i.fa.fa-keyboard-o
|
||||
| {{_ 'keyboard-shortcuts'}}
|
||||
|
||||
each mapping
|
||||
.shortcuts-list-item
|
||||
.shortcuts-list-item-keys
|
||||
each keys
|
||||
kbd= this
|
||||
.shortcuts-list-item-action {{_ action}}
|
||||
|
|
@ -31,6 +31,7 @@ template(name="defaultLayout")
|
|||
.modal-content
|
||||
a.modal-close-btn.js-close-modal
|
||||
i.fa.fa-times-thin
|
||||
+Template.dynamic(template=Modal.getHeaderName)
|
||||
+Template.dynamic(template=Modal.getTemplateName)
|
||||
|
||||
template(name="notFound")
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ body
|
|||
.sk-spinner
|
||||
margin-top: 30vh
|
||||
|
||||
> .wrapper
|
||||
margin-top: 25px
|
||||
|
||||
#modal
|
||||
position: absolute
|
||||
top: 0
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ BlazeComponent.extendComponent({
|
|||
'click .js-select-member'() {
|
||||
const userId = this.currentData()._id;
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
if (currentBoard.memberIndex(userId)<0) {
|
||||
if (!currentBoard.hasMember(userId)) {
|
||||
this.inviteUser(userId);
|
||||
}
|
||||
},
|
||||
|
|
@ -305,16 +305,12 @@ Template.changePermissionsPopup.events({
|
|||
|
||||
Template.changePermissionsPopup.helpers({
|
||||
isAdmin() {
|
||||
const user = Users.findOne(this.userId);
|
||||
return user.isBoardAdmin();
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
return currentBoard.hasAdmin(this.userId);
|
||||
},
|
||||
|
||||
isLastAdmin() {
|
||||
const user = Users.findOne(this.userId);
|
||||
if (!user.isBoardAdmin())
|
||||
return false;
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
const nbAdmins = _.where(currentBoard.members, { isAdmin: true }).length;
|
||||
return nbAdmins === 1;
|
||||
return currentBoard.hasAdmin(this.userId) && (currentBoard.activeAdmins() === 1);
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -18,17 +18,16 @@ template(name="filterSidebar")
|
|||
i.fa.fa-check
|
||||
hr
|
||||
ul.sidebar-list
|
||||
each currentBoard.members
|
||||
if isActive
|
||||
with getUser userId
|
||||
li(class="{{#if Filter.members.isSelected _id}}active{{/if}}")
|
||||
a.name.js-toggle-member-filter
|
||||
+userAvatar(userId=this._id)
|
||||
span.sidebar-list-item-description
|
||||
= profile.fullname
|
||||
| (<span class="username">{{ username }}</span>)
|
||||
if Filter.members.isSelected _id
|
||||
i.fa.fa-check
|
||||
each currentBoard.activeMembers
|
||||
with getUser userId
|
||||
li(class="{{#if Filter.members.isSelected _id}}active{{/if}}")
|
||||
a.name.js-toggle-member-filter
|
||||
+userAvatar(userId=this._id)
|
||||
span.sidebar-list-item-description
|
||||
= profile.fullname
|
||||
| (<span class="username">{{ username }}</span>)
|
||||
if Filter.members.isSelected _id
|
||||
i.fa.fa-check
|
||||
if Filter.isActive
|
||||
hr
|
||||
a.sidebar-btn.js-clear-all
|
||||
|
|
@ -55,20 +54,22 @@ template(name="multiselectionSidebar")
|
|||
i.fa.fa-ellipsis-h
|
||||
hr
|
||||
ul.sidebar-list
|
||||
each currentBoard.members
|
||||
if isActive
|
||||
with getUser userId
|
||||
li(class="{{#if Filter.members.isSelected _id}}active{{/if}}")
|
||||
a.name.js-toggle-member-multiselection
|
||||
+userAvatar(userId=this._id)
|
||||
span.sidebar-list-item-description
|
||||
= profile.fullname
|
||||
| (<span class="username">{{ username }}</span>)
|
||||
if allSelectedElementHave 'member' _id
|
||||
i.fa.fa-check
|
||||
else if someSelectedElementHave 'member' _id
|
||||
i.fa.fa-ellipsis-h
|
||||
each currentBoard.activeMembers
|
||||
with getUser userId
|
||||
li(class="{{#if Filter.members.isSelected _id}}active{{/if}}")
|
||||
a.name.js-toggle-member-multiselection
|
||||
+userAvatar(userId=this._id)
|
||||
span.sidebar-list-item-description
|
||||
= profile.fullname
|
||||
| (<span class="username">{{ username }}</span>)
|
||||
if allSelectedElementHave 'member' _id
|
||||
i.fa.fa-check
|
||||
else if someSelectedElementHave 'member' _id
|
||||
i.fa.fa-ellipsis-h
|
||||
hr
|
||||
a.sidebar-btn.js-move-selection
|
||||
i.fa.fa-share
|
||||
span {{_ 'move-selection'}}
|
||||
a.sidebar-btn.js-archive-selection
|
||||
i.fa.fa-archive
|
||||
span {{_ 'archive-selection'}}
|
||||
|
|
@ -82,3 +83,7 @@ template(name="disambiguateMultiMemberPopup")
|
|||
p {{_ 'what-to-do'}}
|
||||
button.wide.js-unassign-member {{_ 'unassign-member'}}
|
||||
button.wide.js-assign-member {{_ 'assign-member'}}
|
||||
|
||||
template(name="moveSelectionPopup")
|
||||
+boardLists
|
||||
|
||||
|
|
|
|||
|
|
@ -93,8 +93,10 @@ BlazeComponent.extendComponent({
|
|||
return popup.call(this.currentData(), evt);
|
||||
}
|
||||
},
|
||||
'click .js-move-selection': Popup.open('moveSelection'),
|
||||
'click .js-archive-selection'() {
|
||||
mutateSelectedCards('archive');
|
||||
EscapeActions.executeUpTo('multiselection');
|
||||
},
|
||||
}];
|
||||
},
|
||||
|
|
@ -121,3 +123,10 @@ Template.disambiguateMultiMemberPopup.events({
|
|||
Popup.close();
|
||||
},
|
||||
});
|
||||
|
||||
Template.moveSelectionPopup.events({
|
||||
'click .js-select-list'() {
|
||||
mutateSelectedCards('move', this._id);
|
||||
EscapeActions.executeUpTo('multiselection');
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue