mirror of
https://github.com/wekan/wekan.git
synced 2026-01-29 12:46:09 +01:00
Merge branch 'master' of https://github.com/wekan/wekan
This commit is contained in:
commit
52e45211a2
37 changed files with 7053 additions and 134 deletions
|
|
@ -25,6 +25,9 @@ template(name="cardDetails")
|
|||
h2.card-details-title.js-card-title(
|
||||
class="{{#if canModifyCard}}js-open-inlined-form is-editable{{/if}}")
|
||||
+viewer
|
||||
if currentBoard.allowsCardNumber
|
||||
span.card-number
|
||||
| ##{getCardNumber}
|
||||
= getTitle
|
||||
if isWatching
|
||||
i.card-details-watch.fa.fa-eye
|
||||
|
|
|
|||
|
|
@ -114,6 +114,12 @@ avatar-radius = 50%
|
|||
background: darken(white, 7%)
|
||||
border-bottom: 1px solid darken(white, 14%)
|
||||
|
||||
.card-number {
|
||||
color: darken(white, 30%);
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.close-card-details,
|
||||
.maximize-card-details,
|
||||
.minimize-card-details,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ template(name="minicard")
|
|||
if getArchived
|
||||
span.linked-icon.linked-archived.fa.fa-archive
|
||||
+viewer
|
||||
if currentBoard.allowsCardNumber
|
||||
span.card-number
|
||||
| ##{getCardNumber}
|
||||
= getTitle
|
||||
if $eq 'subtext-with-full-path' currentBoard.presentParentTask
|
||||
.parent-subtext
|
||||
|
|
|
|||
|
|
@ -114,6 +114,10 @@
|
|||
font-size:20px;
|
||||
color: #ccc;
|
||||
.minicard-title
|
||||
.card-number
|
||||
color: darken(white, 30%);
|
||||
display: inline-block;
|
||||
margin-right: 5px;
|
||||
p:last-child
|
||||
margin-bottom: 0
|
||||
.viewer
|
||||
|
|
|
|||
|
|
@ -81,7 +81,9 @@ BlazeComponent.extendComponent({
|
|||
Utils.boardView() === 'board-view-cal' ||
|
||||
!Utils.boardView()
|
||||
)
|
||||
swimlaneId = board.getDefaultSwimline()._id;
|
||||
swimlaneId = board.getDefaultSwimline()._id;
|
||||
|
||||
const nextCardNumber = board.getNextCardNumber();
|
||||
|
||||
const _id = Cards.insert({
|
||||
title,
|
||||
|
|
@ -93,6 +95,7 @@ BlazeComponent.extendComponent({
|
|||
sort: sortIndex,
|
||||
swimlaneId,
|
||||
type: cardType,
|
||||
cardNumber: nextCardNumber,
|
||||
linkedId,
|
||||
});
|
||||
|
||||
|
|
@ -241,7 +244,7 @@ BlazeComponent.extendComponent({
|
|||
Boards.findOne(currentBoardId)
|
||||
.customFields()
|
||||
.fetch(),
|
||||
function(field) {
|
||||
function (field) {
|
||||
if (field.automaticallyOnCard || field.alwaysOnCard)
|
||||
arr.push({ _id: field._id, value: null });
|
||||
},
|
||||
|
|
@ -750,17 +753,17 @@ BlazeComponent.extendComponent({
|
|||
|
||||
checkIdleTime() {
|
||||
return window.requestIdleCallback ||
|
||||
function(handler) {
|
||||
const startTime = Date.now();
|
||||
return setTimeout(function() {
|
||||
handler({
|
||||
didTimeout: false,
|
||||
timeRemaining() {
|
||||
return Math.max(0, 50.0 - (Date.now() - startTime));
|
||||
},
|
||||
});
|
||||
}, 1);
|
||||
};
|
||||
function (handler) {
|
||||
const startTime = Date.now();
|
||||
return setTimeout(function () {
|
||||
handler({
|
||||
didTimeout: false,
|
||||
timeRemaining() {
|
||||
return Math.max(0, 50.0 - (Date.now() - startTime));
|
||||
},
|
||||
});
|
||||
}, 1);
|
||||
};
|
||||
}
|
||||
|
||||
updateList() {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
const specialHandles = [
|
||||
{userId: 'board_members', username: 'board_members'},
|
||||
{userId: 'card_members', username: 'card_members'}
|
||||
];
|
||||
const specialHandleNames = specialHandles.map(m => m.username);
|
||||
|
||||
Template.editor.onRendered(() => {
|
||||
const textareaSelector = 'textarea';
|
||||
const mentions = [
|
||||
|
|
@ -7,13 +13,14 @@ Template.editor.onRendered(() => {
|
|||
search(term, callback) {
|
||||
const currentBoard = Boards.findOne(Session.get('currentBoard'));
|
||||
callback(
|
||||
_.union(
|
||||
currentBoard
|
||||
.activeMembers()
|
||||
.map(member => {
|
||||
const username = Users.findOne(member.userId).username;
|
||||
return username.includes(term) ? username : null;
|
||||
})
|
||||
.filter(Boolean),
|
||||
.filter(Boolean), [...specialHandleNames])
|
||||
);
|
||||
},
|
||||
template(value) {
|
||||
|
|
@ -323,13 +330,13 @@ Blaze.Template.registerHelper(
|
|||
return HTML.Raw(
|
||||
DOMPurify.sanitize(content, { ALLOW_UNKNOWN_PROTOCOLS: true }),
|
||||
);
|
||||
const knowedUsers = currentBoard.members.map(member => {
|
||||
const knowedUsers = _.union(currentBoard.members.map(member => {
|
||||
const u = Users.findOne(member.userId);
|
||||
if (u) {
|
||||
member.username = u.username;
|
||||
}
|
||||
return member;
|
||||
});
|
||||
}), [...specialHandles]);
|
||||
const mentionRegex = /\B@([\w.]*)/gi;
|
||||
|
||||
let currentMention;
|
||||
|
|
|
|||
|
|
@ -317,6 +317,9 @@ kbd
|
|||
.grabbing
|
||||
cursor: grabbing
|
||||
|
||||
.textcomplete-dropdown
|
||||
z-index: 2000 !important;
|
||||
|
||||
// Implement a thiner close icon as suggested in
|
||||
// https://github.com/FortAwesome/Font-Awesome/issues/1540#issuecomment-68689950
|
||||
.fa.fa-times-thin:before
|
||||
|
|
|
|||
|
|
@ -189,6 +189,13 @@ template(name="boardCardSettingsPopup")
|
|||
span
|
||||
i.fa.fa-tags
|
||||
| {{_ 'labels'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-card-number(class="{{#if allowsCardNumber}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsCardNumber}}is-checked{{/if}}")
|
||||
span
|
||||
i.fa.fa-hashtag
|
||||
| {{_ 'card'}}
|
||||
| {{_ 'number'}}
|
||||
div.check-div
|
||||
a.flex.js-field-has-description-title(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
|
||||
.materialCheckBox(class="{{#if allowsDescriptionTitle}}is-checked{{/if}}")
|
||||
|
|
|
|||
|
|
@ -776,6 +776,10 @@ BlazeComponent.extendComponent({
|
|||
return this.currentBoard.allowsComments;
|
||||
},
|
||||
|
||||
allowsCardNumber() {
|
||||
return this.currentBoard.allowsCardNumber;
|
||||
},
|
||||
|
||||
allowsDescriptionTitle() {
|
||||
return this.currentBoard.allowsDescriptionTitle;
|
||||
},
|
||||
|
|
@ -1019,6 +1023,22 @@ BlazeComponent.extendComponent({
|
|||
this.currentBoard.allowsDescriptionTitle,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-card-number'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsCardNumber = !this.currentBoard
|
||||
.allowsCardNumber;
|
||||
this.currentBoard.setAllowsCardNumber(
|
||||
this.currentBoard.allowsCardNumber,
|
||||
);
|
||||
$(`.js-field-has-card-number ${MCB}`).toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsCardNumber,
|
||||
);
|
||||
$('.js-field-has-card-number').toggleClass(
|
||||
CKCLS,
|
||||
this.currentBoard.allowsCardNumber,
|
||||
);
|
||||
},
|
||||
'click .js-field-has-description-text'(evt) {
|
||||
evt.preventDefault();
|
||||
this.currentBoard.allowsDescriptionText = !this.currentBoard
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue