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().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
|
||||
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,
|
||||
firstCharIndex = 0;
|
||||
|
||||
console.log('got content to filter', posts);
|
||||
|
||||
|
||||
for (post in posts) {
|
||||
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
|
||||
function setSelected(list, name) {
|
||||
_.each(list, function (item, key) {
|
||||
@ -91,7 +87,7 @@ adminControllers = {
|
||||
email_address: email,
|
||||
password: password
|
||||
}).then(function (user) {
|
||||
console.log('user added', user);
|
||||
// console.log('user added', user);
|
||||
res.redirect('/ghost/login/');
|
||||
}, function (error) {
|
||||
req.flash('error', error.message);
|
||||
|
@ -12,7 +12,6 @@ var config = require('./../config'),
|
||||
Polyglot = require('node-polyglot'),
|
||||
|
||||
models = require('./shared/models'),
|
||||
ExampleFilter = require('../content/plugins/exampleFilters'),
|
||||
|
||||
requireTree = require('./shared/require-tree'),
|
||||
themeDirectories = requireTree(path.resolve(__dirname + '../../content/themes')),
|
||||
@ -54,7 +53,6 @@ statuses = {
|
||||
*/
|
||||
Ghost = function () {
|
||||
var app,
|
||||
plugin,
|
||||
polyglot;
|
||||
|
||||
if (!instance) {
|
||||
@ -72,9 +70,6 @@ Ghost = function () {
|
||||
// Holds the plugin directories temporarily
|
||||
instance.pluginDirectories = {};
|
||||
|
||||
|
||||
plugin = new ExampleFilter(instance).init();
|
||||
|
||||
app = express();
|
||||
|
||||
polyglot = new Polyglot();
|
||||
@ -92,7 +87,6 @@ Ghost = function () {
|
||||
dataProvider: models,
|
||||
statuses: function () { return statuses; },
|
||||
polyglot: function () { return polyglot; },
|
||||
plugin: function () { return plugin; },
|
||||
getPaths: function () {
|
||||
return when.all([themeDirectories, pluginDirectories]).then(function (paths) {
|
||||
instance.themeDirectories = paths[0];
|
||||
|
@ -15,8 +15,6 @@ module.exports = {
|
||||
return migration.down().then(function () {
|
||||
return migration.up();
|
||||
}, errors.logAndThrowError);
|
||||
}, errors.logAndThrowError).then(function () {
|
||||
console.log('models loaded');
|
||||
}, errors.logAndThrowError);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user