mirror of
https://github.com/wekan/wekan.git
synced 2026-01-20 16:26:09 +01:00
Merge branch 'master' of https://github.com/wekan/wekan into search
This commit is contained in:
commit
bb7490a32b
72 changed files with 68434 additions and 59526 deletions
|
|
@ -360,7 +360,7 @@ BlazeComponent.extendComponent({
|
|||
end: end || card.endAt,
|
||||
allDay:
|
||||
Math.abs(end.getTime() - start.getTime()) / 1000 === 24 * 3600,
|
||||
url: FlowRouter.url('card', {
|
||||
url: FlowRouter.path('card', {
|
||||
boardId: currentBoard._id,
|
||||
slug: currentBoard.slug,
|
||||
cardId: card._id,
|
||||
|
|
|
|||
|
|
@ -34,9 +34,12 @@ template(name="boardHeaderBar")
|
|||
if $eq watchLevel "muted"
|
||||
i.fa.fa-bell-slash
|
||||
span {{_ watchLevel}}
|
||||
a.board-header-btn.js-sort-cards(title="{{_ 'sort-cards'}}")
|
||||
a.board-header-btn(title="{{_ 'sort-cards'}}" class="{{#if isSortActive }}emphasis{{else}} js-sort-cards {{/if}}")
|
||||
i.fa.fa-sort
|
||||
| {{_ 'sort-cards'}} {{sortCardsBy.get}}
|
||||
span {{#if isSortActive }}{{_ 'Sort is on'}}{{else}}{{_ 'sort-cards'}}{{/if}}
|
||||
if isSortActive
|
||||
a.board-header-btn-close.js-sort-reset(title="Remove Sort")
|
||||
i.fa.fa-times-thin
|
||||
|
||||
else
|
||||
a.board-header-btn.js-log-in(
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ Template.boardChangeTitlePopup.events({
|
|||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated(){
|
||||
// set sort to default
|
||||
Session.set('sortBy','')
|
||||
},
|
||||
watchLevel() {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
return currentBoard && currentBoard.getWatchLevel(Meteor.userId());
|
||||
|
|
@ -129,6 +133,9 @@ BlazeComponent.extendComponent({
|
|||
Sidebar.setView();
|
||||
Filter.reset();
|
||||
},
|
||||
'click .js-sort-reset'() {
|
||||
Session.set('sortBy','')
|
||||
},
|
||||
'click .js-open-search-view'() {
|
||||
Sidebar.setView('search');
|
||||
},
|
||||
|
|
@ -162,6 +169,9 @@ Template.boardHeaderBar.helpers({
|
|||
boardView() {
|
||||
return Utils.boardView();
|
||||
},
|
||||
isSortActive(){
|
||||
return Session.get('sortBy') ? true : false;
|
||||
}
|
||||
});
|
||||
|
||||
Template.boardChangeViewPopup.events({
|
||||
|
|
@ -406,15 +416,7 @@ BlazeComponent.extendComponent({
|
|||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('date-created-oldest-first'));
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-sort-default'() {
|
||||
const sortBy = {
|
||||
sort: 1,
|
||||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('default'));
|
||||
Popup.close();
|
||||
},
|
||||
}
|
||||
},
|
||||
];
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ template(name="cardDetails")
|
|||
a.fa.fa-link.card-copy-button.js-copy-link(
|
||||
class="fa-link"
|
||||
title="{{_ 'copy-card-link-to-clipboard'}}"
|
||||
value="{{ originRelativeUrl }}"
|
||||
)
|
||||
if isMiniScreen
|
||||
a.fa.fa-times-thin.close-card-details-mobile-web.js-close-card-details
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ BlazeComponent.extendComponent({
|
|||
if (card) {
|
||||
const board = Boards.findOne(card.boardId);
|
||||
if (board) {
|
||||
result = FlowRouter.url('card', {
|
||||
result = FlowRouter.path('card', {
|
||||
boardId: card.boardId,
|
||||
slug: board.slug,
|
||||
cardId: card._id,
|
||||
|
|
@ -291,6 +291,8 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
'click .js-copy-link'() {
|
||||
StringToCopyElement = document.getElementById('cardURL_copy');
|
||||
StringToCopyElement.value =
|
||||
window.location.origin + window.location.pathname;
|
||||
StringToCopyElement.select();
|
||||
if (document.execCommand('copy')) {
|
||||
StringToCopyElement.blur();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue