mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Fixed Rare bug: All Boards page icons random dance. Commented out All Boards show members, cards counts, and some migrations.
Fixes #4214 Thanks to xet7 !
This commit is contained in:
parent
695cdfcc4e
commit
b75e16f104
5 changed files with 52 additions and 11 deletions
|
|
@ -7,10 +7,22 @@ Template.boardList.helpers({
|
||||||
return Settings.findOne();
|
return Settings.findOne();
|
||||||
},
|
},
|
||||||
hideCardCounterList() {
|
hideCardCounterList() {
|
||||||
return Utils.isMiniScreen() && Session.get('currentBoard');
|
// Fix Rare bug: Board Icons random dance https://github.com/wekan/wekan/issues/4214
|
||||||
|
// by commenting out following line,
|
||||||
|
// where it probably counts too often at realtime,
|
||||||
|
// and makes cards that have card count and member list change size
|
||||||
|
// and order all the time:
|
||||||
|
//return Utils.isMiniScreen() && Session.get('currentBoard');
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
hideBoardMemberList() {
|
hideBoardMemberList() {
|
||||||
return Utils.isMiniScreen() && Session.get('currentBoard');
|
// Fix Rare bug: Board Icons random dance https://github.com/wekan/wekan/issues/4214
|
||||||
|
// by commenting out following line,
|
||||||
|
// where it probably counts too often at realtime,
|
||||||
|
// and makes cards that have card count and member list change size
|
||||||
|
// and order all the time:
|
||||||
|
//return Utils.isMiniScreen() && Session.get('currentBoard');
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -52,7 +64,6 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
onRendered() {
|
onRendered() {
|
||||||
const itemsSelector = '.js-board:not(.placeholder)';
|
const itemsSelector = '.js-board:not(.placeholder)';
|
||||||
|
|
||||||
const $boards = this.$('.js-boards');
|
const $boards = this.$('.js-boards');
|
||||||
$boards.sortable({
|
$boards.sortable({
|
||||||
connectWith: '.js-boards',
|
connectWith: '.js-boards',
|
||||||
|
|
@ -84,8 +95,9 @@ BlazeComponent.extendComponent({
|
||||||
// DOM in its initial state. The card move is then handled reactively by
|
// DOM in its initial state. The card move is then handled reactively by
|
||||||
// Blaze with the below query.
|
// Blaze with the below query.
|
||||||
$boards.sortable('cancel');
|
$boards.sortable('cancel');
|
||||||
|
// Fix Rare bug: Board Icons random dance https://github.com/wekan/wekan/issues/4214
|
||||||
board.move(sortIndex.base);
|
// by commenting out following line:
|
||||||
|
//board.move(sortIndex.base);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -209,23 +221,29 @@ BlazeComponent.extendComponent({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
boardLists(boardId) {
|
boardLists(boardId) {
|
||||||
|
/*
|
||||||
let boardLists = [];
|
let boardLists = [];
|
||||||
const lists = Lists.find({ 'boardId': boardId, 'archived': false },{sort: ['sort','asc']});
|
const lists = Lists.find({ 'boardId': boardId, 'archived': false },{sort: ['sort','asc']});
|
||||||
lists.forEach(list => {
|
lists.forEach(list => {
|
||||||
let cardCount = Cards.find({ 'boardId': boardId, 'listId': list._id }).count()
|
let cardCount = Cards.find({ 'boardId': boardId, 'listId': list._id }).count()
|
||||||
boardLists.push(`${list.title}: ${cardCount}`);
|
boardLists.push(`${list.title}: ${cardCount}`);
|
||||||
});
|
});
|
||||||
return boardLists
|
return boardLists;
|
||||||
|
*/
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
boardMembers(boardId) {
|
boardMembers(boardId) {
|
||||||
|
/*
|
||||||
let boardMembers = [];
|
let boardMembers = [];
|
||||||
const lists = Boards.findOne({ '_id': boardId })
|
const lists = Boards.findOne({ '_id': boardId })
|
||||||
let members = lists.members
|
let members = lists.members
|
||||||
members.forEach(member => {
|
members.forEach(member => {
|
||||||
boardMembers.push(member.userId);
|
boardMembers.push(member.userId);
|
||||||
});
|
});
|
||||||
return boardMembers
|
return boardMembers;
|
||||||
|
*/
|
||||||
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
isStarred() {
|
isStarred() {
|
||||||
|
|
|
||||||
|
|
@ -294,6 +294,14 @@ Boards.attachSchema(
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
background: {
|
||||||
|
/**
|
||||||
|
* The background color of the board.
|
||||||
|
*/
|
||||||
|
type: String,
|
||||||
|
optional: true,
|
||||||
|
defaultValue: '#16A085',
|
||||||
|
},
|
||||||
backgroundImageURL: {
|
backgroundImageURL: {
|
||||||
/**
|
/**
|
||||||
* The background image URL of the board.
|
* The background image URL of the board.
|
||||||
|
|
@ -306,6 +314,7 @@ Boards.attachSchema(
|
||||||
* Show card counter per list
|
* Show card counter per list
|
||||||
*/
|
*/
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
optional: false,
|
||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
allowsBoardMemberList: {
|
allowsBoardMemberList: {
|
||||||
|
|
@ -357,6 +366,7 @@ Boards.attachSchema(
|
||||||
* Does the board allows subtasks?
|
* Does the board allows subtasks?
|
||||||
*/
|
*/
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
optional: false,
|
||||||
defaultValue: true,
|
defaultValue: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -1308,7 +1318,7 @@ Boards.mutations({
|
||||||
},
|
},
|
||||||
|
|
||||||
setVisibility(visibility) {
|
setVisibility(visibility) {
|
||||||
return { $set: { permission: visibility } };
|
return { $set: { permission: visibility.toLowerCase() } };
|
||||||
},
|
},
|
||||||
|
|
||||||
addLabel(name, color) {
|
addLabel(name, color) {
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,12 @@ Settings.attachSchema(
|
||||||
displayAuthenticationMethod: {
|
displayAuthenticationMethod: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
defaultValue: true,
|
||||||
},
|
},
|
||||||
defaultAuthenticationMethod: {
|
defaultAuthenticationMethod: {
|
||||||
type: String,
|
type: String,
|
||||||
optional: false,
|
optional: false,
|
||||||
|
defaultValue: 'password',
|
||||||
},
|
},
|
||||||
spinnerName: {
|
spinnerName: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -63,14 +65,17 @@ Settings.attachSchema(
|
||||||
hideLogo: {
|
hideLogo: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
hideCardCounterList: {
|
hideCardCounterList: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
hideBoardMemberList: {
|
hideBoardMemberList: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
customLoginLogoImageUrl: {
|
customLoginLogoImageUrl: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ Users.attachSchema(
|
||||||
*/
|
*/
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
defaultValue: false,
|
||||||
},
|
},
|
||||||
'profile.hideCheckedItems': {
|
'profile.hideCheckedItems': {
|
||||||
/**
|
/**
|
||||||
|
|
@ -384,6 +385,7 @@ Users.attachSchema(
|
||||||
'board-view-lists',
|
'board-view-lists',
|
||||||
'board-view-cal',
|
'board-view-cal',
|
||||||
],
|
],
|
||||||
|
defaultValue: 'board-view-swimlanes',
|
||||||
},
|
},
|
||||||
'profile.listSortBy': {
|
'profile.listSortBy': {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ const noValidate = {
|
||||||
};
|
};
|
||||||
const noValidateMulti = { ...noValidate, multi: true };
|
const noValidateMulti = { ...noValidate, multi: true };
|
||||||
|
|
||||||
|
/*
|
||||||
Migrations.add('board-background-color', () => {
|
Migrations.add('board-background-color', () => {
|
||||||
const defaultColor = '#16A085';
|
const defaultColor = '#16A085';
|
||||||
Boards.update(
|
Boards.update(
|
||||||
|
|
@ -90,7 +91,6 @@ Migrations.add('add-cardcounterlist-allowed', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
Migrations.add('add-boardmemberlist-allowed', () => {
|
Migrations.add('add-boardmemberlist-allowed', () => {
|
||||||
Boards.update(
|
Boards.update(
|
||||||
{
|
{
|
||||||
|
|
@ -106,7 +106,6 @@ Migrations.add('add-boardmemberlist-allowed', () => {
|
||||||
noValidateMulti,
|
noValidateMulti,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
Migrations.add('lowercase-board-permission', () => {
|
Migrations.add('lowercase-board-permission', () => {
|
||||||
['Public', 'Private'].forEach(permission => {
|
['Public', 'Private'].forEach(permission => {
|
||||||
|
|
@ -118,7 +117,6 @@ Migrations.add('lowercase-board-permission', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
// Security migration: see https://github.com/wekan/wekan/issues/99
|
// Security migration: see https://github.com/wekan/wekan/issues/99
|
||||||
Migrations.add('change-attachments-type-for-non-images', () => {
|
Migrations.add('change-attachments-type-for-non-images', () => {
|
||||||
const newTypeForNonImage = 'application/octet-stream';
|
const newTypeForNonImage = 'application/octet-stream';
|
||||||
|
|
@ -259,6 +257,7 @@ Migrations.add('add-swimlanes', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
Migrations.add('add-views', () => {
|
Migrations.add('add-views', () => {
|
||||||
Boards.find().forEach(board => {
|
Boards.find().forEach(board => {
|
||||||
if (!board.hasOwnProperty('view')) {
|
if (!board.hasOwnProperty('view')) {
|
||||||
|
|
@ -270,6 +269,7 @@ Migrations.add('add-views', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
Migrations.add('add-checklist-items', () => {
|
Migrations.add('add-checklist-items', () => {
|
||||||
Checklists.find().forEach(checklist => {
|
Checklists.find().forEach(checklist => {
|
||||||
|
|
@ -308,6 +308,7 @@ Migrations.add('add-card-types', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
Migrations.add('add-custom-fields-to-cards', () => {
|
Migrations.add('add-custom-fields-to-cards', () => {
|
||||||
Cards.update(
|
Cards.update(
|
||||||
{
|
{
|
||||||
|
|
@ -452,6 +453,7 @@ Migrations.add('add-authenticationMethod', () => {
|
||||||
noValidateMulti,
|
noValidateMulti,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
Migrations.add('remove-tag', () => {
|
Migrations.add('remove-tag', () => {
|
||||||
Users.update(
|
Users.update(
|
||||||
|
|
@ -477,6 +479,7 @@ Migrations.add('remove-customFields-references-broken', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
Migrations.add('add-product-name', () => {
|
Migrations.add('add-product-name', () => {
|
||||||
Settings.update(
|
Settings.update(
|
||||||
{
|
{
|
||||||
|
|
@ -572,6 +575,7 @@ Migrations.add('add-defaultAuthenticationMethod', () => {
|
||||||
noValidateMulti,
|
noValidateMulti,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
Migrations.add('add-templates', () => {
|
Migrations.add('add-templates', () => {
|
||||||
Boards.update(
|
Boards.update(
|
||||||
|
|
@ -817,6 +821,7 @@ Migrations.add('fix-incorrect-dates', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
Migrations.add('add-assignee', () => {
|
Migrations.add('add-assignee', () => {
|
||||||
Cards.update(
|
Cards.update(
|
||||||
{
|
{
|
||||||
|
|
@ -1120,6 +1125,7 @@ Migrations.add('add-description-text-allowed-on-minicard', () => {
|
||||||
noValidateMulti,
|
noValidateMulti,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
Migrations.add('add-sort-field-to-boards', () => {
|
Migrations.add('add-sort-field-to-boards', () => {
|
||||||
Boards.find().forEach((board, index) => {
|
Boards.find().forEach((board, index) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue