mirror of
https://github.com/TryGhost/Ghost-Admin.git
synced 2023-12-14 02:33:04 +01:00
Ember init, bower deps, es6 modules
This commit is contained in:
parent
6bbc62d3c2
commit
55472b143f
165 changed files with 516 additions and 43 deletions
9
.ember-cli
Normal file
9
.ember-cli
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
Ember CLI sends analytics information by default. The data is completely
|
||||||
|
anonymous, but there are times when you might want to disable this behavior.
|
||||||
|
|
||||||
|
Setting `disableAnalytics` to true will prevent any data from being sent.
|
||||||
|
*/
|
||||||
|
"disableAnalytics": false
|
||||||
|
}
|
67
.jshintrc
67
.jshintrc
|
@ -1,33 +1,38 @@
|
||||||
{
|
{
|
||||||
"node": false,
|
"predef": [
|
||||||
"browser": true,
|
"document",
|
||||||
"bitwise": true,
|
"window",
|
||||||
"curly": true,
|
"-Promise",
|
||||||
"eqeqeq": true,
|
"$",
|
||||||
"forin": true,
|
"validator",
|
||||||
"immed": true,
|
"ic",
|
||||||
"latedef": true,
|
"SimpleAuth",
|
||||||
"newcap": true,
|
"NProgress",
|
||||||
"noarg": true,
|
"moment"
|
||||||
"noempty": true,
|
],
|
||||||
"nonew": true,
|
"browser": true,
|
||||||
"plusplus": true,
|
"boss": true,
|
||||||
"regexp": true,
|
"curly": true,
|
||||||
"undef": true,
|
"debug": false,
|
||||||
"unused": true,
|
"devel": true,
|
||||||
"indent": 4,
|
"eqeqeq": true,
|
||||||
"esnext": true,
|
"evil": true,
|
||||||
"quotmark": "single",
|
"forin": false,
|
||||||
"globals": {
|
"immed": false,
|
||||||
"Ember": true,
|
"laxbreak": false,
|
||||||
"Em": true,
|
"newcap": true,
|
||||||
"DS": true,
|
"noarg": true,
|
||||||
"$": true,
|
"noempty": false,
|
||||||
"SimpleAuth": true,
|
"nonew": false,
|
||||||
"validator": true,
|
"nomen": false,
|
||||||
"ic": true,
|
"onevar": false,
|
||||||
"NProgress": true,
|
"plusplus": false,
|
||||||
"moment": true
|
"regexp": false,
|
||||||
},
|
"undef": true,
|
||||||
"predef": ["-Notification"]
|
"sub": true,
|
||||||
|
"strict": false,
|
||||||
|
"white": false,
|
||||||
|
"eqnull": true,
|
||||||
|
"esnext": true,
|
||||||
|
"unused": true
|
||||||
}
|
}
|
||||||
|
|
38
Brocfile.js
Normal file
38
Brocfile.js
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/* global require, module */
|
||||||
|
|
||||||
|
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||||
|
|
||||||
|
var app = new EmberApp(
|
||||||
|
{
|
||||||
|
sourcemaps: {enabled: false} //see https://github.com/ember-cli/ember-cli/issues/2912
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
app.import('bower_components/loader.js/loader.js');
|
||||||
|
app.import('bower_components/jquery/dist/jquery.js');
|
||||||
|
app.import('bower_components/ic-ajax/dist/globals/main.js');
|
||||||
|
app.import('bower_components/ember-load-initializers/ember-load-initializers.js');
|
||||||
|
app.import('bower_components/validator-js/validator.js');
|
||||||
|
app.import('bower_components/codemirror/lib/codemirror.js');
|
||||||
|
app.import('bower_components/codemirror/addon/mode/overlay.js');
|
||||||
|
app.import('bower_components/codemirror/mode/markdown/markdown.js');
|
||||||
|
app.import('bower_components/codemirror/mode/gfm/gfm.js');
|
||||||
|
app.import('bower_components/showdown-ghost/src/showdown.js');
|
||||||
|
app.import('bower_components/moment/moment.js');
|
||||||
|
app.import('bower_components/keymaster/keymaster.js');
|
||||||
|
app.import('bower_components/device/lib/device.js');
|
||||||
|
app.import('bower_components/jquery-ui/ui/jquery-ui.js');
|
||||||
|
app.import('bower_components/jquery-file-upload/js/jquery.fileupload.js');
|
||||||
|
app.import('bower_components/fastclick/lib/fastclick.js');
|
||||||
|
app.import('bower_components/nprogress/nprogress.js');
|
||||||
|
app.import('bower_components/ember-simple-auth/simple-auth.js');
|
||||||
|
app.import('bower_components/ember-simple-auth/simple-auth-oauth2.js');
|
||||||
|
app.import('bower_components/google-caja/html-css-sanitizer-bundle.js');
|
||||||
|
app.import('bower_components/nanoscroller/bin/javascripts/jquery.nanoscroller.js');
|
||||||
|
|
||||||
|
app.import('vendor/showdown/extensions/ghostgfm.js');
|
||||||
|
app.import('vendor/showdown/extensions/ghostimagepreview.js');
|
||||||
|
app.import('vendor/showdown/extensions/ghostfootnotes.js');
|
||||||
|
app.import('vendor/showdown/extensions/ghosthighlight.js');
|
||||||
|
|
||||||
|
module.exports = app.toTree();
|
|
@ -1,3 +1,4 @@
|
||||||
|
import DS from 'ember-data';
|
||||||
import ghostPaths from 'ghost/utils/ghost-paths';
|
import ghostPaths from 'ghost/utils/ghost-paths';
|
||||||
|
|
||||||
var BaseAdapter = DS.RESTAdapter.extend({
|
var BaseAdapter = DS.RESTAdapter.extend({
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import BaseAdapter from 'ghost/adapters/base';
|
import BaseAdapter from 'ghost/adapters/base';
|
||||||
|
|
||||||
// EmbeddedRelationAdapter will augment the query object in calls made to
|
// EmbeddedRelationAdapter will augment the query object in calls made to
|
||||||
|
|
11
app/app.js
11
app/app.js
|
@ -1,19 +1,20 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import Resolver from 'ember/resolver';
|
import Resolver from 'ember/resolver';
|
||||||
import loadInitializers from 'ember/load-initializers';
|
import loadInitializers from 'ember/load-initializers';
|
||||||
import 'ghost/utils/link-view';
|
import 'ghost/utils/link-view';
|
||||||
import 'ghost/utils/text-field';
|
import 'ghost/utils/text-field';
|
||||||
import configureApp from 'ghost/config';
|
import configureApp from 'ghost/config';
|
||||||
|
import config from './config/environment';
|
||||||
|
|
||||||
Ember.MODEL_FACTORY_INJECTIONS = true;
|
Ember.MODEL_FACTORY_INJECTIONS = true;
|
||||||
|
|
||||||
var App = Ember.Application.extend({
|
var App = Ember.Application.extend({
|
||||||
modulePrefix: 'ghost',
|
modulePrefix: config.modulePrefix,
|
||||||
Resolver: Resolver.default
|
podModulePrefix: config.podModulePrefix,
|
||||||
|
Resolver: Resolver
|
||||||
});
|
});
|
||||||
|
|
||||||
// Runtime configuration of Ember.Application
|
|
||||||
configureApp(App);
|
configureApp(App);
|
||||||
|
|
||||||
loadInitializers(App, 'ghost');
|
loadInitializers(App, config.modulePrefix);
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var ActivatingListItem = Ember.Component.extend({
|
var ActivatingListItem = Ember.Component.extend({
|
||||||
tagName: 'li',
|
tagName: 'li',
|
||||||
classNameBindings: ['active'],
|
classNameBindings: ['active'],
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/*global CodeMirror */
|
/*global CodeMirror */
|
||||||
|
|
||||||
import MarkerManager from 'ghost/mixins/marker-manager';
|
import MarkerManager from 'ghost/mixins/marker-manager';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import DropdownMixin from 'ghost/mixins/dropdown-mixin';
|
import DropdownMixin from 'ghost/mixins/dropdown-mixin';
|
||||||
|
|
||||||
var DropdownButton = Ember.Component.extend(DropdownMixin, {
|
var DropdownButton = Ember.Component.extend(DropdownMixin, {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import DropdownMixin from 'ghost/mixins/dropdown-mixin';
|
import DropdownMixin from 'ghost/mixins/dropdown-mixin';
|
||||||
|
|
||||||
var GhostDropdown = Ember.Component.extend(DropdownMixin, {
|
var GhostDropdown = Ember.Component.extend(DropdownMixin, {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var FileUpload = Ember.Component.extend({
|
var FileUpload = Ember.Component.extend({
|
||||||
_file: null,
|
_file: null,
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var Form = Ember.View.extend({
|
var Form = Ember.View.extend({
|
||||||
tagName: 'form',
|
tagName: 'form',
|
||||||
attributeBindings: ['enctype'],
|
attributeBindings: ['enctype'],
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import TextInputMixin from 'ghost/mixins/text-input';
|
import TextInputMixin from 'ghost/mixins/text-input';
|
||||||
|
|
||||||
var Input = Ember.TextField.extend(TextInputMixin);
|
var Input = Ember.TextField.extend(TextInputMixin);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import uploader from 'ghost/assets/lib/uploader';
|
import uploader from 'ghost/assets/lib/uploader';
|
||||||
|
|
||||||
var Markdown = Ember.Component.extend({
|
var Markdown = Ember.Component.extend({
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var ModalDialog = Ember.Component.extend({
|
var ModalDialog = Ember.Component.extend({
|
||||||
didInsertElement: function () {
|
didInsertElement: function () {
|
||||||
this.$('.js-modal-container, .js-modal-background').addClass('fade-in open');
|
this.$('.js-modal-container, .js-modal-background').addClass('fade-in open');
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
function joinUrlParts(url, path) {
|
function joinUrlParts(url, path) {
|
||||||
if (path[0] !== '/' && url.slice(-1) !== '/') {
|
if (path[0] !== '/' && url.slice(-1) !== '/') {
|
||||||
path = '/' + path;
|
path = '/' + path;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var NavItemComponent = Ember.Component.extend({
|
var NavItemComponent = Ember.Component.extend({
|
||||||
classNames: 'navigation-item',
|
classNames: 'navigation-item',
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
var NotificationComponent = Ember.Component.extend({
|
var NotificationComponent = Ember.Component.extend({
|
||||||
classNames: ['js-bb-notification'],
|
classNames: ['js-bb-notification'],
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var NotificationsComponent = Ember.Component.extend({
|
var NotificationsComponent = Ember.Component.extend({
|
||||||
tagName: 'aside',
|
tagName: 'aside',
|
||||||
classNames: 'notifications',
|
classNames: 'notifications',
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import DropdownButton from 'ghost/components/gh-dropdown-button';
|
import DropdownButton from 'ghost/components/gh-dropdown-button';
|
||||||
|
|
||||||
var PopoverButton = DropdownButton.extend({
|
var PopoverButton = DropdownButton.extend({
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import GhostSelect from 'ghost/components/gh-select';
|
import GhostSelect from 'ghost/components/gh-select';
|
||||||
|
|
||||||
var RolesSelector = GhostSelect.extend({
|
var RolesSelector = GhostSelect.extend({
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
// GhostSelect is a solution to Ember.Select being evil and worthless.
|
// GhostSelect is a solution to Ember.Select being evil and worthless.
|
||||||
// (Namely, this solves problems with async data in Ember.Select)
|
// (Namely, this solves problems with async data in Ember.Select)
|
||||||
// Inspired by (that is, totally ripped off from) this JSBin
|
// Inspired by (that is, totally ripped off from) this JSBin
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
// See gh-tabs-manager.js for use
|
// See gh-tabs-manager.js for use
|
||||||
var TabPane = Ember.Component.extend({
|
var TabPane = Ember.Component.extend({
|
||||||
classNameBindings: ['active'],
|
classNameBindings: ['active'],
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
// See gh-tabs-manager.js for use
|
// See gh-tabs-manager.js for use
|
||||||
var Tab = Ember.Component.extend({
|
var Tab = Ember.Component.extend({
|
||||||
tabsManager: Ember.computed(function () {
|
tabsManager: Ember.computed(function () {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/**
|
/**
|
||||||
Heavily inspired by ic-tabs (https://github.com/instructure/ic-tabs)
|
Heavily inspired by ic-tabs (https://github.com/instructure/ic-tabs)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import TextInputMixin from 'ghost/mixins/text-input';
|
import TextInputMixin from 'ghost/mixins/text-input';
|
||||||
|
|
||||||
var TextArea = Ember.TextArea.extend(TextInputMixin);
|
var TextArea = Ember.TextArea.extend(TextInputMixin);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/*global device*/
|
/*global device*/
|
||||||
var TrimFocusInput = Ember.TextField.extend({
|
var TrimFocusInput = Ember.TextField.extend({
|
||||||
focus: true,
|
focus: true,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import uploader from 'ghost/assets/lib/uploader';
|
import uploader from 'ghost/assets/lib/uploader';
|
||||||
|
|
||||||
var PostImageUploader = Ember.Component.extend({
|
var PostImageUploader = Ember.Component.extend({
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/*
|
/*
|
||||||
Example usage:
|
Example usage:
|
||||||
{{gh-url-preview prefix="tag" slug=theSlugValue tagName="p" classNames="description"}}
|
{{gh-url-preview prefix="tag" slug=theSlugValue tagName="p" classNames="description"}}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
function configureApp(App) {
|
function configureApp(App) {
|
||||||
if (!App instanceof Ember.Application) {
|
if (!App instanceof Ember.Application) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
function configureApp(App) {
|
function configureApp(App) {
|
||||||
if (!App instanceof Ember.Application) {
|
if (!App instanceof Ember.Application) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var ApplicationController = Ember.Controller.extend({
|
var ApplicationController = Ember.Controller.extend({
|
||||||
// jscs: disable
|
// jscs: disable
|
||||||
hideNav: Ember.computed.match('currentPath', /(error|signin|signup|setup|forgotten|reset)/),
|
hideNav: Ember.computed.match('currentPath', /(error|signin|signup|setup|forgotten|reset)/),
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
|
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
|
||||||
|
|
||||||
var EditorEditController = Ember.Controller.extend(EditorControllerMixin);
|
var EditorEditController = Ember.Controller.extend(EditorControllerMixin);
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
|
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
|
||||||
|
|
||||||
var EditorNewController = Ember.Controller.extend(EditorControllerMixin, {
|
var EditorNewController = Ember.Controller.extend(EditorControllerMixin, {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var ErrorController = Ember.Controller.extend({
|
var ErrorController = Ember.Controller.extend({
|
||||||
code: Ember.computed('content.status', function () {
|
code: Ember.computed('content.status', function () {
|
||||||
return this.get('content.status') > 200 ? this.get('content.status') : 500;
|
return this.get('content.status') > 200 ? this.get('content.status') : 500;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var FeatureController = Ember.Controller.extend(Ember.PromiseProxyMixin, {
|
var FeatureController = Ember.Controller.extend(Ember.PromiseProxyMixin, {
|
||||||
init: function () {
|
init: function () {
|
||||||
var promise;
|
var promise;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import ajax from 'ghost/utils/ajax';
|
import ajax from 'ghost/utils/ajax';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var CopyHTMLController = Ember.Controller.extend({
|
var CopyHTMLController = Ember.Controller.extend({
|
||||||
|
|
||||||
generatedHTML: Ember.computed.alias('model.generatedHTML')
|
generatedHTML: Ember.computed.alias('model.generatedHTML')
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var DeleteAllController = Ember.Controller.extend({
|
var DeleteAllController = Ember.Controller.extend({
|
||||||
actions: {
|
actions: {
|
||||||
confirmAccept: function () {
|
confirmAccept: function () {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var DeletePostController = Ember.Controller.extend({
|
var DeletePostController = Ember.Controller.extend({
|
||||||
actions: {
|
actions: {
|
||||||
confirmAccept: function () {
|
confirmAccept: function () {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var DeleteTagController = Ember.Controller.extend({
|
var DeleteTagController = Ember.Controller.extend({
|
||||||
postInflection: Ember.computed('model.post_count', function () {
|
postInflection: Ember.computed('model.post_count', function () {
|
||||||
return this.get('model.post_count') > 1 ? 'posts' : 'post';
|
return this.get('model.post_count') > 1 ? 'posts' : 'post';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var DeleteUserController = Ember.Controller.extend({
|
var DeleteUserController = Ember.Controller.extend({
|
||||||
userPostCount: Ember.computed('model.id', function () {
|
userPostCount: Ember.computed('model.id', function () {
|
||||||
var promise,
|
var promise,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var InviteNewUserController = Ember.Controller.extend({
|
var InviteNewUserController = Ember.Controller.extend({
|
||||||
// Used to set the initial value for the dropdown
|
// Used to set the initial value for the dropdown
|
||||||
authorRole: Ember.computed(function () {
|
authorRole: Ember.computed(function () {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var LeaveEditorController = Ember.Controller.extend({
|
var LeaveEditorController = Ember.Controller.extend({
|
||||||
args: Ember.computed.alias('model'),
|
args: Ember.computed.alias('model'),
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
|
|
||||||
export default Ember.Controller.extend(SimpleAuth.AuthenticationControllerMixin, ValidationEngine, {
|
export default Ember.Controller.extend(SimpleAuth.AuthenticationControllerMixin, ValidationEngine, {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var TransferOwnerController = Ember.Controller.extend({
|
var TransferOwnerController = Ember.Controller.extend({
|
||||||
actions: {
|
actions: {
|
||||||
confirmAccept: function () {
|
confirmAccept: function () {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
var UploadController = Ember.Controller.extend({
|
var UploadController = Ember.Controller.extend({
|
||||||
acceptEncoding: 'image/*',
|
acceptEncoding: 'image/*',
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/* global moment */
|
/* global moment */
|
||||||
import {parseDateString, formatDate} from 'ghost/utils/date-formatting';
|
import {parseDateString, formatDate} from 'ghost/utils/date-formatting';
|
||||||
import SettingsMenuMixin from 'ghost/mixins/settings-menu-controller';
|
import SettingsMenuMixin from 'ghost/mixins/settings-menu-controller';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var PostTagsInputController = Ember.Controller.extend({
|
var PostTagsInputController = Ember.Controller.extend({
|
||||||
tagEnteredOrder: Ember.A(),
|
tagEnteredOrder: Ember.A(),
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import PaginationControllerMixin from 'ghost/mixins/pagination-controller';
|
import PaginationControllerMixin from 'ghost/mixins/pagination-controller';
|
||||||
|
|
||||||
function publishedAtCompare(item1, item2) {
|
function publishedAtCompare(item1, item2) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var PostController = Ember.Controller.extend({
|
var PostController = Ember.Controller.extend({
|
||||||
isPublished: Ember.computed.equal('model.status', 'published'),
|
isPublished: Ember.computed.equal('model.status', 'published'),
|
||||||
classNameBindings: ['model.featured'],
|
classNameBindings: ['model.featured'],
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import ajax from 'ghost/utils/ajax';
|
import ajax from 'ghost/utils/ajax';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var SettingsController = Ember.Controller.extend({
|
var SettingsController = Ember.Controller.extend({
|
||||||
needs: ['feature'],
|
needs: ['feature'],
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/*global alert */
|
/*global alert */
|
||||||
|
|
||||||
var appStates,
|
var appStates,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var SettingsCodeInjectionController = Ember.Controller.extend({
|
var SettingsCodeInjectionController = Ember.Controller.extend({
|
||||||
actions: {
|
actions: {
|
||||||
save: function () {
|
save: function () {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var SettingsGeneralController = Ember.Controller.extend({
|
var SettingsGeneralController = Ember.Controller.extend({
|
||||||
selectedTheme: null,
|
selectedTheme: null,
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var LabsController = Ember.Controller.extend(Ember.Evented, {
|
var LabsController = Ember.Controller.extend(Ember.Evented, {
|
||||||
needs: ['feature'],
|
needs: ['feature'],
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var NavigationController,
|
var NavigationController,
|
||||||
NavItem;
|
NavItem;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import PaginationMixin from 'ghost/mixins/pagination-controller';
|
import PaginationMixin from 'ghost/mixins/pagination-controller';
|
||||||
import SettingsMenuMixin from 'ghost/mixins/settings-menu-controller';
|
import SettingsMenuMixin from 'ghost/mixins/settings-menu-controller';
|
||||||
import boundOneWay from 'ghost/utils/bound-one-way';
|
import boundOneWay from 'ghost/utils/bound-one-way';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import PaginationControllerMixin from 'ghost/mixins/pagination-controller';
|
import PaginationControllerMixin from 'ghost/mixins/pagination-controller';
|
||||||
|
|
||||||
var UsersIndexController = Ember.ArrayController.extend(PaginationControllerMixin, {
|
var UsersIndexController = Ember.ArrayController.extend(PaginationControllerMixin, {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import SlugGenerator from 'ghost/models/slug-generator';
|
import SlugGenerator from 'ghost/models/slug-generator';
|
||||||
import isNumber from 'ghost/utils/isNumber';
|
import isNumber from 'ghost/utils/isNumber';
|
||||||
import boundOneWay from 'ghost/utils/bound-one-way';
|
import boundOneWay from 'ghost/utils/bound-one-way';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import ajax from 'ghost/utils/ajax';
|
import ajax from 'ghost/utils/ajax';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
|
|
||||||
var SigninController = Ember.Controller.extend(SimpleAuth.AuthenticationControllerMixin, ValidationEngine, {
|
var SigninController = Ember.Controller.extend(SimpleAuth.AuthenticationControllerMixin, ValidationEngine, {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import ajax from 'ghost/utils/ajax';
|
import ajax from 'ghost/utils/ajax';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var blogUrl = Ember.HTMLBars.makeBoundHelper(function () {
|
var blogUrl = Ember.HTMLBars.makeBoundHelper(function () {
|
||||||
return Ember.String.htmlSafe(this.get('config.blogUrl'));
|
return Ember.String.htmlSafe(this.get('config.blogUrl'));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var countCharacters = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
var countCharacters = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
||||||
var el = document.createElement('span'),
|
var el = document.createElement('span'),
|
||||||
length,
|
length,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var countDownCharacters = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
var countDownCharacters = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
||||||
var el = document.createElement('span'),
|
var el = document.createElement('span'),
|
||||||
content,
|
content,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import counter from 'ghost/utils/word-count';
|
import counter from 'ghost/utils/word-count';
|
||||||
|
|
||||||
var countWords = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
var countWords = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/* global html_sanitize*/
|
/* global html_sanitize*/
|
||||||
import cajaSanitizers from 'ghost/utils/caja-sanitizers';
|
import cajaSanitizers from 'ghost/utils/caja-sanitizers';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/* global Showdown, html_sanitize*/
|
/* global Showdown, html_sanitize*/
|
||||||
import cajaSanitizers from 'ghost/utils/caja-sanitizers';
|
import cajaSanitizers from 'ghost/utils/caja-sanitizers';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var formatTimeago = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
var formatTimeago = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
||||||
if (!arr || !arr.length) {
|
if (!arr || !arr.length) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
// Handlebars Helper {{gh-path}}
|
// Handlebars Helper {{gh-path}}
|
||||||
// Usage: Assume 'http://www.myghostblog.org/myblog/'
|
// Usage: Assume 'http://www.myghostblog.org/myblog/'
|
||||||
// {{gh-path}} or {{gh-path ‘blog’}} for Ghost’s root (/myblog/)
|
// {{gh-path}} or {{gh-path ‘blog’}} for Ghost’s root (/myblog/)
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
<title>Ghost Admin</title>
|
<title>Ghost Admin</title>
|
||||||
|
|
||||||
|
{{content-for 'head'}}
|
||||||
|
|
||||||
<meta name="HandheldFriendly" content="True" />
|
<meta name="HandheldFriendly" content="True" />
|
||||||
<meta name="MobileOptimized" content="320" />
|
<meta name="MobileOptimized" content="320" />
|
||||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1, minimal-ui" />
|
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1, minimal-ui" />
|
||||||
|
@ -36,11 +38,19 @@
|
||||||
{{#unless skip_google_fonts}}
|
{{#unless skip_google_fonts}}
|
||||||
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700" />
|
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700" />
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<link rel="stylesheet" href="{{asset "css/ghost.min.css" ghost="true"}}" />
|
|
||||||
|
<link rel="stylesheet" href="{{asset "css/vendor.css" ghost="true"}}" />
|
||||||
|
<link rel="stylesheet" href="{{asset "css/ghost.css" ghost="true"}}" />
|
||||||
|
{{content-for 'head-footer'}}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
{{content-for 'body'}}
|
||||||
|
|
||||||
{{{ghost_script_tags}}}
|
{{{ghost_script_tags}}}
|
||||||
|
<script src="assets/vendor.js"></script>
|
||||||
|
<script src="assets/ghost.js"></script>
|
||||||
|
|
||||||
|
{{content-for 'body-footer'}}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import ghostPaths from 'ghost/utils/ghost-paths';
|
import ghostPaths from 'ghost/utils/ghost-paths';
|
||||||
|
|
||||||
var Ghost,
|
var Ghost,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/*global Ember */
|
/*global Ember */
|
||||||
|
|
||||||
var trailingHistory,
|
var trailingHistory,
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
// Loader to create the Ember.js application
|
|
||||||
/*global require */
|
|
||||||
|
|
||||||
if (!window.disableBoot) {
|
|
||||||
window.App = require('ghost/app').default.create();
|
|
||||||
}
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
// Code modified from Addepar/ember-widgets
|
// Code modified from Addepar/ember-widgets
|
||||||
// https://github.com/Addepar/ember-widgets/blob/master/src/mixins.coffee#L39
|
// https://github.com/Addepar/ember-widgets/blob/master/src/mixins.coffee#L39
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var CurrentUserSettings = Ember.Mixin.create({
|
var CurrentUserSettings = Ember.Mixin.create({
|
||||||
currentUser: function () {
|
currentUser: function () {
|
||||||
return this.store.find('user', 'me');
|
return this.store.find('user', 'me');
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/*
|
/*
|
||||||
Dropdowns and their buttons are evented and do not propagate clicks.
|
Dropdowns and their buttons are evented and do not propagate clicks.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/* global console */
|
/* global console */
|
||||||
import MarkerManager from 'ghost/mixins/marker-manager';
|
import MarkerManager from 'ghost/mixins/marker-manager';
|
||||||
import PostModel from 'ghost/models/post';
|
import PostModel from 'ghost/models/post';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import ShortcutsRoute from 'ghost/mixins/shortcuts-route';
|
import ShortcutsRoute from 'ghost/mixins/shortcuts-route';
|
||||||
import styleBody from 'ghost/mixins/style-body';
|
import styleBody from 'ghost/mixins/style-body';
|
||||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import setScrollClassName from 'ghost/utils/set-scroll-classname';
|
import setScrollClassName from 'ghost/utils/set-scroll-classname';
|
||||||
|
|
||||||
var EditorViewMixin = Ember.Mixin.create({
|
var EditorViewMixin = Ember.Mixin.create({
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
// mixin used for routes to display a loading indicator when there is network activity
|
// mixin used for routes to display a loading indicator when there is network activity
|
||||||
var loaderOptions,
|
var loaderOptions,
|
||||||
loadingIndicator;
|
loadingIndicator;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var MarkerManager = Ember.Mixin.create({
|
var MarkerManager = Ember.Mixin.create({
|
||||||
imageMarkdownRegex: /^(?:\{<(.*?)>\})?!(?:\[([^\n\]]*)\])(?:\(([^\n\]]*)\))?$/gim,
|
imageMarkdownRegex: /^(?:\{<(.*?)>\})?!(?:\[([^\n\]]*)\])(?:\(([^\n\]]*)\))?$/gim,
|
||||||
markerRegex: /\{<([\w\W]*?)>\}/,
|
markerRegex: /\{<([\w\W]*?)>\}/,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var NProgressSaveMixin = Ember.Mixin.create({
|
var NProgressSaveMixin = Ember.Mixin.create({
|
||||||
save: function (options) {
|
save: function (options) {
|
||||||
if (options && options.disableNProgress) {
|
if (options && options.disableNProgress) {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
import { getRequestErrorMessage } from 'ghost/utils/ajax';
|
import { getRequestErrorMessage } from 'ghost/utils/ajax';
|
||||||
|
|
||||||
var PaginationControllerMixin = Ember.Mixin.create({
|
var PaginationControllerMixin = Ember.Mixin.create({
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var defaultPaginationSettings,
|
var defaultPaginationSettings,
|
||||||
PaginationRoute;
|
PaginationRoute;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var PaginationViewInfiniteScrollMixin = Ember.Mixin.create({
|
var PaginationViewInfiniteScrollMixin = Ember.Mixin.create({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
// SelectiveSaveMixin adds a saveOnly method to a DS.Model.
|
// SelectiveSaveMixin adds a saveOnly method to a DS.Model.
|
||||||
//
|
//
|
||||||
// saveOnly provides a way to save one or more properties of a model while
|
// saveOnly provides a way to save one or more properties of a model while
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var SettingsMenuControllerMixin = Ember.Mixin.create({
|
var SettingsMenuControllerMixin = Ember.Mixin.create({
|
||||||
needs: 'application',
|
needs: 'application',
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
/* global key */
|
/* global key */
|
||||||
|
|
||||||
// Configure KeyMaster to respond to all shortcuts,
|
// Configure KeyMaster to respond to all shortcuts,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
// mixin used for routes that need to set a css className on the body tag
|
// mixin used for routes that need to set a css className on the body tag
|
||||||
|
|
||||||
var styleBody = Ember.Mixin.create({
|
var styleBody = Ember.Mixin.create({
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var BlurField = Ember.Mixin.create({
|
var BlurField = Ember.Mixin.create({
|
||||||
selectOnClick: false,
|
selectOnClick: false,
|
||||||
stopEnterKeyDownPropagation: false,
|
stopEnterKeyDownPropagation: false,
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
import DS from 'ember-data';
|
||||||
import {getRequestErrorMessage} from 'ghost/utils/ajax';
|
import {getRequestErrorMessage} from 'ghost/utils/ajax';
|
||||||
|
|
||||||
import ValidatorExtensions from 'ghost/utils/validator-extensions';
|
import ValidatorExtensions from 'ghost/utils/validator-extensions';
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import DS from 'ember-data';
|
||||||
var Notification = DS.Model.extend({
|
var Notification = DS.Model.extend({
|
||||||
dismissible: DS.attr('boolean'),
|
dismissible: DS.attr('boolean'),
|
||||||
location: DS.attr('string'),
|
location: DS.attr('string'),
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
import DS from 'ember-data';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
import NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
import NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import Ember from 'ember';
|
||||||
|
import DS from 'ember-data';
|
||||||
var Role = DS.Model.extend({
|
var Role = DS.Model.extend({
|
||||||
uuid: DS.attr('string'),
|
uuid: DS.attr('string'),
|
||||||
name: DS.attr('string'),
|
name: DS.attr('string'),
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import DS from 'ember-data';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
import NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
import NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import Ember from 'ember';
|
||||||
var SlugGenerator = Ember.Object.extend({
|
var SlugGenerator = Ember.Object.extend({
|
||||||
ghostPaths: null,
|
ghostPaths: null,
|
||||||
slugType: null,
|
slugType: null,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import DS from 'ember-data';
|
||||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||||
import NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
import NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue