Node.js based forum software built for the modern web
global header widgets
psychobunnybfa3b0f22f7c
diff --git a/public/src/widgets.js b/public/src/widgets.jsindex 7e14eaf632..08ae194a15 100644--- a/public/src/widgets.js+++ b/public/src/widgets.js@@ -15,7 +15,7 @@};ajaxify.widgets.render = function(tpl_url, url, callback) {- var widgetLocations = ['sidebar', 'footer'], numLocations;+ var widgetLocations = ['sidebar', 'footer', 'header'], numLocations;$('#content [widget-area]').each(function() {var location = $(this).attr('widget-area');@@ -48,6 +48,8 @@} else if (location === 'sidebar') {$('#content > *').wrapAll($('<div class="col-lg-9 col-xs-12"></div>'));$('#content').append($('<div class="col-lg-3 col-xs-12"><div widget-area="sidebar"></div></div>'));+ } else if (location === 'header') {+ $('#content').prepend($('<div class="col-xs-12"><div widget-area="header"></div></div>'));}area = $('#content [widget-area="' + location + '"]');diff --git a/src/controllers/admin.js b/src/controllers/admin.jsindex 1c5053fba2..71b63d075a 100644--- a/src/controllers/admin.js+++ b/src/controllers/admin.js@@ -112,6 +112,7 @@ adminController.themes.get = function(req, res, next) {areas: function(next) {var defaultAreas = [{ name: 'Global Sidebar', template: 'global', location: 'sidebar' },+ { name: 'Global Header', template: 'global', location: 'header' },{ name: 'Global Footer', template: 'global', location: 'footer' },];diff --git a/src/widgets.js b/src/widgets.jsindex f8d4a15d31..f5ddb53a7c 100644--- a/src/widgets.js+++ b/src/widgets.js@@ -81,6 +81,7 @@ var async = require('async'),Widgets.reset = function(callback) {var defaultAreas = [{ name: 'Global Sidebar', template: 'global', location: 'sidebar' },+ { name: 'Global Header', template: 'global', location: 'header' },{ name: 'Draft Zone', template: 'global', location: 'drafts' }];