X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/78644811ca0c6042212788dc67add42bc41fb74c..a3face505cc1462d8d8cae3102666890608eacb6:/platforma/static/js/views/editor.js diff --git a/platforma/static/js/views/editor.js b/platforma/static/js/views/editor.js index 2793141f..d43caaaa 100644 --- a/platforma/static/js/views/editor.js +++ b/platforma/static/js/views/editor.js @@ -29,6 +29,7 @@ var EditorView = View.extend({ $('#commit-dialog-error-empty-message').hide(); $('#commit-dialog').jqmHide(); }); + // $('#split-dialog').jqm({ // modal: true, @@ -117,16 +118,24 @@ var EditorView = View.extend({ this.commitButton.attr('disabled', null); this.updateButton.attr('disabled', 'disabled'); this.mergeButton.attr('disabled', 'disabled'); - } else if (value == 'synced') { + } else if (value == 'synced') { this.quickSaveButton.attr('disabled', 'disabled'); this.commitButton.attr('disabled', 'disabled'); this.updateButton.attr('disabled', null); this.mergeButton.attr('disabled', null); + this.unfreeze(); } else if (value == 'empty') { this.quickSaveButton.attr('disabled', 'disabled'); this.commitButton.attr('disabled', 'disabled'); this.updateButton.attr('disabled', 'disabled'); this.mergeButton.attr('disabled', 'disabled'); + } else if (value == 'error') { + this.freeze(this.model.get('error')); + this.quickSaveButton.attr('disabled', 'disabled'); + this.commitButton.attr('disabled', 'disabled'); + this.updateButton.attr('disabled', 'disabled'); + this.mergeButton.attr('disabled', 'disabled'); + } },