mirror of
https://github.com/wekan/wekan.git
synced 2026-02-24 00:44:07 +01:00
Allow description and member two way binding
This commit is contained in:
parent
a93de07fb9
commit
0a62089df0
6 changed files with 82 additions and 14 deletions
|
|
@ -55,7 +55,7 @@ template(name="cardDetails")
|
|||
.card-details-items
|
||||
.card-details-item.card-details-item-members
|
||||
h3.card-details-item-title {{_ 'members'}}
|
||||
each members
|
||||
each getMembers
|
||||
+userAvatar(userId=this cardId=../_id)
|
||||
| {{! XXX Hack to hide syntaxic coloration /// }}
|
||||
if canModifyCard
|
||||
|
|
@ -92,15 +92,15 @@ template(name="cardDetails")
|
|||
h3.card-details-item-title {{_ 'description'}}
|
||||
+inlinedCardDescription(classNames="card-description js-card-description")
|
||||
+editor(autofocus=true)
|
||||
| {{getUnsavedValue 'cardDescription' _id description}}
|
||||
| {{getUnsavedValue 'cardDescription' _id getDescription}}
|
||||
.edit-controls.clearfix
|
||||
button.primary(type="submit") {{_ 'save'}}
|
||||
a.fa.fa-times-thin.js-close-inlined-form
|
||||
else
|
||||
a.js-open-inlined-form
|
||||
if description
|
||||
if getDescription
|
||||
+viewer
|
||||
= description
|
||||
= getDescription
|
||||
else
|
||||
| {{_ 'edit'}}
|
||||
if (hasUnsavedValue 'cardDescription' _id)
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
canModifyCard() {
|
||||
return Meteor.user() && Meteor.user().isBoardMember() &&
|
||||
!Meteor.user().isCommentOnly() && !this.currentData().isImported();
|
||||
return Meteor.user() && Meteor.user().isBoardMember() && !Meteor.user().isCommentOnly();
|
||||
},
|
||||
|
||||
scrollParentContainer() {
|
||||
|
|
@ -275,7 +274,7 @@ BlazeComponent.extendComponent({
|
|||
close(isReset = false) {
|
||||
if (this.isOpen.get() && !isReset) {
|
||||
const draft = this.getValue().trim();
|
||||
if (draft !== Cards.findOne(Session.get('currentCard')).description) {
|
||||
if (draft !== Cards.findOne(Session.get('currentCard')).getDescription()) {
|
||||
UnsavedEdits.set(this._getUnsavedEditKey(), this.getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,9 +57,9 @@ template(name="minicard")
|
|||
+viewer
|
||||
= trueValue
|
||||
|
||||
if members
|
||||
if getMembers
|
||||
.minicard-members.js-minicard-members
|
||||
each members
|
||||
each getMembers
|
||||
+userAvatar(userId=this)
|
||||
|
||||
.badges
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue