don't need to refresh to preview updated skin #3069

v1.18.x
psychobunny 10 years ago
parent 9f97e8fa0c
commit 5b1571ad1e

@ -61,6 +61,13 @@ define('forum/account/settings', ['forum/account/header'], function(header) {
return false; return false;
}); });
$('#bootswatchSkin').on('change', function() {
var css = $('#bootswatchCSS'),
val = $(this).val() === 'default' ? config['theme:src'] : 'http://maxcdn.bootstrapcdn.com/bootswatch/latest/' + $(this).val() + '/bootstrap.min.css';
css.attr('href', val);
});
}; };
return AccountSettings; return AccountSettings;

@ -63,6 +63,7 @@ apiController.getConfig = function(req, res, next) {
config.postsPerPage = meta.config.postsPerPage || 20; config.postsPerPage = meta.config.postsPerPage || 20;
config.maximumFileSize = meta.config.maximumFileSize; config.maximumFileSize = meta.config.maximumFileSize;
config['theme:id'] = meta.config['theme:id']; config['theme:id'] = meta.config['theme:id'];
config['theme:src'] = meta.config['theme:src'];
config.defaultLang = meta.config.defaultLang || 'en_GB'; config.defaultLang = meta.config.defaultLang || 'en_GB';
config.userLang = req.query.lang || config.defaultLang; config.userLang = req.query.lang || config.defaultLang;
config.environment = process.env.NODE_ENV; config.environment = process.env.NODE_ENV;

Loading…
Cancel
Save