X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/631815265199e5299369d67a01afd21eb9eddf91..3193141f55df20910cf8ba35f9e669d79c90d3f4:/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'); + } },