Temporarily revert collapse per user that did not work yet.

Thanks to xet7 !

Related #5388
This commit is contained in:
Lauri Ojansivu 2024-05-04 22:57:13 +03:00
parent ed801f7082
commit 4156b6f932
5 changed files with 42 additions and 86 deletions

View file

@ -6,15 +6,15 @@ template(name="listHeader")
+editListTitleForm
else
unless isMiniScreen
if listCollapsed
a.js-collapse-list(title="{{_ 'uncollapse'}}")
if collapsed
a.js-collapse(title="{{_ 'uncollapse'}}")
i.fa.fa-arrow-left.list-header-uncollapse-left
i.fa.fa-arrow-right.list-header-uncollapse-right
if isMiniScreen
if currentList
a.list-header-left-icon.fa.fa-angle-left.js-unselect-list
unless isMiniScreen
if listCollapsed
if collapsed
if showCardsCountForList cards.length
br
span.cardCount {{cardsCount}}
@ -29,7 +29,7 @@ template(name="listHeader")
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
|/#{wipLimit.value})
unless isMiniScreen
div(class="{{#if listCollapsed}}list-rotated{{/if}}")
div(class="{{#if collapsed}}list-rotated{{/if}}")
h2.list-header-name(
title="{{ moment modifiedAt 'LLL' }}"
class="{{#if currentUser.isBoardMember}}{{#unless currentUser.isCommentOnly}}{{#unless currentUser.isWorker}}js-open-inlined-form is-editable{{/unless}}{{/unless}}{{/if}}")
@ -39,7 +39,7 @@ template(name="listHeader")
| (
span(class="{{#if exceededWipLimit}}highlight{{/if}}") {{cards.length}}
|/#{wipLimit.value})
unless listCollapsed
unless collapsed
if showCardsCountForList cards.length
span.cardCount {{cardsCount}} {{cardsCountForListIsOne cards.length}}
if isMiniScreen
@ -57,14 +57,14 @@ template(name="listHeader")
else if currentUser.isBoardMember
if isWatching
i.list-header-watch-icon.fa.fa-eye
unless listCollapsed
unless collapsed
div.list-header-menu
unless currentUser.isCommentOnly
//if isBoardAdmin
// a.fa.js-list-star.list-header-plus-top(class="fa-star{{#unless starred}}-o{{/unless}}")
if canSeeAddCard
a.js-add-card.fa.fa-plus.list-header-plus-top(title="{{_ 'add-card-to-top-of-list'}}")
a.js-collapse-list(title="{{_ 'collapse'}}")
a.js-collapse(title="{{_ 'collapse'}}")
i.fa.fa-arrow-right.list-header-collapse-right
i.fa.fa-arrow-left.list-header-collapse-left
a.fa.fa-navicon.js-open-list-menu(title="{{_ 'listActionPopup-title'}}")

View file

@ -31,18 +31,14 @@ BlazeComponent.extendComponent({
return !status;
}
},
listCollapsed(check = undefined) {
const list = this.currentData()._id;
console.log(list);
const status = Meteor.call('hasCollapsedList', list);
console.log(status);
collapsed(check = undefined) {
const list = Template.currentData();
const status = list.isCollapsed();
if (check === undefined) {
// just check
return status;
} else {
console.log('toggleCollapseList');
//user.toggleCollapseList(this._id);
Meteor.call('toggleCollapseList', list);
list.collapse(!status);
return !status;
}
},
@ -119,9 +115,9 @@ BlazeComponent.extendComponent({
event.preventDefault();
this.starred(!this.starred());
},
'click .js-collapse-list'(event) {
'click .js-collapse'(event) {
event.preventDefault();
this.listCollapsed(!this.listCollapsed());
this.collapsed(!this.collapsed());
},
'click .js-open-list-menu': Popup.open('listAction'),
'click .js-add-card.list-header-plus-top'(event) {