diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-10-29 19:05:44 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-10-29 19:05:44 +0200 |
commit | 7d6d3af54a2fc1fb68634725eb754b22f02fd430 (patch) | |
tree | 8703d32a5489dfce95e026bc535d6459c1743784 /client/components/lists/listHeader.js | |
parent | 13a2bd6380ced34a828b9469e48786ed21fcb380 (diff) | |
download | wekan-7d6d3af54a2fc1fb68634725eb754b22f02fd430.tar.gz wekan-7d6d3af54a2fc1fb68634725eb754b22f02fd430.tar.bz2 wekan-7d6d3af54a2fc1fb68634725eb754b22f02fd430.zip |
Add Features: allowing lists to be sorted by modifiedAt when not in draggable mode.
Bug Fix #2093: the broken should be prior to file attachment feature introduced, and tested export board is working.
Thanks to whowillcare !
( xet7 merged this pull request manually from https://github.com/wekan/wekan/pull/2756 )
Closes #2093
Diffstat (limited to 'client/components/lists/listHeader.js')
-rw-r--r-- | client/components/lists/listHeader.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/client/components/lists/listHeader.js b/client/components/lists/listHeader.js index e8a82499..b524d4e0 100644 --- a/client/components/lists/listHeader.js +++ b/client/components/lists/listHeader.js @@ -13,6 +13,20 @@ BlazeComponent.extendComponent({ ); }, + isBoardAdmin() { + return Meteor.user().isBoardAdmin(); + }, + starred(check = undefined) { + const list = Template.currentData(); + const status = list.isStarred(); + if (check === undefined) { + // just check + return status; + } else { + list.star(!status); + return !status; + } + }, editTitle(event) { event.preventDefault(); const newTitle = this.childComponents('inlinedForm')[0] @@ -61,6 +75,10 @@ BlazeComponent.extendComponent({ events() { return [ { + 'click .js-list-star'(event) { + event.preventDefault(); + this.starred(!this.starred()); + }, 'click .js-open-list-menu': Popup.open('listAction'), 'click .js-add-card'(event) { const listDom = $(event.target).parents( @@ -80,6 +98,12 @@ BlazeComponent.extendComponent({ }, }).register('listHeader'); +Template.listHeader.helpers({ + showDesktopDragHandles() { + return Meteor.user().hasShowDesktopDragHandles(); + }, +}); + Template.listActionPopup.helpers({ isWipLimitEnabled() { return Template.currentData().getWipLimit('enabled'); |