1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/init.js
Hannah Wolfe bf3ba76037 Minor update to notification frontend api
- motivation was an error message on the settings screen
 - now requires slightly less code to add a notification
2013-08-06 08:55:47 +01:00

39 lines
No EOL
911 B
JavaScript

/*globals window, $, _, Backbone */
(function () {
"use strict";
var Ghost = {
Layout : {},
Views : {},
Collections : {},
Models : {},
settings: {
apiRoot: '/api/v0.1'
},
// This is a helper object to denote legacy things in the
// middle of being transitioned.
temporary: {},
currentView: null,
router: null
};
Ghost.init = function () {
Ghost.router = new Ghost.Router();
// This is needed so Backbone recognizes elements already rendered server side
// as valid views, and events are bound
Ghost.notifications = new Ghost.Views.NotificationCollection({model: []});
Backbone.history.start({
pushState: true,
hashChange: false,
root: '/ghost'
});
};
window.Ghost = Ghost;
}());