mirror of
https://github.com/wekan/wekan.git
synced 2026-02-04 23:51:48 +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
|
|
@ -7,8 +7,8 @@
|
|||
border-left: 1px solid #ccc;
|
||||
padding: 0;
|
||||
float: left;
|
||||
min-width: 270px;
|
||||
max-width: 270px;
|
||||
min-width: 100px; /* TODO(mark-i-m): hardcoded? */
|
||||
/*max-width: 270px;*/
|
||||
/* Reverted incomplete change list width: */
|
||||
/* https://github.com/wekan/wekan/issues/4558 */
|
||||
/* Orinal width: 270px. Changes not saved yet: */
|
||||
|
|
@ -179,6 +179,9 @@
|
|||
#js-wip-limit-edit div {
|
||||
float: left;
|
||||
}
|
||||
#js-list-width-edit .list-width-error {
|
||||
display: none;
|
||||
}
|
||||
@media screen and (max-width: 800px) {
|
||||
.mini-list {
|
||||
flex: 0 0 60px;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
template(name='list')
|
||||
.list.js-list(id="js-list-{{_id}}")
|
||||
.list.js-list(id="js-list-{{_id}}"
|
||||
style="width:{{listWidth}}px;")
|
||||
+listHeader
|
||||
+listBody
|
||||
|
||||
|
|
|
|||
|
|
@ -194,6 +194,12 @@ BlazeComponent.extendComponent({
|
|||
});
|
||||
});
|
||||
},
|
||||
|
||||
listWidth() {
|
||||
const user = Meteor.user();
|
||||
const list = Template.currentData();
|
||||
return user.getListWidth(list.boardId, list._id);
|
||||
},
|
||||
}).register('list');
|
||||
|
||||
Template.miniList.events({
|
||||
|
|
|
|||
|
|
@ -62,6 +62,11 @@ template(name="listActionPopup")
|
|||
i.fa.fa-arrow-down
|
||||
| {{_ 'add-card-to-bottom-of-list'}}
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-set-list-width
|
||||
i.fa.fa-arrows-h
|
||||
| {{_ 'set-list-width'}}
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-toggle-watch-list
|
||||
|
|
@ -156,6 +161,19 @@ template(name="wipLimitErrorPopup")
|
|||
p {{_ 'wipLimitErrorPopup-dialog-pt2'}}
|
||||
button.full.js-back-view(type="submit") {{_ 'cancel'}}
|
||||
|
||||
template(name="setListWidthPopup")
|
||||
#js-list-width-edit
|
||||
label {{_ 'set-list-width-value'}}
|
||||
p
|
||||
input.list-width-value(type="number" value="{{ listWidthValue }}" min="100")
|
||||
input.list-width-apply(type="submit" value="{{_ 'apply'}}")
|
||||
input.list-width-error
|
||||
|
||||
template(name="listWidthErrorPopup")
|
||||
.list-width-invalid
|
||||
p {{_ 'list-width-error-message'}}
|
||||
button.full.js-back-view(type="submit") {{_ 'cancel'}}
|
||||
|
||||
template(name="setListColorPopup")
|
||||
form.edit-label
|
||||
.palette-colors: each colors
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ template(name="swimlaneActionPopup")
|
|||
li: a.js-set-swimlane-color
|
||||
i.fa.fa-paint-brush
|
||||
| {{_ 'select-color'}}
|
||||
li: a.js-set-swimlane-height
|
||||
i.fa.fa-arrows-v
|
||||
| {{_ 'set-swimlane-height'}}
|
||||
unless this.isTemplateContainer
|
||||
hr
|
||||
ul.pop-over-list
|
||||
|
|
@ -82,6 +85,19 @@ template(name="setSwimlaneColorPopup")
|
|||
button.primary.confirm.js-submit {{_ 'save'}}
|
||||
button.js-remove-color.negate.wide.right {{_ 'unset-color'}}
|
||||
|
||||
template(name="setSwimlaneHeightPopup")
|
||||
#js-swimlane-height-edit
|
||||
label {{_ 'set-swimlane-height-value'}}
|
||||
p
|
||||
input.swimlane-height-value(type="number" value="{{ swimlaneHeightValue }}" min="100")
|
||||
input.swimlane-height-apply(type="submit" value="{{_ 'apply'}}")
|
||||
input.swimlane-height-error
|
||||
|
||||
template(name="swimlaneHeightErrorPopup")
|
||||
.swimlane-height-invalid
|
||||
p {{_ 'swimlane-height-error-message'}}
|
||||
button.full.js-back-view(type="submit") {{_ 'cancel'}}
|
||||
|
||||
template(name="swimlaneDeletePopup")
|
||||
p {{_ "swimlane-delete-pop"}}
|
||||
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ Template.swimlaneFixedHeader.helpers({
|
|||
|
||||
Template.swimlaneActionPopup.events({
|
||||
'click .js-set-swimlane-color': Popup.open('setSwimlaneColor'),
|
||||
'click .js-set-swimlane-height': Popup.open('setSwimlaneHeight'),
|
||||
'click .js-close-swimlane'(event) {
|
||||
event.preventDefault();
|
||||
this.archive();
|
||||
|
|
@ -129,3 +130,45 @@ BlazeComponent.extendComponent({
|
|||
];
|
||||
},
|
||||
}).register('setSwimlaneColorPopup');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.currentSwimlane = this.currentData();
|
||||
},
|
||||
|
||||
applySwimlaneHeight() {
|
||||
const swimlane = this.currentData();
|
||||
const board = swimlane.boardId;
|
||||
const height = parseInt(
|
||||
Template.instance()
|
||||
.$('.swimlane-height-value')
|
||||
.val(),
|
||||
10,
|
||||
);
|
||||
|
||||
// FIXME(mark-i-m): where do we put constants?
|
||||
if (height < 100 || !height) {
|
||||
Template.instance()
|
||||
.$('.swimlane-height-error')
|
||||
.click();
|
||||
} else {
|
||||
Meteor.call('applySwimlaneHeight', board, swimlane._id, height);
|
||||
Popup.back();
|
||||
}
|
||||
},
|
||||
|
||||
swimlaneHeightValue() {
|
||||
const swimlane = this.currentData();
|
||||
const board = swimlane.boardId;
|
||||
return Meteor.user().getSwimlaneHeight(board, swimlane._id);
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click .swimlane-height-apply': this.applySwimlaneHeight,
|
||||
'click .swimlane-height-error': Popup.open('swimlaneHeightError'),
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('setSwimlaneHeightPopup');
|
||||
|
|
|
|||
|
|
@ -116,6 +116,9 @@
|
|||
left: 87vw;
|
||||
font-size: 24px;
|
||||
}
|
||||
#js-swimlane-height-edit .swimlane-height-error {
|
||||
display: none;
|
||||
}
|
||||
.list-group {
|
||||
height: 100%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ template(name="swimlane")
|
|||
.swimlane
|
||||
+swimlaneHeader
|
||||
unless collapseSwimlane
|
||||
.swimlane.js-lists.js-swimlane(id="swimlane-{{_id}}")
|
||||
.swimlane.js-lists.js-swimlane(id="swimlane-{{_id}}"
|
||||
style="height:{{swimlaneHeight}}px;")
|
||||
if isMiniScreen
|
||||
if currentListIsInThisSwimlane _id
|
||||
+list(currentList)
|
||||
|
|
|
|||
|
|
@ -223,6 +223,12 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
];
|
||||
},
|
||||
|
||||
swimlaneHeight() {
|
||||
const user = Meteor.user();
|
||||
const swimlane = Template.currentData();
|
||||
return user.getSwimlaneHeight(swimlane.boardId, swimlane._id);
|
||||
},
|
||||
}).register('swimlane');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue