mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-07-04 20:25:25 +02:00
Add custom css slots to prepare for donators feature
This commit is contained in:
@ -1,12 +1,20 @@
|
||||
/*global $, ace, Materialize, newCSS*/
|
||||
(function () {
|
||||
var editor = ace.edit("css_editor");
|
||||
if($("#css_editor").length != 0) {
|
||||
var editor = ace.edit("css_editor");
|
||||
}
|
||||
|
||||
function postForm() {
|
||||
var name = $('#css_name').val();
|
||||
var var_enabled = $("#toggleCSSVar").is(':checked');
|
||||
var variables = JSON.stringify(formatCSSVars());
|
||||
var css = editor.getValue();
|
||||
var css = null;
|
||||
if($("#css_editor").length != 0) {
|
||||
css = editor.getValue();
|
||||
if (css.length == 0) {
|
||||
css = null;
|
||||
}
|
||||
}
|
||||
var funct = $.ajax({
|
||||
dataType: "json",
|
||||
method: "POST",
|
||||
@ -16,8 +24,10 @@
|
||||
}
|
||||
|
||||
$(function(){
|
||||
editor.getSession().setMode("ace/mode/css");
|
||||
editor.setTheme("ace/theme/chrome");
|
||||
if($("#css_editor").length != 0) {
|
||||
editor.getSession().setMode("ace/mode/css");
|
||||
editor.setTheme("ace/theme/chrome");
|
||||
}
|
||||
$("#submit-btn").click(submitForm);
|
||||
|
||||
if (!newCSS) {
|
||||
|
Reference in New Issue
Block a user