diff --git a/public/src/admin/appearance/customise.js b/public/src/admin/appearance/customise.js new file mode 100644 index 0000000000..482dd7fb6d --- /dev/null +++ b/public/src/admin/appearance/customise.js @@ -0,0 +1,33 @@ +"use strict"; +/* global define, app, socket */ + +define('forum/admin/appearance/customise', ['forum/admin/settings'], function(Settings) { + var Customise = {}; + + Customise.init = function() { + Settings.prepare(function() { + $('#customCSS').text($('#customCSS-holder').val()); + $('#customHTML').text($('#customHTML-holder').val()); + + var customCSS = ace.edit("customCSS"), + customHTML = ace.edit("customHTML"); + + customCSS.setTheme("ace/theme/twilight"); + customCSS.getSession().setMode("ace/mode/css"); + + customCSS.on('change', function(e) { + $('#customCSS-holder').val(customCSS.getValue()); + }); + + customHTML.setTheme("ace/theme/twilight"); + customHTML.getSession().setMode("ace/mode/html"); + + customHTML.on('change', function(e) { + $('#customHTML-holder').val(customHTML.getValue()); + }); + }); + }; + + return Customise; +}); + \ No newline at end of file diff --git a/public/src/admin/appearance/skins.js b/public/src/admin/appearance/skins.js new file mode 100644 index 0000000000..75a57e60e5 --- /dev/null +++ b/public/src/admin/appearance/skins.js @@ -0,0 +1,73 @@ +"use strict"; +/* global define, app, socket */ + +define('forum/admin/appearance/skins', function() { + var Skins = {}; + + Skins.init = function() { + var scriptEl = $('