mirror of
https://github.com/wekan/wekan.git
synced 2025-12-31 14:48:48 +01:00
Toggle opened card Custom Fields layout between Grid and one per row.
Thanks to xet7 !
This commit is contained in:
parent
87e9949f33
commit
ee06e4f6de
3 changed files with 42 additions and 1 deletions
|
|
@ -227,8 +227,17 @@ template(name="cardDetails")
|
|||
|
||||
//.card-details-items
|
||||
if customFieldsWD
|
||||
each customFieldsWD
|
||||
.material-toggle-switch(title="{{_ 'change'}} {{_ 'custom-fields'}} {{_ 'layout'}}")
|
||||
if customFieldsGrid
|
||||
input.toggle-switch(type="checkbox" id="toggleCustomFieldsGridButton" checked="checked")
|
||||
else
|
||||
input.toggle-switch(type="checkbox" id="toggleCustomFieldsGridButton")
|
||||
label.toggle-label(for="toggleCustomFieldsGridButton")
|
||||
unless customFieldsGrid
|
||||
hr
|
||||
each customFieldsWD
|
||||
if customFieldsGrid
|
||||
hr
|
||||
.card-details-item.card-details-item-customfield
|
||||
h3.card-details-item-title
|
||||
i.fa.fa-list-alt
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ BlazeComponent.extendComponent({
|
|||
return Meteor.user().hasHiddenSystemMessages();
|
||||
},
|
||||
|
||||
customFieldsGrid() {
|
||||
return Meteor.user().hasCustomFieldsGrid();
|
||||
},
|
||||
|
||||
|
||||
cardMaximized() {
|
||||
return Meteor.user().hasCardMaximized();
|
||||
},
|
||||
|
|
@ -419,6 +424,9 @@ BlazeComponent.extendComponent({
|
|||
'click #toggleButton'() {
|
||||
Meteor.call('toggleSystemMessages');
|
||||
},
|
||||
'click #toggleCustomFieldsGridButton'() {
|
||||
Meteor.call('toggleCustomFieldsGrid');
|
||||
},
|
||||
'click .js-maximize-card-details'() {
|
||||
Meteor.call('toggleCardMaximized');
|
||||
autosize($('.card-details'));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue