simplify save buttons

This commit is contained in:
Thomas Hervey
2018-07-21 12:31:22 -04:00
parent b91fa2841b
commit e8fc9f2eda

View File

@@ -256,19 +256,15 @@ export function uiNoteEditor(context) {
.append('div')
.attr('class', 'buttons');
if (_note.isNew()) {
buttonEnter
.append('button')
.attr('class', 'button add-note-button action')
.append('span')
.attr('class', 'label');
} else {
buttonEnter
.append('button')
.attr('class', 'button status-button action')
.append('span')
.attr('class', 'label');
buttonEnter
.append('button')
.attr('class', function() {
return _note.isNew() ? 'button add-note-button action' : 'button status-button action';
})
.append('span')
.attr('class', 'label');
if (!_note.isNew()) {
buttonEnter
.append('button')
.attr('class', 'button comment-button action')