Merge branch 'master' of https://github.com/wekan/wekan into search

This commit is contained in:
John R. Supplee 2021-03-27 23:10:53 +02:00
commit 103cfb936d
87 changed files with 24615 additions and 839 deletions

View file

@ -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,

View file

@ -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(

View file

@ -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({
@ -407,14 +417,6 @@ BlazeComponent.extendComponent({
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();
},
},
];
},

View file

@ -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

View file

@ -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();

View file

@ -77,8 +77,6 @@ Template.userFormsLayout.helpers({
} else if (lang.name === 'ar-EG') {
// ar-EG = Arabic (Egypt), simply Masri (مَصرى, [ˈmɑsˤɾi], Egyptian, Masr refers to Cairo)
name = 'مَصرى';
} else if (lang.name === 'es-PY') {
name = 'Español de Paraguayo';
} else if (lang.name === 'fa-IR') {
// fa-IR = Persian (Iran)
name = 'فارسی/پارسی (ایران‎)';
@ -94,6 +92,14 @@ Template.userFormsLayout.helpers({
name = 'Latviešu';
} else if (lang.name === 'Español') {
name = 'español';
} else if (lang.name === 'es_419') {
name = 'español de América Latina';
} else if (lang.name === 'es-419') {
name = 'español de América Latina';
} else if (lang.name === 'Español de América Latina') {
name = 'español de América Latina';
} else if (lang.name === 'es-LA') {
name = 'español de América Latina';
} else if (lang.name === 'Español de Argentina') {
name = 'español de Argentina';
} else if (lang.name === 'Español de Chile') {
@ -104,6 +110,8 @@ Template.userFormsLayout.helpers({
name = 'español de México';
} else if (lang.name === 'es-PY') {
name = 'español de Paraguayo';
} else if (lang.name === 'Español de Paraguayo') {
name = 'español de Paraguayo';
} else if (lang.name === 'Español de Perú') {
name = 'español de Perú';
} else if (lang.name === 'Español de Puerto Rico') {

View file

@ -117,17 +117,17 @@ template(name="peopleGeneral")
template(name="newOrgRow")
a.new-org
i.fa.fa-edit
i.fa.fa-plus-square
| {{_ 'new'}}
template(name="newTeamRow")
a.new-team
i.fa.fa-edit
i.fa.fa-plus-square
| {{_ 'new'}}
template(name="newUserRow")
a.new-user
i.fa.fa-edit
i.fa.fa-plus-square
| {{_ 'new'}}
template(name="orgRow")

View file

@ -122,6 +122,8 @@ template(name='email')
template(name='accountSettings')
ul#account-setting.setting-detail
li
button.js-all-hide-system-messages.primary {{_ 'hide-system-messages-of-all-users'}}
li.accounts-form
.title {{_ 'accounts-allowEmailChange'}}
.form-group.flex
@ -129,23 +131,18 @@ template(name='accountSettings')
span {{_ 'yes'}}
input.wekan-form-control#accounts-allowEmailChange(type="radio" name="allowEmailChange" value="false" checked="{{#unless allowEmailChange}}checked{{/unless}}")
span {{_ 'no'}}
li
li.accounts-form
.title {{_ 'accounts-allowUserNameChange'}}
.form-group.flex
input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="true" checked="{{#if allowUserNameChange}}checked{{/if}}")
span {{_ 'yes'}}
input.wekan-form-control#accounts-allowUserNameChange(type="radio" name="allowUserNameChange" value="false" checked="{{#unless allowUserNameChange}}checked{{/unless}}")
span {{_ 'no'}}
li
li.accounts-form
.title {{_ 'accounts-allowUserDelete'}}
.form-group.flex
input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="true" checked="{{#if allowUserDelete}}checked{{/if}}")
span {{_ 'yes'}}
input.wekan-form-control#accounts-allowUserDelete(type="radio" name="allowUserDelete" value="false" checked="{{#unless allowUserDelete}}checked{{/unless}}")
span {{_ 'no'}}
li
button.js-accounts-save.primary {{_ 'save'}}
template(name='announcementSettings')

View file

@ -274,7 +274,6 @@ BlazeComponent.extendComponent({
$set: { booleanValue: allowUserDelete },
});
},
allowEmailChange() {
return AccountSettings.findOne('accounts-allowEmailChange').booleanValue;
},
@ -284,12 +283,31 @@ BlazeComponent.extendComponent({
allowUserDelete() {
return AccountSettings.findOne('accounts-allowUserDelete').booleanValue;
},
allHideSystemMessages() {
Meteor.call('setAllUsersHideSystemMessages', (err, ret) => {
if (!err && ret) {
if (ret === true) {
const message = `${TAPi18n.__(
'now-system-messages-of-all-users-are-hidden',
)}`;
alert(message);
}
} else {
const reason = err.reason || '';
const message = `${TAPi18n.__(err.error)}\n${reason}`;
alert(message);
}
});
},
events() {
return [
{
'click button.js-accounts-save': this.saveAccountsChange,
},
{
'click button.js-all-hide-system-messages': this.allHideSystemMessages,
},
];
},
}).register('accountSettings');

View file

@ -171,8 +171,6 @@ Template.changeLanguagePopup.helpers({
} else if (lang.name === 'ar-EG') {
// ar-EG = Arabic (Egypt), simply Masri (مَصرى, [ˈmɑsˤɾi], Egyptian, Masr refers to Cairo)
name = 'مَصرى';
} else if (lang.name === 'es-PY') {
name = 'Español de Paraguayo';
} else if (lang.name === 'fa-IR') {
// fa-IR = Persian (Iran)
name = 'فارسی/پارسی (ایران‎)';
@ -188,6 +186,14 @@ Template.changeLanguagePopup.helpers({
name = 'Latviešu';
} else if (lang.name === 'Español') {
name = 'español';
} else if (lang.name === 'es_419') {
name = 'español de América Latina';
} else if (lang.name === 'es-419') {
name = 'español de América Latina';
} else if (lang.name === 'Español de América Latina') {
name = 'español de América Latina';
} else if (lang.name === 'es-LA') {
name = 'español de América Latina';
} else if (lang.name === 'Español de Argentina') {
name = 'español de Argentina';
} else if (lang.name === 'Español de Chile') {
@ -198,6 +204,8 @@ Template.changeLanguagePopup.helpers({
name = 'español de México';
} else if (lang.name === 'es-PY') {
name = 'español de Paraguayo';
} else if (lang.name === 'Español de Paraguayo') {
name = 'español de Paraguayo';
} else if (lang.name === 'Español de Perú') {
name = 'español de Perú';
} else if (lang.name === 'Español de Puerto Rico') {