mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Removed holdover popover code in PostsPostController
Ref #2840 -Removed unused isEditingSettings and isViewingSaveTypes from PostsPostController
This commit is contained in:
parent
beb078b52c
commit
2d321e2f01
1 changed files with 0 additions and 21 deletions
|
@ -2,10 +2,6 @@
|
||||||
import {parseDateString, formatDate} from 'ghost/utils/date-formatting';
|
import {parseDateString, formatDate} from 'ghost/utils/date-formatting';
|
||||||
|
|
||||||
var PostController = Ember.ObjectController.extend({
|
var PostController = Ember.ObjectController.extend({
|
||||||
//## Editor state properties
|
|
||||||
isEditingSettings: false,
|
|
||||||
isViewingSaveTypes: false,
|
|
||||||
|
|
||||||
//## Computed post properties
|
//## Computed post properties
|
||||||
isPublished: Ember.computed.equal('status', 'published'),
|
isPublished: Ember.computed.equal('status', 'published'),
|
||||||
isDraft: Ember.computed.equal('status', 'draft'),
|
isDraft: Ember.computed.equal('status', 'draft'),
|
||||||
|
@ -44,9 +40,6 @@ var PostController = Ember.ObjectController.extend({
|
||||||
self.get('model.status') + '</strong>.');
|
self.get('model.status') + '</strong>.');
|
||||||
}, this.notifications.showErrors);
|
}, this.notifications.showErrors);
|
||||||
},
|
},
|
||||||
viewSaveTypes: function () {
|
|
||||||
this.toggleProperty('isViewingSaveTypes');
|
|
||||||
},
|
|
||||||
setSaveType: function (newType) {
|
setSaveType: function (newType) {
|
||||||
if (newType === 'publish') {
|
if (newType === 'publish') {
|
||||||
this.set('willPublish', true);
|
this.set('willPublish', true);
|
||||||
|
@ -61,20 +54,6 @@ var PostController = Ember.ObjectController.extend({
|
||||||
|
|
||||||
this.get('model').save();
|
this.get('model').save();
|
||||||
},
|
},
|
||||||
editSettings: function () {
|
|
||||||
var isEditing = this.toggleProperty('isEditingSettings');
|
|
||||||
if (isEditing) {
|
|
||||||
//Stop editing if the user clicks outside the settings view
|
|
||||||
Ember.run.next(this, function () {
|
|
||||||
var self = this;
|
|
||||||
// @TODO has a race condition with click on the editSettings action
|
|
||||||
$(document).one('click', function () {
|
|
||||||
self.toggleProperty('isEditingSettings');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
updateSlug: function () {
|
updateSlug: function () {
|
||||||
var newSlug = this.get('newSlug'),
|
var newSlug = this.get('newSlug'),
|
||||||
slug = this.get('slug'),
|
slug = this.get('slug'),
|
||||||
|
|
Loading…
Add table
Reference in a new issue