Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Sam X. Chen 2019-08-29 22:08:41 -04:00
commit 58155288fb
100 changed files with 6452 additions and 539 deletions

View file

@ -85,7 +85,7 @@ BlazeComponent.extendComponent({
const lastLabel = Boards.findOne(Session.get('currentBoard')).getLabelById(
lastLabelId,
);
if (lastLabel.name === undefined || lastLabel.name === '') {
if (lastLabel && (lastLabel.name === undefined || lastLabel.name === '')) {
return lastLabel.color;
} else {
return lastLabel.name;

View file

@ -326,6 +326,7 @@ BlazeComponent.extendComponent({
slug: currentBoard.slug,
cardId: card._id,
}),
className: card.color ? `calendar-event-${card.color}` : null,
});
});
callback(events);

View file

@ -53,3 +53,81 @@ position()
padding: 0 0px 0px 0
overflow-x: hidden
overflow-y: auto
calendar-event-color(background, borderColor, color...)
background: background !important
border-color: borderColor
if color
color: color !important //overwrite text for better visibility
.calendar-event-green
calendar-event-color(#3cb500, #2a8000, #ffffff) //White text for better visibility
.calendar-event-yellow
calendar-event-color(#fad900, #c7ac00, #000) //Black text for better visibility
.calendar-event-orange
calendar-event-color(#ff9f19, #cc7c14, #000) //Black text for better visibility
.calendar-event-red
calendar-event-color(#eb4646, #b83737, #ffffff) //White text for better visibility
.calendar-event-purple
calendar-event-color(#a632db, #7d26a6, #ffffff) //White text for better visibility
.calendar-event-blue
calendar-event-color(#0079bf, #005a8a, #ffffff) //White text for better visibility
.calendar-event-pink
calendar-event-color(#ff78cb, #cc62a3, #000) //Black text for better visibility
.calendar-event-sky
calendar-event-color(#00c2e0, #0094ab, #ffffff) //White text for better visibility
.calendar-event-black
calendar-event-color(#4d4d4d, #1a1a1a, #ffffff) //White text for better visibility
.calendar-event-lime
calendar-event-color(#51e898, #3eb375, #000) //Black text for better visibility
.calendar-event-silver
calendar-event-color(#c0c0c0, #8c8c8c, #000) //Black text for better visibility
.calendar-event-peachpuff
calendar-event-color(#ffdab9, #ccaf95, #000) //Black text for better visibility
.calendar-event-crimson
calendar-event-color(#dc143c, #a8112f, #ffffff) //White text for better visibility
.calendar-event-plum
calendar-event-color(#dda0dd, #a87ba8, #000) //Black text for better visibility
.calendar-event-darkgreen
calendar-event-color(#006400, #003000, #ffffff) //White text for better visibility
.calendar-event-slateblue
calendar-event-color(#6a5acd, #4f4399, #ffffff) //White text for better visibility
.calendar-event-magenta
calendar-event-color(#ff00ff, #cc00cc, #ffffff) //White text for better visibility
.calendar-event-gold
calendar-event-color(#ffd700, #ccaa00, #000) //Black text for better visibility
.calendar-event-navy
calendar-event-color(#000080, #000033, #ffffff) //White text for better visibility
.calendar-event-gray
calendar-event-color(#808080, #333333, #ffffff) //White text for better visibility
.calendar-event-saddlebrown
calendar-event-color(#8b4513, #572b0c, #ffffff) //White text for better visibility
.calendar-event-paleturquoise
calendar-event-color(#afeeee, #8ababa, #000) //Black text for better visibility
.calendar-event-mistyrose
calendar-event-color(#ffe4e1, #ccb8b6, #000) //Black text for better visibility
.calendar-event-indigo
calendar-event-color(#4b0082, #2b004d, #ffffff) //White text for better visibility

View file

@ -241,6 +241,7 @@ setBoardColor(color)
background-color #ffffff !important
padding 15px !important
border 1px solid #000000 !important
word-wrap: break-word
// When card has comment, emphasis on minicard:
// bigger red comment icon and number of comments,

View file

@ -99,7 +99,9 @@
&.card-details-item-end,
&.card-details-item-customfield,
&.card-details-item-name
max-width: 50%
display: block
word-wrap: break-word
max-width: 48%
flex-grow: 1
.card-details-item-title

View file

@ -128,6 +128,9 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
& .viewer
p
margin-bottom: 2px
display: block
word-wrap: break-word
max-width: 420px
.js-delete-checklist-item
margin: 0 0 0.5em 1.33em

View file

@ -10,9 +10,10 @@
margin-right: 4px
margin-bottom: 5px
padding: 3px 8px
max-width: 100%
max-width: 210px
min-width: 8px
overflow: ellipsis
word-wrap: break-word
height: 18px
vertical-align: bottom

View file

@ -81,6 +81,7 @@
.minicard-labels
float: right
display: flex
flex-wrap: wrap
.minicard-label
width: 11px
@ -92,8 +93,11 @@
.minicard-custom-field
display:flex;
.minicard-custom-field-item
max-width:50%;
flex-grow:1;
flex-grow: 1
display: block
word-wrap: break-word
max-width: 100px
margin-right: 4px
.handle
width: 20px;
height: 20px;
@ -111,7 +115,9 @@
p:last-child
margin-bottom: 0
.viewer
display: inline-block
display: block
word-wrap: break-word
max-width: 230px
.dates
display: flex;
flex-direction: row;

View file

@ -211,22 +211,20 @@ BlazeComponent.extendComponent({
this.parentComponent().nextStep();
},
onMapMember(evt) {
const memberToMap = this.currentData();
if (memberToMap.wekan) {
// todo xxx ask for confirmation?
this.unmapMember(memberToMap.id);
} else {
this.setSelectedMember(memberToMap.id);
Popup.open('importMapMembersAdd')(evt);
}
},
events() {
return [
{
submit: this.onSubmit,
'click .js-select-member': this.onMapMember,
'click .js-select-member'(evt) {
const memberToMap = this.currentData();
if (memberToMap.wekan) {
// todo xxx ask for confirmation?
this.unmapMember(memberToMap.id);
} else {
this.setSelectedMember(memberToMap.id);
Popup.open('importMapMembersAdd')(evt);
}
},
},
];
},

View file

@ -701,12 +701,31 @@ BlazeComponent.extendComponent({
this.listId = this.parentComponent().data()._id;
this.swimlaneId = '';
const boardView = (Meteor.user().profile || {}).boardView;
if (boardView === 'board-view-swimlanes')
this.swimlaneId = this.parentComponent()
.parentComponent()
.parentComponent()
.data()._id;
const isSandstorm =
Meteor.settings &&
Meteor.settings.public &&
Meteor.settings.public.sandstorm;
if (isSandstorm) {
const user = Meteor.user();
if (user) {
const boardView = (Meteor.user().profile || {}).boardView;
if (boardView === 'board-view-swimlanes') {
this.swimlaneId = this.parentComponent()
.parentComponent()
.parentComponent()
.data()._id;
}
}
} else {
const boardView = (Meteor.user().profile || {}).boardView;
if (boardView === 'board-view-swimlanes') {
this.swimlaneId = this.parentComponent()
.parentComponent()
.parentComponent()
.data()._id;
}
}
},
onRendered() {

View file

@ -378,6 +378,8 @@ a
.viewer
min-height: 18px
display: block
word-wrap: break-word
ol
list-style-type: decimal

View file

@ -1,3 +1,4 @@
archivedRequested = false;
const subManager = new SubsManager();
BlazeComponent.extendComponent({
@ -12,6 +13,7 @@ BlazeComponent.extendComponent({
const currentBoardId = Session.get('currentBoard');
if (!currentBoardId) return;
const handle = subManager.subscribe('board', currentBoardId, true);
archivedRequested = true;
Tracker.nonreactive(() => {
Tracker.autorun(() => {
this.isArchiveReady.set(handle.ready());

View file

@ -56,6 +56,22 @@ template(name="filterSidebar")
if Filter.customFields.isSelected _id
i.fa.fa-check
hr
ul.sidebar-list
li(class="{{#if Filter.archive.isSelected _id}}active{{/if}}")
a.name.js-toggle-archive-filter
span.sidebar-list-item-description
| {{_ 'filter-show-archive'}}
if Filter.archive.isSelected _id
i.fa.fa-check
hr
ul.sidebar-list
li(class="{{#if Filter.hideEmpty.isSelected _id}}active{{/if}}")
a.name.js-toggle-hideEmpty-filter
span.sidebar-list-item-description
| {{_ 'filter-hide-empty'}}
if Filter.hideEmpty.isSelected _id
i.fa.fa-check
hr
span {{_ 'advanced-filter-label'}}
input.js-field-advanced-filter(type="text")
span {{_ 'advanced-filter-description'}}

View file

@ -1,3 +1,5 @@
const subManager = new SubsManager();
BlazeComponent.extendComponent({
events() {
return [
@ -12,6 +14,23 @@ BlazeComponent.extendComponent({
Filter.members.toggle(this.currentData()._id);
Filter.resetExceptions();
},
'click .js-toggle-archive-filter'(evt) {
evt.preventDefault();
Filter.archive.toggle(this.currentData()._id);
Filter.resetExceptions();
const currentBoardId = Session.get('currentBoard');
if (!currentBoardId) return;
subManager.subscribe(
'board',
currentBoardId,
Filter.archive.isSelected(),
);
},
'click .js-toggle-hideEmpty-filter'(evt) {
evt.preventDefault();
Filter.hideEmpty.toggle(this.currentData()._id);
Filter.resetExceptions();
},
'click .js-toggle-custom-fields-filter'(evt) {
evt.preventDefault();
Filter.customFields.toggle(this.currentData()._id);

View file

@ -33,7 +33,8 @@ template(name="listsGroup")
+addListForm
else
each lists
+list(this)
if visible this
+list(this)
if currentCardIsInThisList _id null
+cardDetails(currentCard)
if currentUser.isBoardMember

View file

@ -246,6 +246,24 @@ BlazeComponent.extendComponent({
currentCardIsInThisList(listId, swimlaneId) {
return currentCardIsInThisList(listId, swimlaneId);
},
visible(list) {
if (list.archived) {
// Show archived list only when filter archive is on or archive is selected
if (!(Filter.archive.isSelected() || archivedRequested)) {
return false;
}
}
if (Filter.hideEmpty.isSelected()) {
const swimlaneId = this.parentComponent()
.parentComponent()
.data()._id;
const cards = list.cards(swimlaneId);
if (cards.count() === 0) {
return false;
}
}
return true;
},
onRendered() {
const boardComponent = this.parentComponent();
const $listsDom = this.$('.js-lists');