mirror of
https://github.com/wekan/wekan.git
synced 2025-12-15 23:10:13 +01:00
mostly frontend work, lists coll update with wipLimit field
This commit is contained in:
parent
c9c650664f
commit
a918d36533
7 changed files with 46 additions and 16 deletions
|
|
@ -110,3 +110,16 @@
|
||||||
background: #fafafa
|
background: #fafafa
|
||||||
color: #222
|
color: #222
|
||||||
box-shadow: 0 1px 2px rgba(0,0,0,.2)
|
box-shadow: 0 1px 2px rgba(0,0,0,.2)
|
||||||
|
|
||||||
|
#js-wip-limit-edit
|
||||||
|
padding-top: 2%
|
||||||
|
|
||||||
|
p
|
||||||
|
margin-bottom: 0
|
||||||
|
|
||||||
|
input
|
||||||
|
display: inline-block
|
||||||
|
|
||||||
|
.wip-limit-value
|
||||||
|
width: 20%
|
||||||
|
margin-right: 5%
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,8 @@ template(name="listHeader")
|
||||||
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
|
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
|
||||||
= title
|
= title
|
||||||
if hasWipLimit
|
if hasWipLimit
|
||||||
span.wip-limit
|
span
|
||||||
| (
|
| (#{wipLimit})
|
||||||
= wipLimit
|
|
||||||
| )
|
|
||||||
if showCardsCountForList cards.count
|
if showCardsCountForList cards.count
|
||||||
= cards.count
|
= cards.count
|
||||||
span.lowercase
|
span.lowercase
|
||||||
|
|
@ -39,7 +37,7 @@ template(name="listActionPopup")
|
||||||
li: a.js-select-cards {{_ 'list-select-cards'}}
|
li: a.js-select-cards {{_ 'list-select-cards'}}
|
||||||
hr
|
hr
|
||||||
ul.pop-over-list
|
ul.pop-over-list
|
||||||
li: a.js-set-wip-limit {{#if hasWipLimit}}{{_ 'edit-wip-limit'}}{{else}}{{_ 'set-wip-limit'}}{{/if}}
|
li: a.js-set-wip-limit {{#if hasWipLimit}}{{_ 'edit-wip-limit'}}{{else}}{{_ 'setWipLimitPopup-title'}}{{/if}}
|
||||||
hr
|
hr
|
||||||
ul.pop-over-list
|
ul.pop-over-list
|
||||||
li: a.js-close-list {{_ 'archive-list'}}
|
li: a.js-close-list {{_ 'archive-list'}}
|
||||||
|
|
@ -74,5 +72,8 @@ template(name="listDeletePopup")
|
||||||
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
|
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
|
||||||
|
|
||||||
template(name="setWipLimitPopup")
|
template(name="setWipLimitPopup")
|
||||||
p {{_ 'set-wip-limit'}}
|
#js-wip-limit-edit
|
||||||
input(type="number")
|
lable {{_ 'set-wip-limit-value'}}
|
||||||
|
p
|
||||||
|
input.wip-limit-value(type="number" value="#{wipLimit}" min="0" max="99" onkeydown="return false")
|
||||||
|
input.wip-limit-apply(type="submit" value="{{_ 'apply'}}")
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@ BlazeComponent.extendComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hasWipLimit() {
|
||||||
|
return this.currentData().wipLimit > 0 ? true : false;
|
||||||
|
},
|
||||||
|
|
||||||
isWatching() {
|
isWatching() {
|
||||||
const list = this.currentData();
|
const list = this.currentData();
|
||||||
return list.findWatcher(Meteor.userId());
|
return list.findWatcher(Meteor.userId());
|
||||||
|
|
@ -21,11 +25,6 @@ BlazeComponent.extendComponent({
|
||||||
return count > this.limitToShowCardsCount();
|
return count > this.limitToShowCardsCount();
|
||||||
},
|
},
|
||||||
|
|
||||||
hasWipLimit() {
|
|
||||||
return null;
|
|
||||||
//return this.currentData().wipLimit ? true : false;
|
|
||||||
},
|
|
||||||
|
|
||||||
events() {
|
events() {
|
||||||
return [{
|
return [{
|
||||||
'click .js-open-list-menu': Popup.open('listAction'),
|
'click .js-open-list-menu': Popup.open('listAction'),
|
||||||
|
|
@ -42,6 +41,10 @@ BlazeComponent.extendComponent({
|
||||||
}).register('listHeader');
|
}).register('listHeader');
|
||||||
|
|
||||||
Template.listActionPopup.helpers({
|
Template.listActionPopup.helpers({
|
||||||
|
hasWipLimit() {
|
||||||
|
return this.wipLimit > 0 ? true : false;
|
||||||
|
},
|
||||||
|
|
||||||
isWatching() {
|
isWatching() {
|
||||||
return this.findWatcher(Meteor.userId());
|
return this.findWatcher(Meteor.userId());
|
||||||
},
|
},
|
||||||
|
|
@ -70,6 +73,13 @@ Template.listActionPopup.events({
|
||||||
'click .js-more': Popup.open('listMore'),
|
'click .js-more': Popup.open('listMore'),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Template.setWipLimitPopup.events({
|
||||||
|
'click .wip-limit-apply'(_, instance) {
|
||||||
|
const limit = instance.$('.wip-limit-value').val();
|
||||||
|
this.setWipLimit(limit);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
Template.listMorePopup.events({
|
Template.listMorePopup.events({
|
||||||
'click .js-delete': Popup.afterConfirm('listDelete', function () {
|
'click .js-delete': Popup.afterConfirm('listDelete', function () {
|
||||||
Popup.close();
|
Popup.close();
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,8 @@
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
"select-color": "Select Color",
|
"select-color": "Select Color",
|
||||||
"set-wip-limit": "Set WIP Limit",
|
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list:",
|
||||||
|
"setWipLimitPopup-title": "Set WIP Limit",
|
||||||
"shortcut-assign-self": "Assign yourself to current card",
|
"shortcut-assign-self": "Assign yourself to current card",
|
||||||
"shortcut-autocomplete-emoji": "Autocomplete emoji",
|
"shortcut-autocomplete-emoji": "Autocomplete emoji",
|
||||||
"shortcut-autocomplete-members": "Autocomplete members",
|
"shortcut-autocomplete-members": "Autocomplete members",
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,8 @@
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"search": "Search",
|
"search": "Search",
|
||||||
"select-color": "Select Color",
|
"select-color": "Select Color",
|
||||||
"set-wip-limit": "Set WIP Limit",
|
"set-wip-limit-value": "Set a limit for the maximum number of tasks in this list",
|
||||||
|
"setWipLimitPopup-title": "Set WIP Limit",
|
||||||
"shortcut-assign-self": "Assign yourself to current card",
|
"shortcut-assign-self": "Assign yourself to current card",
|
||||||
"shortcut-autocomplete-emoji": "Autocomplete emoji",
|
"shortcut-autocomplete-emoji": "Autocomplete emoji",
|
||||||
"shortcut-autocomplete-members": "Autocomplete members",
|
"shortcut-autocomplete-members": "Autocomplete members",
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,8 @@
|
||||||
"save": "Salvar",
|
"save": "Salvar",
|
||||||
"search": "Buscar",
|
"search": "Buscar",
|
||||||
"select-color": "Selecionar Cor",
|
"select-color": "Selecionar Cor",
|
||||||
"set-wip-limit": "Definir Limite WIP",
|
"set-wip-limit-value": "Defina um limite máximo para o número de tarefas nesta lista",
|
||||||
|
"setWipLimitPopup-title": "Definir Limite WIP",
|
||||||
"shortcut-assign-self": "Atribuir a si o cartão atual",
|
"shortcut-assign-self": "Atribuir a si o cartão atual",
|
||||||
"shortcut-autocomplete-emoji": "Autocompletar emoji",
|
"shortcut-autocomplete-emoji": "Autocompletar emoji",
|
||||||
"shortcut-autocomplete-members": "Preenchimento automático de membros",
|
"shortcut-autocomplete-members": "Preenchimento automático de membros",
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ Lists.attachSchema(new SimpleSchema({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
wipLimit: {
|
wipLimit: {
|
||||||
type: SimpleSchema.Integer,
|
type: SimpleSchema.Integer,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
|
@ -91,6 +90,10 @@ Lists.mutations({
|
||||||
restore() {
|
restore() {
|
||||||
return { $set: { archived: false } };
|
return { $set: { archived: false } };
|
||||||
},
|
},
|
||||||
|
|
||||||
|
setWipLimit(limit) {
|
||||||
|
return { $set: { wipLimit: limit } };
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
Lists.hookOptions.after.update = { fetchPrevious: false };
|
Lists.hookOptions.after.update = { fetchPrevious: false };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue