mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-16 20:43:01 +03:00
Merge pull request #229 from javorszky/iss219
Getting rid of adminnavbar filter and console.logs
This commit is contained in:
commit
59c17468e3
2
app.js
2
app.js
@ -182,7 +182,7 @@ when.all([ghost.init(), filters.loadCoreFilters(ghost), helpers.loadCoreHelpers(
|
|||||||
ghost.app().get('/page/:page/', frontend.homepage);
|
ghost.app().get('/page/:page/', frontend.homepage);
|
||||||
|
|
||||||
ghost.app().listen(3333, function () {
|
ghost.app().listen(3333, function () {
|
||||||
console.log("Express server listening on port " + 3333);
|
// console.log("Express server listening on port " + 3333);
|
||||||
|
|
||||||
// Let everyone know we have finished loading
|
// Let everyone know we have finished loading
|
||||||
loading.resolve();
|
loading.resolve();
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
(function(){
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Because I didn't want to write over FancyFirstChar
|
|
||||||
*/
|
|
||||||
var ExampleFilter;
|
|
||||||
|
|
||||||
var ExampleFilter = function(ghost){
|
|
||||||
this.ghost = function() {
|
|
||||||
return ghost;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ExampleFilter.prototype.init = function() {
|
|
||||||
|
|
||||||
this.ghost().registerFilter('messWithAdmin', function(adminNavbar){
|
|
||||||
console.log('adminnavbar settings run');
|
|
||||||
// delete adminNavbar.add;
|
|
||||||
return adminNavbar;
|
|
||||||
});
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = ExampleFilter;
|
|
||||||
|
|
||||||
}());
|
|
@ -17,7 +17,7 @@
|
|||||||
newContent,
|
newContent,
|
||||||
firstCharIndex = 0;
|
firstCharIndex = 0;
|
||||||
|
|
||||||
console.log('got content to filter', posts);
|
|
||||||
|
|
||||||
for (post in posts) {
|
for (post in posts) {
|
||||||
if (posts.hasOwnProperty(post)) {
|
if (posts.hasOwnProperty(post)) {
|
||||||
|
@ -45,10 +45,6 @@ adminNavbar = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ghost.doFilter('messWithAdmin', adminNavbar, function () {
|
|
||||||
console.log('the dofilter hook called in /core/admin/controllers/index.js');
|
|
||||||
});
|
|
||||||
|
|
||||||
// TODO: make this a util or helper
|
// TODO: make this a util or helper
|
||||||
function setSelected(list, name) {
|
function setSelected(list, name) {
|
||||||
_.each(list, function (item, key) {
|
_.each(list, function (item, key) {
|
||||||
@ -91,7 +87,7 @@ adminControllers = {
|
|||||||
email_address: email,
|
email_address: email,
|
||||||
password: password
|
password: password
|
||||||
}).then(function (user) {
|
}).then(function (user) {
|
||||||
console.log('user added', user);
|
// console.log('user added', user);
|
||||||
res.redirect('/ghost/login/');
|
res.redirect('/ghost/login/');
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
req.flash('error', error.message);
|
req.flash('error', error.message);
|
||||||
|
@ -12,7 +12,6 @@ var config = require('./../config'),
|
|||||||
Polyglot = require('node-polyglot'),
|
Polyglot = require('node-polyglot'),
|
||||||
|
|
||||||
models = require('./shared/models'),
|
models = require('./shared/models'),
|
||||||
ExampleFilter = require('../content/plugins/exampleFilters'),
|
|
||||||
|
|
||||||
requireTree = require('./shared/require-tree'),
|
requireTree = require('./shared/require-tree'),
|
||||||
themeDirectories = requireTree(path.resolve(__dirname + '../../content/themes')),
|
themeDirectories = requireTree(path.resolve(__dirname + '../../content/themes')),
|
||||||
@ -54,7 +53,6 @@ statuses = {
|
|||||||
*/
|
*/
|
||||||
Ghost = function () {
|
Ghost = function () {
|
||||||
var app,
|
var app,
|
||||||
plugin,
|
|
||||||
polyglot;
|
polyglot;
|
||||||
|
|
||||||
if (!instance) {
|
if (!instance) {
|
||||||
@ -72,9 +70,6 @@ Ghost = function () {
|
|||||||
// Holds the plugin directories temporarily
|
// Holds the plugin directories temporarily
|
||||||
instance.pluginDirectories = {};
|
instance.pluginDirectories = {};
|
||||||
|
|
||||||
|
|
||||||
plugin = new ExampleFilter(instance).init();
|
|
||||||
|
|
||||||
app = express();
|
app = express();
|
||||||
|
|
||||||
polyglot = new Polyglot();
|
polyglot = new Polyglot();
|
||||||
@ -92,7 +87,6 @@ Ghost = function () {
|
|||||||
dataProvider: models,
|
dataProvider: models,
|
||||||
statuses: function () { return statuses; },
|
statuses: function () { return statuses; },
|
||||||
polyglot: function () { return polyglot; },
|
polyglot: function () { return polyglot; },
|
||||||
plugin: function () { return plugin; },
|
|
||||||
getPaths: function () {
|
getPaths: function () {
|
||||||
return when.all([themeDirectories, pluginDirectories]).then(function (paths) {
|
return when.all([themeDirectories, pluginDirectories]).then(function (paths) {
|
||||||
instance.themeDirectories = paths[0];
|
instance.themeDirectories = paths[0];
|
||||||
|
@ -15,8 +15,6 @@ module.exports = {
|
|||||||
return migration.down().then(function () {
|
return migration.down().then(function () {
|
||||||
return migration.up();
|
return migration.up();
|
||||||
}, errors.logAndThrowError);
|
}, errors.logAndThrowError);
|
||||||
}, errors.logAndThrowError).then(function () {
|
|
||||||
console.log('models loaded');
|
|
||||||
}, errors.logAndThrowError);
|
}, errors.logAndThrowError);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user