mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
Merge pull request #2915 from rjackson/make-exports-consistent
Make exports more consistent.
This commit is contained in:
commit
12ef319d73
@ -2,7 +2,7 @@ import ghostPaths from 'ghost/utils/ghost-paths';
|
||||
|
||||
// export default DS.FixtureAdapter.extend({});
|
||||
|
||||
export default DS.RESTAdapter.extend({
|
||||
var ApplicationAdapter = DS.RESTAdapter.extend({
|
||||
host: window.location.origin,
|
||||
namespace: ghostPaths().apiRoot.slice(1),
|
||||
headers: {
|
||||
@ -34,3 +34,5 @@ export default DS.RESTAdapter.extend({
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
export default ApplicationAdapter;
|
||||
|
@ -1,5 +1,7 @@
|
||||
export default Ember.Component.extend({
|
||||
var ActivatingListItem = Ember.Component.extend({
|
||||
tagName: 'li',
|
||||
classNameBindings: ['active'],
|
||||
active: false
|
||||
});
|
||||
|
||||
export default ActivatingListItem;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default Ember.View.extend({
|
||||
var Form = Ember.View.extend({
|
||||
tagName: 'form',
|
||||
attributeBindings: ['enctype'],
|
||||
reset: function () {
|
||||
@ -11,3 +11,5 @@ export default Ember.View.extend({
|
||||
this.get('controller').off('reset', this, this.reset);
|
||||
}
|
||||
});
|
||||
|
||||
export default Form;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default {
|
||||
var CSRFTokenInitializer = {
|
||||
name: 'csrf-token',
|
||||
|
||||
initialize: function (container) {
|
||||
@ -9,3 +9,5 @@ export default {
|
||||
container.injection('controller', 'csrf', 'csrf:token');
|
||||
}
|
||||
};
|
||||
|
||||
export default CSRFTokenInitializer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default {
|
||||
var CSRFInitializer = {
|
||||
name: 'csrf',
|
||||
|
||||
initialize: function (container) {
|
||||
@ -8,3 +8,5 @@ export default {
|
||||
container.injection('controller', 'csrf', 'csrf:current');
|
||||
}
|
||||
};
|
||||
|
||||
export default CSRFInitializer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default {
|
||||
var currentUserInitializer = {
|
||||
name: 'currentUser',
|
||||
after: 'store',
|
||||
|
||||
@ -32,3 +32,5 @@ export default {
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default currentUserInitializer;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import ghostPaths from 'ghost/utils/ghost-paths';
|
||||
|
||||
export default {
|
||||
var ghostPathsInitializer = {
|
||||
name: 'ghost-paths',
|
||||
after: 'store',
|
||||
|
||||
@ -12,3 +12,5 @@ export default {
|
||||
container.injection('controller', 'ghostPaths', 'ghost:paths');
|
||||
}
|
||||
};
|
||||
|
||||
export default ghostPathsInitializer;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Notifications from 'ghost/utils/notifications';
|
||||
|
||||
export default {
|
||||
var injectNotificationsInitializer = {
|
||||
name: 'injectNotifications',
|
||||
|
||||
initialize: function (container, application) {
|
||||
@ -11,3 +11,5 @@ export default {
|
||||
application.inject('route', 'notifications', 'notifications:main');
|
||||
}
|
||||
};
|
||||
|
||||
export default injectNotificationsInitializer;
|
||||
|
@ -13,7 +13,7 @@ var PopoverService = Ember.Object.extend(Ember.Evented, BodyEventListener, {
|
||||
}
|
||||
});
|
||||
|
||||
export default {
|
||||
var popoverInitializer = {
|
||||
name: 'popover',
|
||||
|
||||
initialize: function (container, application) {
|
||||
@ -24,3 +24,5 @@ export default {
|
||||
application.inject('controller:modals.delete-post', 'popover', 'popover:service');
|
||||
}
|
||||
};
|
||||
|
||||
export default popoverInitializer;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default DS.Model.extend({
|
||||
var Tag = DS.Model.extend({
|
||||
uuid: DS.attr('string'),
|
||||
name: DS.attr('string'),
|
||||
slug: DS.attr('string'),
|
||||
@ -11,3 +11,5 @@ export default DS.Model.extend({
|
||||
updated_at: DS.attr('date'),
|
||||
updated_by: DS.attr('number')
|
||||
});
|
||||
|
||||
export default Tag;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default DS.RESTSerializer.extend({
|
||||
var ApplicationSerializer = DS.RESTSerializer.extend({
|
||||
serializeIntoHash: function (hash, type, record, options) {
|
||||
// Our API expects an id on the posted object
|
||||
options = options || {};
|
||||
@ -14,3 +14,5 @@ export default DS.RESTSerializer.extend({
|
||||
hash[root] = [data];
|
||||
}
|
||||
});
|
||||
|
||||
export default ApplicationSerializer;
|
||||
|
@ -9,7 +9,7 @@ var makeRoute = function (root, args) {
|
||||
return route;
|
||||
};
|
||||
|
||||
export default function ghostPaths() {
|
||||
function ghostPaths() {
|
||||
var path = window.location.pathname,
|
||||
subdir = path.substr(0, path.search('/ghost/'));
|
||||
|
||||
@ -27,3 +27,5 @@ export default function ghostPaths() {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export default ghostPaths;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export default Ember.View.extend({
|
||||
var EditorSaveButtonView = Ember.View.extend({
|
||||
templateName: 'editor-save-button',
|
||||
tagName: 'section',
|
||||
classNames: ['js-publish-splitbutton'],
|
||||
@ -21,3 +21,5 @@ export default Ember.View.extend({
|
||||
return this.get('controller.isPublished') ? 'Unpublish' : 'Save Draft';
|
||||
}.property('controller.isPublished')
|
||||
});
|
||||
|
||||
export default EditorSaveButtonView;
|
||||
|
@ -1,7 +1,9 @@
|
||||
export default Ember.View.extend({
|
||||
var ItemView = Ember.View.extend({
|
||||
classNameBindings: ['active'],
|
||||
|
||||
active: function () {
|
||||
return this.get('childViews.firstObject.active');
|
||||
}.property('childViews.firstObject.active')
|
||||
});
|
||||
|
||||
export default ItemView;
|
||||
|
Loading…
Reference in New Issue
Block a user