mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-06 14:47:47 +02:00
global header widgets
This commit is contained in:
@@ -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 + '"]');
|
||||
|
||||
@@ -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' },
|
||||
];
|
||||
|
||||
|
||||
@@ -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' }
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user