mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 03:42:27 +03:00
Ember init, bower deps, es6 modules
This commit is contained in:
parent
589a563b30
commit
6d80907c99
9
ghost/admin/.ember-cli
Normal file
9
ghost/admin/.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
|
||||
}
|
@ -1,33 +1,38 @@
|
||||
{
|
||||
"node": false,
|
||||
"browser": true,
|
||||
"bitwise": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"forin": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonew": true,
|
||||
"plusplus": true,
|
||||
"regexp": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"indent": 4,
|
||||
"esnext": true,
|
||||
"quotmark": "single",
|
||||
"globals": {
|
||||
"Ember": true,
|
||||
"Em": true,
|
||||
"DS": true,
|
||||
"$": true,
|
||||
"SimpleAuth": true,
|
||||
"validator": true,
|
||||
"ic": true,
|
||||
"NProgress": true,
|
||||
"moment": true
|
||||
},
|
||||
"predef": ["-Notification"]
|
||||
"predef": [
|
||||
"document",
|
||||
"window",
|
||||
"-Promise",
|
||||
"$",
|
||||
"validator",
|
||||
"ic",
|
||||
"SimpleAuth",
|
||||
"NProgress",
|
||||
"moment"
|
||||
],
|
||||
"browser": true,
|
||||
"boss": true,
|
||||
"curly": true,
|
||||
"debug": false,
|
||||
"devel": true,
|
||||
"eqeqeq": true,
|
||||
"evil": true,
|
||||
"forin": false,
|
||||
"immed": false,
|
||||
"laxbreak": false,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": false,
|
||||
"nonew": false,
|
||||
"nomen": false,
|
||||
"onevar": false,
|
||||
"plusplus": false,
|
||||
"regexp": false,
|
||||
"undef": true,
|
||||
"sub": true,
|
||||
"strict": false,
|
||||
"white": false,
|
||||
"eqnull": true,
|
||||
"esnext": true,
|
||||
"unused": true
|
||||
}
|
||||
|
38
ghost/admin/Brocfile.js
Normal file
38
ghost/admin/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';
|
||||
|
||||
var BaseAdapter = DS.RESTAdapter.extend({
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import BaseAdapter from 'ghost/adapters/base';
|
||||
|
||||
// EmbeddedRelationAdapter will augment the query object in calls made to
|
||||
|
@ -1,19 +1,20 @@
|
||||
import Ember from 'ember';
|
||||
import Resolver from 'ember/resolver';
|
||||
import loadInitializers from 'ember/load-initializers';
|
||||
import 'ghost/utils/link-view';
|
||||
import 'ghost/utils/text-field';
|
||||
import configureApp from 'ghost/config';
|
||||
import config from './config/environment';
|
||||
|
||||
Ember.MODEL_FACTORY_INJECTIONS = true;
|
||||
|
||||
var App = Ember.Application.extend({
|
||||
modulePrefix: 'ghost',
|
||||
Resolver: Resolver.default
|
||||
modulePrefix: config.modulePrefix,
|
||||
podModulePrefix: config.podModulePrefix,
|
||||
Resolver: Resolver
|
||||
});
|
||||
|
||||
// Runtime configuration of Ember.Application
|
||||
configureApp(App);
|
||||
|
||||
loadInitializers(App, 'ghost');
|
||||
loadInitializers(App, config.modulePrefix);
|
||||
|
||||
export default App;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var ActivatingListItem = Ember.Component.extend({
|
||||
tagName: 'li',
|
||||
classNameBindings: ['active'],
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/*global CodeMirror */
|
||||
|
||||
import MarkerManager from 'ghost/mixins/marker-manager';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import DropdownMixin from 'ghost/mixins/dropdown-mixin';
|
||||
|
||||
var DropdownButton = Ember.Component.extend(DropdownMixin, {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import DropdownMixin from 'ghost/mixins/dropdown-mixin';
|
||||
|
||||
var GhostDropdown = Ember.Component.extend(DropdownMixin, {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var FileUpload = Ember.Component.extend({
|
||||
_file: null,
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var Form = Ember.View.extend({
|
||||
tagName: 'form',
|
||||
attributeBindings: ['enctype'],
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import TextInputMixin from 'ghost/mixins/text-input';
|
||||
|
||||
var Input = Ember.TextField.extend(TextInputMixin);
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import uploader from 'ghost/assets/lib/uploader';
|
||||
|
||||
var Markdown = Ember.Component.extend({
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var ModalDialog = Ember.Component.extend({
|
||||
didInsertElement: function () {
|
||||
this.$('.js-modal-container, .js-modal-background').addClass('fade-in open');
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
function joinUrlParts(url, path) {
|
||||
if (path[0] !== '/' && url.slice(-1) !== '/') {
|
||||
path = '/' + path;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var NavItemComponent = Ember.Component.extend({
|
||||
classNames: 'navigation-item',
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
var NotificationComponent = Ember.Component.extend({
|
||||
classNames: ['js-bb-notification'],
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var NotificationsComponent = Ember.Component.extend({
|
||||
tagName: 'aside',
|
||||
classNames: 'notifications',
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import DropdownButton from 'ghost/components/gh-dropdown-button';
|
||||
|
||||
var PopoverButton = DropdownButton.extend({
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import GhostSelect from 'ghost/components/gh-select';
|
||||
|
||||
var RolesSelector = GhostSelect.extend({
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
// GhostSelect is a solution to Ember.Select being evil and worthless.
|
||||
// (Namely, this solves problems with async data in Ember.Select)
|
||||
// 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
|
||||
var TabPane = Ember.Component.extend({
|
||||
classNameBindings: ['active'],
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
// See gh-tabs-manager.js for use
|
||||
var Tab = Ember.Component.extend({
|
||||
tabsManager: Ember.computed(function () {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/**
|
||||
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';
|
||||
|
||||
var TextArea = Ember.TextArea.extend(TextInputMixin);
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/*global device*/
|
||||
var TrimFocusInput = Ember.TextField.extend({
|
||||
focus: true,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import uploader from 'ghost/assets/lib/uploader';
|
||||
|
||||
var PostImageUploader = Ember.Component.extend({
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/*
|
||||
Example usage:
|
||||
{{gh-url-preview prefix="tag" slug=theSlugValue tagName="p" classNames="description"}}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
function configureApp(App) {
|
||||
if (!App instanceof Ember.Application) {
|
||||
return;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
function configureApp(App) {
|
||||
if (!App instanceof Ember.Application) {
|
||||
return;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var ApplicationController = Ember.Controller.extend({
|
||||
// jscs: disable
|
||||
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';
|
||||
|
||||
var EditorEditController = Ember.Controller.extend(EditorControllerMixin);
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
|
||||
|
||||
var EditorNewController = Ember.Controller.extend(EditorControllerMixin, {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var ErrorController = Ember.Controller.extend({
|
||||
code: Ember.computed('content.status', function () {
|
||||
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, {
|
||||
init: function () {
|
||||
var promise;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import ajax from 'ghost/utils/ajax';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var CopyHTMLController = Ember.Controller.extend({
|
||||
|
||||
generatedHTML: Ember.computed.alias('model.generatedHTML')
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var DeleteAllController = Ember.Controller.extend({
|
||||
actions: {
|
||||
confirmAccept: function () {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var DeletePostController = Ember.Controller.extend({
|
||||
actions: {
|
||||
confirmAccept: function () {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var DeleteTagController = Ember.Controller.extend({
|
||||
postInflection: Ember.computed('model.post_count', function () {
|
||||
return this.get('model.post_count') > 1 ? 'posts' : 'post';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var DeleteUserController = Ember.Controller.extend({
|
||||
userPostCount: Ember.computed('model.id', function () {
|
||||
var promise,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var InviteNewUserController = Ember.Controller.extend({
|
||||
// Used to set the initial value for the dropdown
|
||||
authorRole: Ember.computed(function () {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var LeaveEditorController = Ember.Controller.extend({
|
||||
args: Ember.computed.alias('model'),
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
export default Ember.Controller.extend(SimpleAuth.AuthenticationControllerMixin, ValidationEngine, {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var TransferOwnerController = Ember.Controller.extend({
|
||||
actions: {
|
||||
confirmAccept: function () {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
var UploadController = Ember.Controller.extend({
|
||||
acceptEncoding: 'image/*',
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/* global moment */
|
||||
import {parseDateString, formatDate} from 'ghost/utils/date-formatting';
|
||||
import SettingsMenuMixin from 'ghost/mixins/settings-menu-controller';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var PostTagsInputController = Ember.Controller.extend({
|
||||
tagEnteredOrder: Ember.A(),
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import PaginationControllerMixin from 'ghost/mixins/pagination-controller';
|
||||
|
||||
function publishedAtCompare(item1, item2) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var PostController = Ember.Controller.extend({
|
||||
isPublished: Ember.computed.equal('model.status', 'published'),
|
||||
classNameBindings: ['model.featured'],
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import ajax from 'ghost/utils/ajax';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var SettingsController = Ember.Controller.extend({
|
||||
needs: ['feature'],
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/*global alert */
|
||||
|
||||
var appStates,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var SettingsCodeInjectionController = Ember.Controller.extend({
|
||||
actions: {
|
||||
save: function () {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var SettingsGeneralController = Ember.Controller.extend({
|
||||
selectedTheme: null,
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var LabsController = Ember.Controller.extend(Ember.Evented, {
|
||||
needs: ['feature'],
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var NavigationController,
|
||||
NavItem;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import PaginationMixin from 'ghost/mixins/pagination-controller';
|
||||
import SettingsMenuMixin from 'ghost/mixins/settings-menu-controller';
|
||||
import boundOneWay from 'ghost/utils/bound-one-way';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import PaginationControllerMixin from 'ghost/mixins/pagination-controller';
|
||||
|
||||
var UsersIndexController = Ember.ArrayController.extend(PaginationControllerMixin, {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import SlugGenerator from 'ghost/models/slug-generator';
|
||||
import isNumber from 'ghost/utils/isNumber';
|
||||
import boundOneWay from 'ghost/utils/bound-one-way';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import ajax from 'ghost/utils/ajax';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
var SigninController = Ember.Controller.extend(SimpleAuth.AuthenticationControllerMixin, ValidationEngine, {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import ajax from 'ghost/utils/ajax';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var blogUrl = Ember.HTMLBars.makeBoundHelper(function () {
|
||||
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 el = document.createElement('span'),
|
||||
length,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var countDownCharacters = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
||||
var el = document.createElement('span'),
|
||||
content,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import counter from 'ghost/utils/word-count';
|
||||
|
||||
var countWords = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/* global html_sanitize*/
|
||||
import cajaSanitizers from 'ghost/utils/caja-sanitizers';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/* global Showdown, html_sanitize*/
|
||||
import cajaSanitizers from 'ghost/utils/caja-sanitizers';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var formatTimeago = Ember.HTMLBars.makeBoundHelper(function (arr /* hashParams */) {
|
||||
if (!arr || !arr.length) {
|
||||
return;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
// Handlebars Helper {{gh-path}}
|
||||
// Usage: Assume 'http://www.myghostblog.org/myblog/'
|
||||
// {{gh-path}} or {{gh-path ‘blog’}} for Ghost’s root (/myblog/)
|
||||
|
@ -7,6 +7,8 @@
|
||||
|
||||
<title>Ghost Admin</title>
|
||||
|
||||
{{content-for 'head'}}
|
||||
|
||||
<meta name="HandheldFriendly" content="True" />
|
||||
<meta name="MobileOptimized" content="320" />
|
||||
<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}}
|
||||
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans:400,300,700" />
|
||||
{{/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>
|
||||
<body>
|
||||
{{content-for 'body'}}
|
||||
|
||||
{{{ghost_script_tags}}}
|
||||
<script src="assets/vendor.js"></script>
|
||||
<script src="assets/ghost.js"></script>
|
||||
|
||||
{{content-for 'body-footer'}}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import ghostPaths from 'ghost/utils/ghost-paths';
|
||||
|
||||
var Ghost,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/*global Ember */
|
||||
|
||||
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
|
||||
// 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({
|
||||
currentUser: function () {
|
||||
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.
|
||||
*/
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/* global console */
|
||||
import MarkerManager from 'ghost/mixins/marker-manager';
|
||||
import PostModel from 'ghost/models/post';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import ShortcutsRoute from 'ghost/mixins/shortcuts-route';
|
||||
import styleBody from 'ghost/mixins/style-body';
|
||||
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import setScrollClassName from 'ghost/utils/set-scroll-classname';
|
||||
|
||||
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
|
||||
var loaderOptions,
|
||||
loadingIndicator;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var MarkerManager = Ember.Mixin.create({
|
||||
imageMarkdownRegex: /^(?:\{<(.*?)>\})?!(?:\[([^\n\]]*)\])(?:\(([^\n\]]*)\))?$/gim,
|
||||
markerRegex: /\{<([\w\W]*?)>\}/,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var NProgressSaveMixin = Ember.Mixin.create({
|
||||
save: function (options) {
|
||||
if (options && options.disableNProgress) {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
import { getRequestErrorMessage } from 'ghost/utils/ajax';
|
||||
|
||||
var PaginationControllerMixin = Ember.Mixin.create({
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var defaultPaginationSettings,
|
||||
PaginationRoute;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var PaginationViewInfiniteScrollMixin = Ember.Mixin.create({
|
||||
|
||||
/**
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
// SelectiveSaveMixin adds a saveOnly method to a DS.Model.
|
||||
//
|
||||
// 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({
|
||||
needs: 'application',
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
/* global key */
|
||||
|
||||
// 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
|
||||
|
||||
var styleBody = Ember.Mixin.create({
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var BlurField = Ember.Mixin.create({
|
||||
selectOnClick: false,
|
||||
stopEnterKeyDownPropagation: false,
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
import {getRequestErrorMessage} from 'ghost/utils/ajax';
|
||||
|
||||
import ValidatorExtensions from 'ghost/utils/validator-extensions';
|
||||
|
@ -1,3 +1,4 @@
|
||||
import DS from 'ember-data';
|
||||
var Notification = DS.Model.extend({
|
||||
dismissible: DS.attr('boolean'),
|
||||
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 NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
import Ember from 'ember';
|
||||
import DS from 'ember-data';
|
||||
var Role = DS.Model.extend({
|
||||
uuid: DS.attr('string'),
|
||||
name: DS.attr('string'),
|
||||
|
@ -1,3 +1,4 @@
|
||||
import DS from 'ember-data';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
import NProgressSaveMixin from 'ghost/mixins/nprogress-save';
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Ember from 'ember';
|
||||
var SlugGenerator = Ember.Object.extend({
|
||||
ghostPaths: null,
|
||||
slugType: null,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import DS from 'ember-data';
|
||||
import ValidationEngine from 'ghost/mixins/validation-engine';
|
||||
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 New Issue
Block a user