mirror of
https://github.com/wekan/wekan.git
synced 2026-02-19 22:48:07 +01:00
Merge branch 'master' of https://github.com/mark-i-m/wekan into mark-i-m-master
This commit is contained in:
commit
a2f479f4bd
13 changed files with 232 additions and 19 deletions
|
|
@ -153,6 +153,7 @@ Template.listActionPopup.events({
|
|||
});
|
||||
Popup.back();
|
||||
},
|
||||
'click .js-set-list-width': Popup.open('setListWidth'),
|
||||
'click .js-set-color-list': Popup.open('setListColor'),
|
||||
'click .js-select-cards'() {
|
||||
const cardIds = this.allCards().map(card => card._id);
|
||||
|
|
@ -320,3 +321,41 @@ BlazeComponent.extendComponent({
|
|||
];
|
||||
},
|
||||
}).register('setListColorPopup');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
applyListWidth() {
|
||||
const list = Template.currentData();
|
||||
const board = list.boardId;
|
||||
const width = parseInt(
|
||||
Template.instance()
|
||||
.$('.list-width-value')
|
||||
.val(),
|
||||
10,
|
||||
);
|
||||
|
||||
// FIXME(mark-i-m): where do we put constants?
|
||||
if (width < 100 || !width) {
|
||||
Template.instance()
|
||||
.$('.list-width-error')
|
||||
.click();
|
||||
} else {
|
||||
Meteor.call('applyListWidth', board, list._id, width);
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
|
||||
listWidthValue() {
|
||||
const list = Template.currentData();
|
||||
const board = list.boardId;
|
||||
return Meteor.user().getListWidth(board, list._id);
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click .list-width-apply': this.applyListWidth,
|
||||
'click .list-width-error': Popup.open('listWidthError'),
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('setListWidthPopup');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue