mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Merge pull request #4542 from jaswilli/misc-cleanup
Miscellaneous client cleanup
This commit is contained in:
commit
4937bfa4ff
@ -30,7 +30,6 @@
|
||||
"SimpleAuth": true,
|
||||
"validator": true,
|
||||
"ic": true,
|
||||
"_": true,
|
||||
"NProgress": true,
|
||||
"moment": true
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
# [Ghost-UI](http://github.com/TryGhost/Ghost-UI)
|
||||
[Travis] [SauceLabs]
|
||||
# Ghost Admin Client
|
||||
|
||||
Ghost-UI is the Ember.js application used as a client-side admin for the [Ghost](http://ghost.org) blogging platform. This readme is a work in progress guide aimed at explaining the specific nuances of the Ghost Ember app to contributors whose main focus is on this side of things.
|
||||
Ember.js application used as a client-side admin for the [Ghost](http://ghost.org) blogging platform. This readme is a work in progress guide aimed at explaining the specific nuances of the Ghost Ember app to contributors whose main focus is on this side of things.
|
||||
|
||||
|
||||
## Architecture
|
||||
|
@ -29,7 +29,6 @@ var NotificationComponent = Ember.Component.extend({
|
||||
var self = this;
|
||||
|
||||
self.$().on('animationend webkitAnimationEnd oanimationend MSAnimationEnd', function (event) {
|
||||
/* jshint unused: false */
|
||||
if (event.originalEvent.animationName === 'fade-out') {
|
||||
self.notifications.removeObject(self.get('message'));
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* jshint unused: false */
|
||||
import ajax from 'ghost/utils/ajax';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
@ -24,14 +23,14 @@ var ForgottenController = Ember.Controller.extend(ValidationEngine, {
|
||||
email: data.email
|
||||
}]
|
||||
}
|
||||
}).then(function (resp) {
|
||||
}).then(function () {
|
||||
self.toggleProperty('submitting');
|
||||
self.notifications.showSuccess('Please check your email for instructions.', {delayed: true});
|
||||
self.set('email', '');
|
||||
self.transitionToRoute('signin');
|
||||
}).catch(function (resp) {
|
||||
self.toggleProperty('submitting');
|
||||
self.notifications.showAPIError(resp, {defaultErrorText: 'There was a problem logging in, please try again.'});
|
||||
self.notifications.showAPIError(resp, {defaultErrorText: 'There was a problem with the reset, please try again.'});
|
||||
});
|
||||
}).catch(function (errors) {
|
||||
self.toggleProperty('submitting');
|
||||
|
@ -1,5 +1,3 @@
|
||||
/*global console*/
|
||||
/* jshint unused: false */
|
||||
import ajax from 'ghost/utils/ajax';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
|
@ -1,23 +1,18 @@
|
||||
/*global Ember */
|
||||
/* jshint unused: false */
|
||||
import ghostPaths from 'ghost/utils/ghost-paths';
|
||||
import documentTitle from 'ghost/utils/document-title';
|
||||
|
||||
// ensure we don't share routes between all Router instances
|
||||
var Router = Ember.Router.extend();
|
||||
|
||||
documentTitle();
|
||||
|
||||
Router.reopen({
|
||||
var Router = Ember.Router.extend({
|
||||
location: 'trailing-history', // use HTML5 History API instead of hash-tag based URLs
|
||||
rootURL: ghostPaths().adminRoot, // admin interface lives under sub-directory /ghost
|
||||
|
||||
clearNotifications: function () {
|
||||
clearNotifications: Ember.on('didTransition', function () {
|
||||
this.notifications.closePassive();
|
||||
this.notifications.displayDelayed();
|
||||
}.on('didTransition')
|
||||
})
|
||||
});
|
||||
|
||||
documentTitle();
|
||||
|
||||
Router.map(function () {
|
||||
this.route('setup');
|
||||
this.route('signin');
|
||||
|
Loading…
Reference in New Issue
Block a user