mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Merge pull request #3650 from felixrieseberg/iss3643-2
Editor: Warn if title change is unsaved
This commit is contained in:
commit
7e62e49822
1 changed files with 6 additions and 0 deletions
|
@ -88,6 +88,8 @@ var EditorControllerMixin = Ember.Mixin.create(MarkerManager, {
|
|||
|
||||
var model = this.get('model'),
|
||||
markdown = this.get('markdown'),
|
||||
title = this.get('title'),
|
||||
titleScratch = this.get('titleScratch'),
|
||||
scratch = this.getMarkdown().withoutMarkers,
|
||||
changedAttributes;
|
||||
|
||||
|
@ -95,6 +97,10 @@ var EditorControllerMixin = Ember.Mixin.create(MarkerManager, {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (titleScratch !== title) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// since `scratch` is not model property, we need to check
|
||||
// it explicitly against the model's markdown attribute
|
||||
if (markdown !== scratch) {
|
||||
|
|
Loading…
Reference in a new issue