mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Trello custom field import basically working
This commit is contained in:
parent
c89a0eb694
commit
b793716e85
5 changed files with 59 additions and 23 deletions
|
|
@ -55,13 +55,21 @@ template(name="cardCustomField-number")
|
|||
template(name="cardCustomField-checkbox")
|
||||
if canModifyCard
|
||||
+inlinedForm(classNames="js-card-customfield-checkbox")
|
||||
input(type="checkbox" value=data.value)
|
||||
input.materialCheckBox(type="checkbox" checked=data.value)
|
||||
.edit-controls.clearfix
|
||||
button.primary(type="submit") {{_ 'save'}}
|
||||
a.fa.fa-times-thin.js-close-inlined-form
|
||||
else
|
||||
a.js-open-inlined-form.checkbox-display
|
||||
if value
|
||||
i.fa.fa-check-square
|
||||
else
|
||||
i.fa.fa-square
|
||||
else
|
||||
if value
|
||||
= value
|
||||
i.fa.fa-check-square
|
||||
else
|
||||
i.fa.fa-square
|
||||
|
||||
template(name="cardCustomField-currency")
|
||||
if canModifyCard
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ CardCustomField.register('cardCustomField');
|
|||
},
|
||||
];
|
||||
}
|
||||
}.register('cardCustomField-checkbox'));
|
||||
}.register('cardCustomField-number'));
|
||||
|
||||
// cardCustomField-checkbox
|
||||
(class extends CardCustomField {
|
||||
|
|
@ -86,12 +86,16 @@ CardCustomField.register('cardCustomField');
|
|||
super.onCreated();
|
||||
}
|
||||
|
||||
isNull() {
|
||||
return !this.data().value;
|
||||
}
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'submit .js-card-customfield-checkbox'(event) {
|
||||
event.preventDefault();
|
||||
const value = this.find('input').value !== '';
|
||||
const value = this.find('input').checked;
|
||||
this.card.setCustomField(this.customFieldId, value);
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ template(name="minicard")
|
|||
if $eq definition.type "currency"
|
||||
+viewer
|
||||
= formattedCurrencyCustomFieldValue(definition)
|
||||
else if $eq definition.type "checkbox"
|
||||
i.fa.fa-check-square
|
||||
else
|
||||
+viewer
|
||||
= trueValue
|
||||
|
|
|
|||
|
|
@ -242,11 +242,11 @@ textarea
|
|||
margin: 3px 4px
|
||||
|
||||
// Material Design checkboxes
|
||||
[type="checkbox"]:not(:checked),
|
||||
[type="checkbox"]:checked
|
||||
position: absolute
|
||||
left: -9999px
|
||||
visibility: hidden
|
||||
//[type="checkbox"]:not(:checked),
|
||||
//[type="checkbox"]:checked
|
||||
// position: absolute
|
||||
// left: -9999px
|
||||
// visibility: hidden
|
||||
|
||||
.materialCheckBox
|
||||
position: relative
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue