mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
parent
72b3b3ceb1
commit
a42894bc9a
@ -1,11 +1,12 @@
|
||||
/*global Ember */
|
||||
import ghostPaths from 'ghost/utils/ghost-paths';
|
||||
|
||||
// ensure we don't share routes between all Router instances
|
||||
var Router = Ember.Router.extend();
|
||||
|
||||
Router.reopen({
|
||||
location: 'trailing-history', // use HTML5 History API instead of hash-tag based URLs
|
||||
rootURL: '/ghost/ember/' // admin interface lives under sub-directory /ghost
|
||||
rootURL: ghostPaths().subdir + '/ghost/ember/' // admin interface lives under sub-directory /ghost
|
||||
});
|
||||
|
||||
Router.map(function () {
|
||||
|
@ -31,6 +31,11 @@ var downsize = require('downsize'),
|
||||
'templates.js',
|
||||
'models.js',
|
||||
'views.js'
|
||||
],
|
||||
ember: [
|
||||
'vendor-ember.js',
|
||||
'templates-ember.js',
|
||||
'ghost-dev-ember.js'
|
||||
]
|
||||
};
|
||||
|
||||
@ -357,6 +362,19 @@ coreHelpers.ghost_script_tags = function () {
|
||||
return scriptList.join('');
|
||||
};
|
||||
|
||||
coreHelpers.ember_script_tags = function () {
|
||||
var scriptList = scriptFiles.ember;
|
||||
|
||||
scriptList = _.map(scriptList, function (fileName) {
|
||||
return scriptTemplate({
|
||||
source: config().paths.subdir + '/ghost/scripts/' + fileName,
|
||||
version: coreHelpers.assetHash
|
||||
});
|
||||
});
|
||||
|
||||
return scriptList.join('');
|
||||
};
|
||||
|
||||
/*
|
||||
* Asynchronous Theme Helpers (Registered with registerAsyncThemeHelper)
|
||||
*/
|
||||
@ -811,6 +829,8 @@ registerHelpers = function (adminHbs, assetHash) {
|
||||
|
||||
registerAdminHelper('ghost_script_tags', coreHelpers.ghost_script_tags);
|
||||
|
||||
registerAdminHelper('ember_script_tags', coreHelpers.ember_script_tags);
|
||||
|
||||
registerAdminHelper('file_storage', coreHelpers.file_storage);
|
||||
|
||||
registerAdminHelper('apps', coreHelpers.apps);
|
||||
|
@ -35,9 +35,7 @@
|
||||
</head>
|
||||
<body class="{{bodyClass}}{{update_notification classOnly="true"}}">
|
||||
|
||||
<script src="/ghost/scripts/vendor-ember.js"></script>
|
||||
<script src="/ghost/scripts/templates-ember.js"></script>
|
||||
<script src="/ghost/scripts/ghost-dev-ember.js"></script>
|
||||
{{{ember_script_tags}}}
|
||||
|
||||
<script>
|
||||
window.ENV = {
|
||||
|
Loading…
Reference in New Issue
Block a user