mirror of
https://github.com/documize/community.git
synced 2025-07-24 23:59:47 +02:00
Allow for empty document excerpt
This commit is contained in:
parent
2d2296591b
commit
94a2e2c0f7
2 changed files with 3 additions and 6 deletions
|
@ -22,7 +22,6 @@ export default Component.extend({
|
|||
docName: '',
|
||||
docExcerpt: '',
|
||||
hasNameError: empty('docName'),
|
||||
hasExcerptError: empty('docExcerpt'),
|
||||
|
||||
canEdit: computed('permssions', 'document', function() {
|
||||
let constants = this.get('constants');
|
||||
|
@ -55,12 +54,10 @@ export default Component.extend({
|
|||
},
|
||||
|
||||
onSave() {
|
||||
if (this.get('hasNameError') || this.get('hasExcerptError')) {
|
||||
return;
|
||||
}
|
||||
if (this.get('hasNameError')) return;
|
||||
|
||||
this.set('document.name', this.get('docName'));
|
||||
this.set('document.excerpt', this.get('docExcerpt'));
|
||||
this.set('document.excerpt', this.get('docExcerpt').trim());
|
||||
this.set('editMode', false);
|
||||
|
||||
let cb = this.get('onSaveDocument');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue