Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Ember from 'ember';
import ghostPaths from 'ghost/utils/ghost-paths';
import documentTitle from 'ghost/utils/document-title';
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: Ember.on('didTransition', function () {
this.notifications.closePassive();
this.notifications.displayDelayed();
})
});
documentTitle();
Router.map(function () {
this.route('setup');
this.route('signin');
this.route('signout');
this.route('signup', {path: '/signup/:token'});
this.route('forgotten');
this.route('reset', {path: '/reset/:token'});
type: 'GET'
});
},
save: function () {
return ic.ajax.request(this.url, {
type: 'PUT',
dataType: 'json',
// @TODO: This is passing _oldWillDestory and _willDestroy and should not.
data: JSON.stringify(this.getProperties(Ember.keys(this)))
});
}
});
BaseModel.apiRoot = ghostPaths().apiRoot;
BaseModel.subdir = ghostPaths().subdir;
BaseModel.adminRoot = ghostPaths().adminRoot;
export default BaseModel;
return ic.ajax.request(this.url, {
type: 'GET'
});
},
save: function () {
return ic.ajax.request(this.url, {
type: 'PUT',
dataType: 'json',
// @TODO: This is passing _oldWillDestory and _willDestroy and should not.
data: JSON.stringify(this.getProperties(Ember.keys(this)))
});
}
});
BaseModel.apiRoot = ghostPaths().apiRoot;
BaseModel.subdir = ghostPaths().subdir;
BaseModel.adminRoot = ghostPaths().adminRoot;
export default BaseModel;
});
},
save: function () {
return ic.ajax.request(this.url, {
type: 'PUT',
dataType: 'json',
// @TODO: This is passing _oldWillDestory and _willDestroy and should not.
data: JSON.stringify(this.getProperties(Ember.keys(this)))
});
}
});
BaseModel.apiRoot = ghostPaths().apiRoot;
BaseModel.subdir = ghostPaths().subdir;
BaseModel.adminRoot = ghostPaths().adminRoot;
export default BaseModel;
import Ember from 'ember';
import ghostPaths from 'ghost/utils/ghost-paths';
const {Service, _ProxyMixin} = Ember;
export default Service.extend(_ProxyMixin, {
content: ghostPaths()
});
import Ember from 'ember';
import ghostPaths from 'ghost/utils/ghost-paths';
const {$} = Ember;
let Ghost = ghostPaths();
let UploadUi = function ($dropzone, settings) {
let $url = '<div class="js-url"><input placeholder="http://" type="url" class="url js-upload-url gh-input"></div>';
let $cancel = '<a title="Delete" class="image-cancel icon-trash js-cancel"><span class="hidden">Delete</span></a>';
let $progress = $('<div>', {
class: 'js-upload-progress progress progress-success active',
role: 'progressbar',
'aria-valuemin': '0',
'aria-valuemax': '100'
}).append($('<div>', {
class: 'js-upload-progress-bar bar',
style: 'width:0%'
}));
$.extend(this, {
complete: (result) => {</div></div>
initialize: function (container, application) {
application.register('ghost:paths', ghostPaths(), {instantiate: false});
application.inject('route', 'ghostPaths', 'ghost:paths');
application.inject('model', 'ghostPaths', 'ghost:paths');
application.inject('controller', 'ghostPaths', 'ghost:paths');
}
};