Merge pull request #229 from javorszky/iss219

Getting rid of adminnavbar filter and console.logs
This commit is contained in:
Hannah Wolfe 2013-06-30 09:15:32 -07:00
commit 59c17468e3
6 changed files with 6 additions and 45 deletions

2
app.js
View File

@ -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();

View File

@ -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;
}());

View File

@ -17,7 +17,7 @@
newContent,
firstCharIndex = 0;
console.log('got content to filter', posts);
for (post in posts) {
if (posts.hasOwnProperty(post)) {

View File

@ -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);

View File

@ -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];

View File

@ -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);
}
};