Fix various settings tabs and dialogs
* Delete / Undelete Themes and Mascots * Themes only add [custom] if they're not already User Themes
This commit is contained in:
parent
7696301598
commit
6c4e4b6b9f
@ -11306,18 +11306,12 @@
|
|||||||
|
|
||||||
ThemeTools = {
|
ThemeTools = {
|
||||||
init: function(key) {
|
init: function(key) {
|
||||||
var colorInput, div, fileInput, header, input, item, layout, themecontent, _i, _j, _len, _len1, _ref;
|
var colorInput, div, fileInput, header, input, item, layout, nodes, themeContent, _i, _j, _len, _len1, _ref;
|
||||||
|
|
||||||
Conf['editMode'] = "theme";
|
Conf['editMode'] = "theme";
|
||||||
if (Themes[key]) {
|
if (key) {
|
||||||
editTheme = JSON.parse(JSON.stringify(Themes[key]));
|
editTheme = JSON.parse(JSON.stringify(Themes[key]));
|
||||||
$.get("userThemes", {}, function(items) {
|
editTheme["Theme"] = Conf['userThemes'][key] ? key : key += " [custom]";
|
||||||
if (items[key]) {
|
|
||||||
return editTheme["Theme"] = key;
|
|
||||||
} else {
|
|
||||||
return editTheme["Theme"] = key += " [custom]";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
editTheme = JSON.parse(JSON.stringify(Themes['Yotsuba B']));
|
editTheme = JSON.parse(JSON.stringify(Themes['Yotsuba B']));
|
||||||
editTheme["Theme"] = "Untitled";
|
editTheme["Theme"] = "Untitled";
|
||||||
@ -11341,7 +11335,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add($("#themebar", ThemeTools.dialog), header);
|
$.add($("#themebar", ThemeTools.dialog), header);
|
||||||
themecontent = $("#themecontent", ThemeTools.dialog);
|
themeContent = $("#themecontent", ThemeTools.dialog);
|
||||||
|
nodes = [];
|
||||||
for (_j = 0, _len1 = layout.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = layout.length; _j < _len1; _j++) {
|
||||||
item = layout[_j];
|
item = layout[_j];
|
||||||
if (!editTheme[item]) {
|
if (!editTheme[item]) {
|
||||||
@ -11416,10 +11411,9 @@
|
|||||||
}
|
}
|
||||||
return editTheme[this.name] = this.value;
|
return editTheme[this.name] = this.value;
|
||||||
});
|
});
|
||||||
Style.addStyle(editTheme);
|
nodes.push(div);
|
||||||
$.add(themecontent, div);
|
|
||||||
}
|
}
|
||||||
$.add(themecontent, div);
|
Style.addStyle(editTheme);
|
||||||
if (!editTheme["Custom CSS"]) {
|
if (!editTheme["Custom CSS"]) {
|
||||||
editTheme["Custom CSS"] = "";
|
editTheme["Custom CSS"] = "";
|
||||||
}
|
}
|
||||||
@ -11431,11 +11425,12 @@
|
|||||||
editTheme["Custom CSS"] = this.value;
|
editTheme["Custom CSS"] = this.value;
|
||||||
return Style.themeCSS.textContent = Style.theme(editTheme);
|
return Style.themeCSS.textContent = Style.theme(editTheme);
|
||||||
});
|
});
|
||||||
$.add(themecontent, div);
|
nodes.push(div);
|
||||||
$.on($('#save > a', ThemeTools.dialog), 'click', function() {
|
$.on($('#save > a', ThemeTools.dialog), 'click', function() {
|
||||||
return ThemeTools.save(editTheme);
|
return ThemeTools.save(editTheme);
|
||||||
});
|
});
|
||||||
$.on($('#close > a', ThemeTools.dialog), 'click', ThemeTools.close);
|
$.on($('#close > a', ThemeTools.dialog), 'click', ThemeTools.close);
|
||||||
|
$.add(themeContent, nodes);
|
||||||
$.add(d.body, ThemeTools.dialog);
|
$.add(d.body, ThemeTools.dialog);
|
||||||
return Style.themeCSS.textContent = Style.theme(editTheme);
|
return Style.themeCSS.textContent = Style.theme(editTheme);
|
||||||
},
|
},
|
||||||
@ -13694,19 +13689,20 @@
|
|||||||
for (_i = 0, _len = keys.length; _i < _len; _i++) {
|
for (_i = 0, _len = keys.length; _i < _len; _i++) {
|
||||||
name = keys[_i];
|
name = keys[_i];
|
||||||
theme = Themes[name];
|
theme = Themes[name];
|
||||||
if (!theme["Deleted"]) {
|
if (theme["Deleted"]) {
|
||||||
div = $.el('div', {
|
continue;
|
||||||
className: "theme " + (name === Conf['theme'] ? 'selectedtheme' : ''),
|
|
||||||
id: name,
|
|
||||||
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div> <div style='cursor: pointer; width: 9px; height: 9px; margin: 2px 3px; display: inline-block; vertical-align: bottom; background: " + theme['Checkbox Background'] + "; border: 1px solid " + theme['Checkbox Border'] + ";'></div> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'> " + name + " </span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'> " + theme['Author'] + " </span> <span style='color:" + theme['Sage'] + "!important'> (SAGE) </span> <span style='color:" + theme['Tripcodes'] + "!important'> " + theme['Author Tripcode'] + " </span> <time style='color:" + theme['Timestamps'] + "'> 20XX.01.01 12:00 </time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'> No.27583594 </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=edit> >>edit </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=export> >>export </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=delete> >>delete </a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> Post content is right here. </blockquote> <h1 style='color: " + theme['Text'] + "'> Selected </h1></div>"
|
|
||||||
});
|
|
||||||
div.style.backgroundColor = theme['Background Color'];
|
|
||||||
$.on($('a.edit', div), 'click', cb.edit);
|
|
||||||
$.on($('a.export', div), 'click', cb["export"]);
|
|
||||||
$.on($('a.delete', div), 'click', cb["delete"]);
|
|
||||||
$.on(div, 'click', cb.select);
|
|
||||||
$.add(suboptions, div);
|
|
||||||
}
|
}
|
||||||
|
div = $.el('div', {
|
||||||
|
className: "theme " + (name === Conf['theme'] ? 'selectedtheme' : ''),
|
||||||
|
id: name,
|
||||||
|
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div> <div style='cursor: pointer; width: 9px; height: 9px; margin: 2px 3px; display: inline-block; vertical-align: bottom; background: " + theme['Checkbox Background'] + "; border: 1px solid " + theme['Checkbox Border'] + ";'></div> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'> " + name + " </span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'> " + theme['Author'] + " </span> <span style='color:" + theme['Sage'] + "!important'> (SAGE) </span> <span style='color:" + theme['Tripcodes'] + "!important'> " + theme['Author Tripcode'] + " </span> <time style='color:" + theme['Timestamps'] + "'> 20XX.01.01 12:00 </time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'> No.27583594 </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=edit> >>edit </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=export> >>export </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=delete> >>delete </a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> Post content is right here. </blockquote> <h1 style='color: " + theme['Text'] + "'> Selected </h1></div>"
|
||||||
|
});
|
||||||
|
div.style.backgroundColor = theme['Background Color'];
|
||||||
|
$.on($('a.edit', div), 'click', cb.edit);
|
||||||
|
$.on($('a.export', div), 'click', cb["export"]);
|
||||||
|
$.on($('a.delete', div), 'click', cb["delete"]);
|
||||||
|
$.on(div, 'click', cb.select);
|
||||||
|
$.add(suboptions, div);
|
||||||
}
|
}
|
||||||
div = $.el('div', {
|
div = $.el('div', {
|
||||||
id: 'addthemes',
|
id: 'addthemes',
|
||||||
@ -13735,30 +13731,43 @@
|
|||||||
return this.nextSibling.click();
|
return this.nextSibling.click();
|
||||||
});
|
});
|
||||||
$.on($('#tUndelete', div), 'click', function() {
|
$.on($('#tUndelete', div), 'click', function() {
|
||||||
|
var themes;
|
||||||
|
|
||||||
$.rm($.id("themeContainer"));
|
$.rm($.id("themeContainer"));
|
||||||
return Settings.openSection(themes, 'undelete');
|
themes = {
|
||||||
|
open: Settings.themes,
|
||||||
|
hyphenatedTitle: 'themes'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(themes, ['undelete']);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
for (_j = 0, _len1 = keys.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = keys.length; _j < _len1; _j++) {
|
||||||
name = keys[_j];
|
name = keys[_j];
|
||||||
theme = Themes[name];
|
theme = Themes[name];
|
||||||
if (theme["Deleted"]) {
|
if (!theme["Deleted"]) {
|
||||||
div = $.el('div', {
|
continue;
|
||||||
id: name,
|
|
||||||
className: theme,
|
|
||||||
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div style='padding: 3px 0px 0px 8px;'> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'>" + name + "</span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'>" + theme['Author'] + "</span> <span style='color:" + theme['Sage'] + "!important'>(SAGE)</span> <span style='color:" + theme['Tripcodes'] + "!important'>" + theme['Author Tripcode'] + "</span> <time style='color:" + theme['Timestamps'] + "'>20XX.01.01 12:00</time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'>No.27583594</a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> I forgive you for using VLC to open me. ;__; </blockquote></div>"
|
|
||||||
});
|
|
||||||
$.on(div, 'click', cb.restore);
|
|
||||||
$.add(suboptions, div);
|
|
||||||
}
|
}
|
||||||
|
div = $.el('div', {
|
||||||
|
id: name,
|
||||||
|
className: theme,
|
||||||
|
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div style='padding: 3px 0px 0px 8px;'> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'>" + name + "</span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'>" + theme['Author'] + "</span> <span style='color:" + theme['Sage'] + "!important'>(SAGE)</span> <span style='color:" + theme['Tripcodes'] + "!important'>" + theme['Author Tripcode'] + "</span> <time style='color:" + theme['Timestamps'] + "'>20XX.01.01 12:00</time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'>No.27583594</a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> I forgive you for using VLC to open me. ;__; </blockquote></div>"
|
||||||
|
});
|
||||||
|
$.on(div, 'click', cb.restore);
|
||||||
|
$.add(suboptions, div);
|
||||||
}
|
}
|
||||||
div = $.el('div', {
|
div = $.el('div', {
|
||||||
id: 'addthemes',
|
id: 'addthemes',
|
||||||
innerHTML: "<a href='javascript:;'>Return</a>"
|
innerHTML: "<a href='javascript:;'>Return</a>"
|
||||||
});
|
});
|
||||||
$.on($('a', div), 'click', function() {
|
$.on($('a', div), 'click', function() {
|
||||||
|
var themes;
|
||||||
|
|
||||||
|
themes = {
|
||||||
|
open: Settings.themes,
|
||||||
|
hyphenatedTitle: 'themes'
|
||||||
|
};
|
||||||
$.rm($.id("themeContainer"));
|
$.rm($.id("themeContainer"));
|
||||||
return Settings.openSection(themes);
|
return Settings.openSection.call(themes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add(parentdiv, suboptions);
|
$.add(parentdiv, suboptions);
|
||||||
@ -13890,12 +13899,17 @@
|
|||||||
return MascotTools.importMascot(e);
|
return MascotTools.importMascot(e);
|
||||||
});
|
});
|
||||||
$.on($('#undelete', batchmascots), 'click', function() {
|
$.on($('#undelete', batchmascots), 'click', function() {
|
||||||
|
var mascots;
|
||||||
|
|
||||||
if (!(Conf["Deleted Mascots"].length > 0)) {
|
if (!(Conf["Deleted Mascots"].length > 0)) {
|
||||||
alert("No mascots have been deleted.");
|
alert("No mascots have been deleted.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.rm($.id("mascotContainer"));
|
mascots = {
|
||||||
return Settings.mascotTab.dialog(Settings.el, 'undelete');
|
open: Settings.mascots,
|
||||||
|
hyphenatedTitle: 'mascots'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(mascots, ['restore']);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
categories = $.el("div", {
|
categories = $.el("div", {
|
||||||
@ -13922,8 +13936,13 @@
|
|||||||
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
|
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
|
||||||
});
|
});
|
||||||
$.on($('#return', batchmascots), 'click', function() {
|
$.on($('#return', batchmascots), 'click', function() {
|
||||||
$.rm($.id("mascotContainer"));
|
var mascots;
|
||||||
return Settings.section('mascots');
|
|
||||||
|
mascots = {
|
||||||
|
open: Settings.mascots,
|
||||||
|
hyphenatedTitle: 'mascots'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(mascots);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add(parentdiv, [suboptions, batchmascots, mascotHide]);
|
$.add(parentdiv, [suboptions, batchmascots, mascotHide]);
|
||||||
@ -14055,7 +14074,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"delete": function(e) {
|
"delete": function(e) {
|
||||||
var container, settheme;
|
var container, settheme,
|
||||||
|
_this = this;
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -14073,26 +14093,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Themes[this.name]["Deleted"] = true;
|
Themes[this.name]["Deleted"] = true;
|
||||||
return $.get("userThemes", {}, function() {
|
return $.get("userThemes", {}, function(_arg) {
|
||||||
var userThemes;
|
var userThemes;
|
||||||
|
|
||||||
userThemes = items['userThemes'];
|
userThemes = _arg.userThemes;
|
||||||
userThemes[this.name] = Themes[this.name];
|
userThemes[_this.name] = Themes[_this.name];
|
||||||
$.set('userThemes', userThemes);
|
$.set('userThemes', userThemes);
|
||||||
return $.rm(container);
|
return $.rm(container);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
restore: function() {
|
restore: function() {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
if (confirm("Are you sure you want to restore \"" + this.id + "\"?")) {
|
if (confirm("Are you sure you want to restore \"" + this.id + "\"?")) {
|
||||||
Themes[this.id]["Deleted"] = false;
|
Themes[this.id]["Deleted"] = false;
|
||||||
return $.get("userThemes", {}, function(item) {
|
return $.get("userThemes", {}, function(_arg) {
|
||||||
var userThemes;
|
var userThemes;
|
||||||
|
|
||||||
userThemes = item["userThemes"];
|
userThemes = _arg.userThemes;
|
||||||
userThemes[this.id] = Themes[this.id];
|
userThemes[_this.id] = Themes[_this.id];
|
||||||
$.set('userThemes', userThemes);
|
$.set('userThemes', userThemes);
|
||||||
return $.rm(this);
|
return $.rm(_this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11327,18 +11327,12 @@
|
|||||||
|
|
||||||
ThemeTools = {
|
ThemeTools = {
|
||||||
init: function(key) {
|
init: function(key) {
|
||||||
var colorInput, div, fileInput, header, input, item, layout, themecontent, _i, _j, _len, _len1, _ref;
|
var colorInput, div, fileInput, header, input, item, layout, nodes, themeContent, _i, _j, _len, _len1, _ref;
|
||||||
|
|
||||||
Conf['editMode'] = "theme";
|
Conf['editMode'] = "theme";
|
||||||
if (Themes[key]) {
|
if (key) {
|
||||||
editTheme = JSON.parse(JSON.stringify(Themes[key]));
|
editTheme = JSON.parse(JSON.stringify(Themes[key]));
|
||||||
$.get("userThemes", {}, function(items) {
|
editTheme["Theme"] = Conf['userThemes'][key] ? key : key += " [custom]";
|
||||||
if (items[key]) {
|
|
||||||
return editTheme["Theme"] = key;
|
|
||||||
} else {
|
|
||||||
return editTheme["Theme"] = key += " [custom]";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
editTheme = JSON.parse(JSON.stringify(Themes['Yotsuba B']));
|
editTheme = JSON.parse(JSON.stringify(Themes['Yotsuba B']));
|
||||||
editTheme["Theme"] = "Untitled";
|
editTheme["Theme"] = "Untitled";
|
||||||
@ -11362,7 +11356,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add($("#themebar", ThemeTools.dialog), header);
|
$.add($("#themebar", ThemeTools.dialog), header);
|
||||||
themecontent = $("#themecontent", ThemeTools.dialog);
|
themeContent = $("#themecontent", ThemeTools.dialog);
|
||||||
|
nodes = [];
|
||||||
for (_j = 0, _len1 = layout.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = layout.length; _j < _len1; _j++) {
|
||||||
item = layout[_j];
|
item = layout[_j];
|
||||||
if (!editTheme[item]) {
|
if (!editTheme[item]) {
|
||||||
@ -11437,10 +11432,9 @@
|
|||||||
}
|
}
|
||||||
return editTheme[this.name] = this.value;
|
return editTheme[this.name] = this.value;
|
||||||
});
|
});
|
||||||
Style.addStyle(editTheme);
|
nodes.push(div);
|
||||||
$.add(themecontent, div);
|
|
||||||
}
|
}
|
||||||
$.add(themecontent, div);
|
Style.addStyle(editTheme);
|
||||||
if (!editTheme["Custom CSS"]) {
|
if (!editTheme["Custom CSS"]) {
|
||||||
editTheme["Custom CSS"] = "";
|
editTheme["Custom CSS"] = "";
|
||||||
}
|
}
|
||||||
@ -11452,11 +11446,12 @@
|
|||||||
editTheme["Custom CSS"] = this.value;
|
editTheme["Custom CSS"] = this.value;
|
||||||
return Style.themeCSS.textContent = Style.theme(editTheme);
|
return Style.themeCSS.textContent = Style.theme(editTheme);
|
||||||
});
|
});
|
||||||
$.add(themecontent, div);
|
nodes.push(div);
|
||||||
$.on($('#save > a', ThemeTools.dialog), 'click', function() {
|
$.on($('#save > a', ThemeTools.dialog), 'click', function() {
|
||||||
return ThemeTools.save(editTheme);
|
return ThemeTools.save(editTheme);
|
||||||
});
|
});
|
||||||
$.on($('#close > a', ThemeTools.dialog), 'click', ThemeTools.close);
|
$.on($('#close > a', ThemeTools.dialog), 'click', ThemeTools.close);
|
||||||
|
$.add(themeContent, nodes);
|
||||||
$.add(d.body, ThemeTools.dialog);
|
$.add(d.body, ThemeTools.dialog);
|
||||||
return Style.themeCSS.textContent = Style.theme(editTheme);
|
return Style.themeCSS.textContent = Style.theme(editTheme);
|
||||||
},
|
},
|
||||||
@ -13713,19 +13708,20 @@
|
|||||||
for (_i = 0, _len = keys.length; _i < _len; _i++) {
|
for (_i = 0, _len = keys.length; _i < _len; _i++) {
|
||||||
name = keys[_i];
|
name = keys[_i];
|
||||||
theme = Themes[name];
|
theme = Themes[name];
|
||||||
if (!theme["Deleted"]) {
|
if (theme["Deleted"]) {
|
||||||
div = $.el('div', {
|
continue;
|
||||||
className: "theme " + (name === Conf['theme'] ? 'selectedtheme' : ''),
|
|
||||||
id: name,
|
|
||||||
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div> <div style='cursor: pointer; width: 9px; height: 9px; margin: 2px 3px; display: inline-block; vertical-align: bottom; background: " + theme['Checkbox Background'] + "; border: 1px solid " + theme['Checkbox Border'] + ";'></div> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'> " + name + " </span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'> " + theme['Author'] + " </span> <span style='color:" + theme['Sage'] + "!important'> (SAGE) </span> <span style='color:" + theme['Tripcodes'] + "!important'> " + theme['Author Tripcode'] + " </span> <time style='color:" + theme['Timestamps'] + "'> 20XX.01.01 12:00 </time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'> No.27583594 </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=edit> >>edit </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=export> >>export </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=delete> >>delete </a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> Post content is right here. </blockquote> <h1 style='color: " + theme['Text'] + "'> Selected </h1></div>"
|
|
||||||
});
|
|
||||||
div.style.backgroundColor = theme['Background Color'];
|
|
||||||
$.on($('a.edit', div), 'click', cb.edit);
|
|
||||||
$.on($('a.export', div), 'click', cb["export"]);
|
|
||||||
$.on($('a.delete', div), 'click', cb["delete"]);
|
|
||||||
$.on(div, 'click', cb.select);
|
|
||||||
$.add(suboptions, div);
|
|
||||||
}
|
}
|
||||||
|
div = $.el('div', {
|
||||||
|
className: "theme " + (name === Conf['theme'] ? 'selectedtheme' : ''),
|
||||||
|
id: name,
|
||||||
|
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div> <div style='cursor: pointer; width: 9px; height: 9px; margin: 2px 3px; display: inline-block; vertical-align: bottom; background: " + theme['Checkbox Background'] + "; border: 1px solid " + theme['Checkbox Border'] + ";'></div> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'> " + name + " </span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'> " + theme['Author'] + " </span> <span style='color:" + theme['Sage'] + "!important'> (SAGE) </span> <span style='color:" + theme['Tripcodes'] + "!important'> " + theme['Author Tripcode'] + " </span> <time style='color:" + theme['Timestamps'] + "'> 20XX.01.01 12:00 </time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'> No.27583594 </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=edit> >>edit </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=export> >>export </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=delete> >>delete </a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> Post content is right here. </blockquote> <h1 style='color: " + theme['Text'] + "'> Selected </h1></div>"
|
||||||
|
});
|
||||||
|
div.style.backgroundColor = theme['Background Color'];
|
||||||
|
$.on($('a.edit', div), 'click', cb.edit);
|
||||||
|
$.on($('a.export', div), 'click', cb["export"]);
|
||||||
|
$.on($('a.delete', div), 'click', cb["delete"]);
|
||||||
|
$.on(div, 'click', cb.select);
|
||||||
|
$.add(suboptions, div);
|
||||||
}
|
}
|
||||||
div = $.el('div', {
|
div = $.el('div', {
|
||||||
id: 'addthemes',
|
id: 'addthemes',
|
||||||
@ -13754,30 +13750,43 @@
|
|||||||
return this.nextSibling.click();
|
return this.nextSibling.click();
|
||||||
});
|
});
|
||||||
$.on($('#tUndelete', div), 'click', function() {
|
$.on($('#tUndelete', div), 'click', function() {
|
||||||
|
var themes;
|
||||||
|
|
||||||
$.rm($.id("themeContainer"));
|
$.rm($.id("themeContainer"));
|
||||||
return Settings.openSection(themes, 'undelete');
|
themes = {
|
||||||
|
open: Settings.themes,
|
||||||
|
hyphenatedTitle: 'themes'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(themes, ['undelete']);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
for (_j = 0, _len1 = keys.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = keys.length; _j < _len1; _j++) {
|
||||||
name = keys[_j];
|
name = keys[_j];
|
||||||
theme = Themes[name];
|
theme = Themes[name];
|
||||||
if (theme["Deleted"]) {
|
if (!theme["Deleted"]) {
|
||||||
div = $.el('div', {
|
continue;
|
||||||
id: name,
|
|
||||||
className: theme,
|
|
||||||
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div style='padding: 3px 0px 0px 8px;'> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'>" + name + "</span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'>" + theme['Author'] + "</span> <span style='color:" + theme['Sage'] + "!important'>(SAGE)</span> <span style='color:" + theme['Tripcodes'] + "!important'>" + theme['Author Tripcode'] + "</span> <time style='color:" + theme['Timestamps'] + "'>20XX.01.01 12:00</time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'>No.27583594</a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> I forgive you for using VLC to open me. ;__; </blockquote></div>"
|
|
||||||
});
|
|
||||||
$.on(div, 'click', cb.restore);
|
|
||||||
$.add(suboptions, div);
|
|
||||||
}
|
}
|
||||||
|
div = $.el('div', {
|
||||||
|
id: name,
|
||||||
|
className: theme,
|
||||||
|
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div style='padding: 3px 0px 0px 8px;'> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'>" + name + "</span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'>" + theme['Author'] + "</span> <span style='color:" + theme['Sage'] + "!important'>(SAGE)</span> <span style='color:" + theme['Tripcodes'] + "!important'>" + theme['Author Tripcode'] + "</span> <time style='color:" + theme['Timestamps'] + "'>20XX.01.01 12:00</time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'>No.27583594</a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> I forgive you for using VLC to open me. ;__; </blockquote></div>"
|
||||||
|
});
|
||||||
|
$.on(div, 'click', cb.restore);
|
||||||
|
$.add(suboptions, div);
|
||||||
}
|
}
|
||||||
div = $.el('div', {
|
div = $.el('div', {
|
||||||
id: 'addthemes',
|
id: 'addthemes',
|
||||||
innerHTML: "<a href='javascript:;'>Return</a>"
|
innerHTML: "<a href='javascript:;'>Return</a>"
|
||||||
});
|
});
|
||||||
$.on($('a', div), 'click', function() {
|
$.on($('a', div), 'click', function() {
|
||||||
|
var themes;
|
||||||
|
|
||||||
|
themes = {
|
||||||
|
open: Settings.themes,
|
||||||
|
hyphenatedTitle: 'themes'
|
||||||
|
};
|
||||||
$.rm($.id("themeContainer"));
|
$.rm($.id("themeContainer"));
|
||||||
return Settings.openSection(themes);
|
return Settings.openSection.call(themes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add(parentdiv, suboptions);
|
$.add(parentdiv, suboptions);
|
||||||
@ -13909,12 +13918,17 @@
|
|||||||
return MascotTools.importMascot(e);
|
return MascotTools.importMascot(e);
|
||||||
});
|
});
|
||||||
$.on($('#undelete', batchmascots), 'click', function() {
|
$.on($('#undelete', batchmascots), 'click', function() {
|
||||||
|
var mascots;
|
||||||
|
|
||||||
if (!(Conf["Deleted Mascots"].length > 0)) {
|
if (!(Conf["Deleted Mascots"].length > 0)) {
|
||||||
alert("No mascots have been deleted.");
|
alert("No mascots have been deleted.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.rm($.id("mascotContainer"));
|
mascots = {
|
||||||
return Settings.mascotTab.dialog(Settings.el, 'undelete');
|
open: Settings.mascots,
|
||||||
|
hyphenatedTitle: 'mascots'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(mascots, ['restore']);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
categories = $.el("div", {
|
categories = $.el("div", {
|
||||||
@ -13941,8 +13955,13 @@
|
|||||||
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
|
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
|
||||||
});
|
});
|
||||||
$.on($('#return', batchmascots), 'click', function() {
|
$.on($('#return', batchmascots), 'click', function() {
|
||||||
$.rm($.id("mascotContainer"));
|
var mascots;
|
||||||
return Settings.section('mascots');
|
|
||||||
|
mascots = {
|
||||||
|
open: Settings.mascots,
|
||||||
|
hyphenatedTitle: 'mascots'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(mascots);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add(parentdiv, [suboptions, batchmascots, mascotHide]);
|
$.add(parentdiv, [suboptions, batchmascots, mascotHide]);
|
||||||
@ -14074,7 +14093,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"delete": function(e) {
|
"delete": function(e) {
|
||||||
var container, settheme;
|
var container, settheme,
|
||||||
|
_this = this;
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -14092,26 +14112,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Themes[this.name]["Deleted"] = true;
|
Themes[this.name]["Deleted"] = true;
|
||||||
return $.get("userThemes", {}, function() {
|
return $.get("userThemes", {}, function(_arg) {
|
||||||
var userThemes;
|
var userThemes;
|
||||||
|
|
||||||
userThemes = items['userThemes'];
|
userThemes = _arg.userThemes;
|
||||||
userThemes[this.name] = Themes[this.name];
|
userThemes[_this.name] = Themes[_this.name];
|
||||||
$.set('userThemes', userThemes);
|
$.set('userThemes', userThemes);
|
||||||
return $.rm(container);
|
return $.rm(container);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
restore: function() {
|
restore: function() {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
if (confirm("Are you sure you want to restore \"" + this.id + "\"?")) {
|
if (confirm("Are you sure you want to restore \"" + this.id + "\"?")) {
|
||||||
Themes[this.id]["Deleted"] = false;
|
Themes[this.id]["Deleted"] = false;
|
||||||
return $.get("userThemes", {}, function(item) {
|
return $.get("userThemes", {}, function(_arg) {
|
||||||
var userThemes;
|
var userThemes;
|
||||||
|
|
||||||
userThemes = item["userThemes"];
|
userThemes = _arg.userThemes;
|
||||||
userThemes[this.id] = Themes[this.id];
|
userThemes[_this.id] = Themes[_this.id];
|
||||||
$.set('userThemes', userThemes);
|
$.set('userThemes', userThemes);
|
||||||
return $.rm(this);
|
return $.rm(_this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
@ -11310,18 +11310,12 @@
|
|||||||
|
|
||||||
ThemeTools = {
|
ThemeTools = {
|
||||||
init: function(key) {
|
init: function(key) {
|
||||||
var colorInput, div, fileInput, header, input, item, layout, themecontent, _i, _j, _len, _len1, _ref;
|
var colorInput, div, fileInput, header, input, item, layout, nodes, themeContent, _i, _j, _len, _len1, _ref;
|
||||||
|
|
||||||
Conf['editMode'] = "theme";
|
Conf['editMode'] = "theme";
|
||||||
if (Themes[key]) {
|
if (key) {
|
||||||
editTheme = JSON.parse(JSON.stringify(Themes[key]));
|
editTheme = JSON.parse(JSON.stringify(Themes[key]));
|
||||||
$.get("userThemes", {}, function(items) {
|
editTheme["Theme"] = Conf['userThemes'][key] ? key : key += " [custom]";
|
||||||
if (items[key]) {
|
|
||||||
return editTheme["Theme"] = key;
|
|
||||||
} else {
|
|
||||||
return editTheme["Theme"] = key += " [custom]";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
editTheme = JSON.parse(JSON.stringify(Themes['Yotsuba B']));
|
editTheme = JSON.parse(JSON.stringify(Themes['Yotsuba B']));
|
||||||
editTheme["Theme"] = "Untitled";
|
editTheme["Theme"] = "Untitled";
|
||||||
@ -11345,7 +11339,8 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add($("#themebar", ThemeTools.dialog), header);
|
$.add($("#themebar", ThemeTools.dialog), header);
|
||||||
themecontent = $("#themecontent", ThemeTools.dialog);
|
themeContent = $("#themecontent", ThemeTools.dialog);
|
||||||
|
nodes = [];
|
||||||
for (_j = 0, _len1 = layout.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = layout.length; _j < _len1; _j++) {
|
||||||
item = layout[_j];
|
item = layout[_j];
|
||||||
if (!editTheme[item]) {
|
if (!editTheme[item]) {
|
||||||
@ -11420,10 +11415,9 @@
|
|||||||
}
|
}
|
||||||
return editTheme[this.name] = this.value;
|
return editTheme[this.name] = this.value;
|
||||||
});
|
});
|
||||||
Style.addStyle(editTheme);
|
nodes.push(div);
|
||||||
$.add(themecontent, div);
|
|
||||||
}
|
}
|
||||||
$.add(themecontent, div);
|
Style.addStyle(editTheme);
|
||||||
if (!editTheme["Custom CSS"]) {
|
if (!editTheme["Custom CSS"]) {
|
||||||
editTheme["Custom CSS"] = "";
|
editTheme["Custom CSS"] = "";
|
||||||
}
|
}
|
||||||
@ -11435,11 +11429,12 @@
|
|||||||
editTheme["Custom CSS"] = this.value;
|
editTheme["Custom CSS"] = this.value;
|
||||||
return Style.themeCSS.textContent = Style.theme(editTheme);
|
return Style.themeCSS.textContent = Style.theme(editTheme);
|
||||||
});
|
});
|
||||||
$.add(themecontent, div);
|
nodes.push(div);
|
||||||
$.on($('#save > a', ThemeTools.dialog), 'click', function() {
|
$.on($('#save > a', ThemeTools.dialog), 'click', function() {
|
||||||
return ThemeTools.save(editTheme);
|
return ThemeTools.save(editTheme);
|
||||||
});
|
});
|
||||||
$.on($('#close > a', ThemeTools.dialog), 'click', ThemeTools.close);
|
$.on($('#close > a', ThemeTools.dialog), 'click', ThemeTools.close);
|
||||||
|
$.add(themeContent, nodes);
|
||||||
$.add(d.body, ThemeTools.dialog);
|
$.add(d.body, ThemeTools.dialog);
|
||||||
return Style.themeCSS.textContent = Style.theme(editTheme);
|
return Style.themeCSS.textContent = Style.theme(editTheme);
|
||||||
},
|
},
|
||||||
@ -13698,19 +13693,20 @@
|
|||||||
for (_i = 0, _len = keys.length; _i < _len; _i++) {
|
for (_i = 0, _len = keys.length; _i < _len; _i++) {
|
||||||
name = keys[_i];
|
name = keys[_i];
|
||||||
theme = Themes[name];
|
theme = Themes[name];
|
||||||
if (!theme["Deleted"]) {
|
if (theme["Deleted"]) {
|
||||||
div = $.el('div', {
|
continue;
|
||||||
className: "theme " + (name === Conf['theme'] ? 'selectedtheme' : ''),
|
|
||||||
id: name,
|
|
||||||
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div> <div style='cursor: pointer; width: 9px; height: 9px; margin: 2px 3px; display: inline-block; vertical-align: bottom; background: " + theme['Checkbox Background'] + "; border: 1px solid " + theme['Checkbox Border'] + ";'></div> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'> " + name + " </span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'> " + theme['Author'] + " </span> <span style='color:" + theme['Sage'] + "!important'> (SAGE) </span> <span style='color:" + theme['Tripcodes'] + "!important'> " + theme['Author Tripcode'] + " </span> <time style='color:" + theme['Timestamps'] + "'> 20XX.01.01 12:00 </time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'> No.27583594 </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=edit> >>edit </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=export> >>export </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=delete> >>delete </a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> Post content is right here. </blockquote> <h1 style='color: " + theme['Text'] + "'> Selected </h1></div>"
|
|
||||||
});
|
|
||||||
div.style.backgroundColor = theme['Background Color'];
|
|
||||||
$.on($('a.edit', div), 'click', cb.edit);
|
|
||||||
$.on($('a.export', div), 'click', cb["export"]);
|
|
||||||
$.on($('a.delete', div), 'click', cb["delete"]);
|
|
||||||
$.on(div, 'click', cb.select);
|
|
||||||
$.add(suboptions, div);
|
|
||||||
}
|
}
|
||||||
|
div = $.el('div', {
|
||||||
|
className: "theme " + (name === Conf['theme'] ? 'selectedtheme' : ''),
|
||||||
|
id: name,
|
||||||
|
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div> <div style='cursor: pointer; width: 9px; height: 9px; margin: 2px 3px; display: inline-block; vertical-align: bottom; background: " + theme['Checkbox Background'] + "; border: 1px solid " + theme['Checkbox Border'] + ";'></div> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'> " + name + " </span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'> " + theme['Author'] + " </span> <span style='color:" + theme['Sage'] + "!important'> (SAGE) </span> <span style='color:" + theme['Tripcodes'] + "!important'> " + theme['Author Tripcode'] + " </span> <time style='color:" + theme['Timestamps'] + "'> 20XX.01.01 12:00 </time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'> No.27583594 </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=edit> >>edit </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=export> >>export </a> <a onmouseout='this.setAttribute("style","color:" + theme['Backlinks'] + "!important;")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important;")' style='color:" + theme['Backlinks'] + "!important;' href='javascript:;' name='" + name + "' class=delete> >>delete </a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> Post content is right here. </blockquote> <h1 style='color: " + theme['Text'] + "'> Selected </h1></div>"
|
||||||
|
});
|
||||||
|
div.style.backgroundColor = theme['Background Color'];
|
||||||
|
$.on($('a.edit', div), 'click', cb.edit);
|
||||||
|
$.on($('a.export', div), 'click', cb["export"]);
|
||||||
|
$.on($('a.delete', div), 'click', cb["delete"]);
|
||||||
|
$.on(div, 'click', cb.select);
|
||||||
|
$.add(suboptions, div);
|
||||||
}
|
}
|
||||||
div = $.el('div', {
|
div = $.el('div', {
|
||||||
id: 'addthemes',
|
id: 'addthemes',
|
||||||
@ -13739,30 +13735,43 @@
|
|||||||
return this.nextSibling.click();
|
return this.nextSibling.click();
|
||||||
});
|
});
|
||||||
$.on($('#tUndelete', div), 'click', function() {
|
$.on($('#tUndelete', div), 'click', function() {
|
||||||
|
var themes;
|
||||||
|
|
||||||
$.rm($.id("themeContainer"));
|
$.rm($.id("themeContainer"));
|
||||||
return Settings.openSection(themes, 'undelete');
|
themes = {
|
||||||
|
open: Settings.themes,
|
||||||
|
hyphenatedTitle: 'themes'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(themes, ['undelete']);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
for (_j = 0, _len1 = keys.length; _j < _len1; _j++) {
|
for (_j = 0, _len1 = keys.length; _j < _len1; _j++) {
|
||||||
name = keys[_j];
|
name = keys[_j];
|
||||||
theme = Themes[name];
|
theme = Themes[name];
|
||||||
if (theme["Deleted"]) {
|
if (!theme["Deleted"]) {
|
||||||
div = $.el('div', {
|
continue;
|
||||||
id: name,
|
|
||||||
className: theme,
|
|
||||||
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div style='padding: 3px 0px 0px 8px;'> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'>" + name + "</span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'>" + theme['Author'] + "</span> <span style='color:" + theme['Sage'] + "!important'>(SAGE)</span> <span style='color:" + theme['Tripcodes'] + "!important'>" + theme['Author Tripcode'] + "</span> <time style='color:" + theme['Timestamps'] + "'>20XX.01.01 12:00</time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'>No.27583594</a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> I forgive you for using VLC to open me. ;__; </blockquote></div>"
|
|
||||||
});
|
|
||||||
$.on(div, 'click', cb.restore);
|
|
||||||
$.add(suboptions, div);
|
|
||||||
}
|
}
|
||||||
|
div = $.el('div', {
|
||||||
|
id: name,
|
||||||
|
className: theme,
|
||||||
|
innerHTML: "<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:" + theme['Reply Background'] + "!important;border:1px solid " + theme['Reply Border'] + "!important;color:" + theme['Text'] + "!important'> <div style='padding: 3px 0px 0px 8px;'> <span style='color:" + theme['Subjects'] + "!important; font-weight: 600 !important'>" + name + "</span> <span style='color:" + theme['Names'] + "!important; font-weight: 600 !important'>" + theme['Author'] + "</span> <span style='color:" + theme['Sage'] + "!important'>(SAGE)</span> <span style='color:" + theme['Tripcodes'] + "!important'>" + theme['Author Tripcode'] + "</span> <time style='color:" + theme['Timestamps'] + "'>20XX.01.01 12:00</time> <a onmouseout='this.setAttribute("style","color:" + theme['Post Numbers'] + "!important")' onmouseover='this.setAttribute("style","color:" + theme['Hovered Links'] + "!important")' style='color:" + theme['Post Numbers'] + "!important;' href='javascript:;'>No.27583594</a> </div> <blockquote style='margin: 0; padding: 12px 40px 12px 38px'> <a style='color:" + theme['Quotelinks'] + "!important; text-shadow: none;'> >>27582902 </a> <br> I forgive you for using VLC to open me. ;__; </blockquote></div>"
|
||||||
|
});
|
||||||
|
$.on(div, 'click', cb.restore);
|
||||||
|
$.add(suboptions, div);
|
||||||
}
|
}
|
||||||
div = $.el('div', {
|
div = $.el('div', {
|
||||||
id: 'addthemes',
|
id: 'addthemes',
|
||||||
innerHTML: "<a href='javascript:;'>Return</a>"
|
innerHTML: "<a href='javascript:;'>Return</a>"
|
||||||
});
|
});
|
||||||
$.on($('a', div), 'click', function() {
|
$.on($('a', div), 'click', function() {
|
||||||
|
var themes;
|
||||||
|
|
||||||
|
themes = {
|
||||||
|
open: Settings.themes,
|
||||||
|
hyphenatedTitle: 'themes'
|
||||||
|
};
|
||||||
$.rm($.id("themeContainer"));
|
$.rm($.id("themeContainer"));
|
||||||
return Settings.openSection(themes);
|
return Settings.openSection.call(themes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add(parentdiv, suboptions);
|
$.add(parentdiv, suboptions);
|
||||||
@ -13894,12 +13903,17 @@
|
|||||||
return MascotTools.importMascot(e);
|
return MascotTools.importMascot(e);
|
||||||
});
|
});
|
||||||
$.on($('#undelete', batchmascots), 'click', function() {
|
$.on($('#undelete', batchmascots), 'click', function() {
|
||||||
|
var mascots;
|
||||||
|
|
||||||
if (!(Conf["Deleted Mascots"].length > 0)) {
|
if (!(Conf["Deleted Mascots"].length > 0)) {
|
||||||
alert("No mascots have been deleted.");
|
alert("No mascots have been deleted.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.rm($.id("mascotContainer"));
|
mascots = {
|
||||||
return Settings.mascotTab.dialog(Settings.el, 'undelete');
|
open: Settings.mascots,
|
||||||
|
hyphenatedTitle: 'mascots'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(mascots, ['restore']);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
categories = $.el("div", {
|
categories = $.el("div", {
|
||||||
@ -13926,8 +13940,13 @@
|
|||||||
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
|
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
|
||||||
});
|
});
|
||||||
$.on($('#return', batchmascots), 'click', function() {
|
$.on($('#return', batchmascots), 'click', function() {
|
||||||
$.rm($.id("mascotContainer"));
|
var mascots;
|
||||||
return Settings.section('mascots');
|
|
||||||
|
mascots = {
|
||||||
|
open: Settings.mascots,
|
||||||
|
hyphenatedTitle: 'mascots'
|
||||||
|
};
|
||||||
|
return Settings.openSection.apply(mascots);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
$.add(parentdiv, [suboptions, batchmascots, mascotHide]);
|
$.add(parentdiv, [suboptions, batchmascots, mascotHide]);
|
||||||
@ -14059,7 +14078,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"delete": function(e) {
|
"delete": function(e) {
|
||||||
var container, settheme;
|
var container, settheme,
|
||||||
|
_this = this;
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@ -14077,26 +14097,28 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Themes[this.name]["Deleted"] = true;
|
Themes[this.name]["Deleted"] = true;
|
||||||
return $.get("userThemes", {}, function() {
|
return $.get("userThemes", {}, function(_arg) {
|
||||||
var userThemes;
|
var userThemes;
|
||||||
|
|
||||||
userThemes = items['userThemes'];
|
userThemes = _arg.userThemes;
|
||||||
userThemes[this.name] = Themes[this.name];
|
userThemes[_this.name] = Themes[_this.name];
|
||||||
$.set('userThemes', userThemes);
|
$.set('userThemes', userThemes);
|
||||||
return $.rm(container);
|
return $.rm(container);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
restore: function() {
|
restore: function() {
|
||||||
|
var _this = this;
|
||||||
|
|
||||||
if (confirm("Are you sure you want to restore \"" + this.id + "\"?")) {
|
if (confirm("Are you sure you want to restore \"" + this.id + "\"?")) {
|
||||||
Themes[this.id]["Deleted"] = false;
|
Themes[this.id]["Deleted"] = false;
|
||||||
return $.get("userThemes", {}, function(item) {
|
return $.get("userThemes", {}, function(_arg) {
|
||||||
var userThemes;
|
var userThemes;
|
||||||
|
|
||||||
userThemes = item["userThemes"];
|
userThemes = _arg.userThemes;
|
||||||
userThemes[this.id] = Themes[this.id];
|
userThemes[_this.id] = Themes[_this.id];
|
||||||
$.set('userThemes', userThemes);
|
$.set('userThemes', userThemes);
|
||||||
return $.rm(this);
|
return $.rm(_this);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,7 +107,7 @@ Settings =
|
|||||||
hyphenatedTitle = title.toLowerCase().replace /\s+/g, '-'
|
hyphenatedTitle = title.toLowerCase().replace /\s+/g, '-'
|
||||||
Settings.sections.push {title, hyphenatedTitle, open}
|
Settings.sections.push {title, hyphenatedTitle, open}
|
||||||
|
|
||||||
openSection: (mode)->
|
openSection: (mode) ->
|
||||||
if selected = $ '.tab-selected', Settings.dialog
|
if selected = $ '.tab-selected', Settings.dialog
|
||||||
$.rmClass selected, 'tab-selected'
|
$.rmClass selected, 'tab-selected'
|
||||||
$.addClass $(".tab-#{@hyphenatedTitle}", Settings.dialog), 'tab-selected'
|
$.addClass $(".tab-#{@hyphenatedTitle}", Settings.dialog), 'tab-selected'
|
||||||
@ -549,12 +549,12 @@ Settings =
|
|||||||
for name in keys
|
for name in keys
|
||||||
theme = Themes[name]
|
theme = Themes[name]
|
||||||
|
|
||||||
unless theme["Deleted"]
|
continue if theme["Deleted"]
|
||||||
|
|
||||||
div = $.el 'div',
|
div = $.el 'div',
|
||||||
className: "theme #{if name is Conf['theme'] then 'selectedtheme' else ''}"
|
className: "theme #{if name is Conf['theme'] then 'selectedtheme' else ''}"
|
||||||
id: name
|
id: name
|
||||||
innerHTML: "
|
innerHTML: "
|
||||||
<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:#{theme['Reply Background']}!important;border:1px solid #{theme['Reply Border']}!important;color:#{theme['Text']}!important'>
|
<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:#{theme['Reply Background']}!important;border:1px solid #{theme['Reply Border']}!important;color:#{theme['Text']}!important'>
|
||||||
<div>
|
<div>
|
||||||
<div style='cursor: pointer; width: 9px; height: 9px; margin: 2px 3px; display: inline-block; vertical-align: bottom; background: #{theme['Checkbox Background']}; border: 1px solid #{theme['Checkbox Border']};'></div>
|
<div style='cursor: pointer; width: 9px; height: 9px; margin: 2px 3px; display: inline-block; vertical-align: bottom; background: #{theme['Checkbox Background']}; border: 1px solid #{theme['Checkbox Border']};'></div>
|
||||||
@ -598,14 +598,14 @@ Settings =
|
|||||||
</h1>
|
</h1>
|
||||||
</div>"
|
</div>"
|
||||||
|
|
||||||
div.style.backgroundColor = theme['Background Color']
|
div.style.backgroundColor = theme['Background Color']
|
||||||
|
|
||||||
$.on $('a.edit', div), 'click', cb.edit
|
$.on $('a.edit', div), 'click', cb.edit
|
||||||
$.on $('a.export', div), 'click', cb.export
|
$.on $('a.export', div), 'click', cb.export
|
||||||
$.on $('a.delete', div), 'click', cb.delete
|
$.on $('a.delete', div), 'click', cb.delete
|
||||||
$.on div, 'click', cb.select
|
$.on div, 'click', cb.select
|
||||||
|
|
||||||
$.add suboptions, div
|
$.add suboptions, div
|
||||||
|
|
||||||
div = $.el 'div',
|
div = $.el 'div',
|
||||||
id: 'addthemes'
|
id: 'addthemes'
|
||||||
@ -639,19 +639,24 @@ Settings =
|
|||||||
|
|
||||||
$.on $('#tUndelete', div), 'click', ->
|
$.on $('#tUndelete', div), 'click', ->
|
||||||
$.rm $.id "themeContainer"
|
$.rm $.id "themeContainer"
|
||||||
Settings.openSection themes, 'undelete'
|
|
||||||
|
themes =
|
||||||
|
open: Settings.themes
|
||||||
|
hyphenatedTitle: 'themes'
|
||||||
|
|
||||||
|
Settings.openSection.apply themes, ['undelete']
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
for name in keys
|
for name in keys
|
||||||
theme = Themes[name]
|
theme = Themes[name]
|
||||||
|
|
||||||
if theme["Deleted"]
|
continue unless theme["Deleted"]
|
||||||
|
|
||||||
div = $.el 'div',
|
div = $.el 'div',
|
||||||
id: name
|
id: name
|
||||||
className: theme
|
className: theme
|
||||||
innerHTML: "
|
innerHTML: "
|
||||||
<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:#{theme['Reply Background']}!important;border:1px solid #{theme['Reply Border']}!important;color:#{theme['Text']}!important'>
|
<div style='cursor: pointer; position: relative; margin-bottom: 2px; width: 100% !important; box-shadow: none !important; background:#{theme['Reply Background']}!important;border:1px solid #{theme['Reply Border']}!important;color:#{theme['Text']}!important'>
|
||||||
<div style='padding: 3px 0px 0px 8px;'>
|
<div style='padding: 3px 0px 0px 8px;'>
|
||||||
<span style='color:#{theme['Subjects']}!important; font-weight: 600 !important'>#{name}</span>
|
<span style='color:#{theme['Subjects']}!important; font-weight: 600 !important'>#{name}</span>
|
||||||
@ -670,17 +675,21 @@ Settings =
|
|||||||
</blockquote>
|
</blockquote>
|
||||||
</div>"
|
</div>"
|
||||||
|
|
||||||
$.on div, 'click', cb.restore
|
$.on div, 'click', cb.restore
|
||||||
|
|
||||||
$.add suboptions, div
|
$.add suboptions, div
|
||||||
|
|
||||||
div = $.el 'div',
|
div = $.el 'div',
|
||||||
id: 'addthemes'
|
id: 'addthemes'
|
||||||
innerHTML: "<a href='javascript:;'>Return</a>"
|
innerHTML: "<a href='javascript:;'>Return</a>"
|
||||||
|
|
||||||
$.on $('a', div), 'click', ->
|
$.on $('a', div), 'click', ->
|
||||||
|
themes =
|
||||||
|
open: Settings.themes
|
||||||
|
hyphenatedTitle: 'themes'
|
||||||
|
|
||||||
$.rm $.id "themeContainer"
|
$.rm $.id "themeContainer"
|
||||||
Settings.openSection themes
|
Settings.openSection.call themes
|
||||||
|
|
||||||
$.add parentdiv, suboptions
|
$.add parentdiv, suboptions
|
||||||
$.add parentdiv, div
|
$.add parentdiv, div
|
||||||
@ -815,8 +824,10 @@ Settings =
|
|||||||
unless Conf["Deleted Mascots"].length > 0
|
unless Conf["Deleted Mascots"].length > 0
|
||||||
alert "No mascots have been deleted."
|
alert "No mascots have been deleted."
|
||||||
return
|
return
|
||||||
$.rm $.id "mascotContainer"
|
mascots =
|
||||||
Settings.mascotTab.dialog Settings.el, 'undelete'
|
open: Settings.mascots
|
||||||
|
hyphenatedTitle: 'mascots'
|
||||||
|
Settings.openSection.apply mascots, ['restore']
|
||||||
|
|
||||||
else
|
else
|
||||||
categories = $.el "div",
|
categories = $.el "div",
|
||||||
@ -845,8 +856,10 @@ Settings =
|
|||||||
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
|
innerHTML: "<a href=\"javascript:;\" id=\"return\">Return</a>"
|
||||||
|
|
||||||
$.on $('#return', batchmascots), 'click', ->
|
$.on $('#return', batchmascots), 'click', ->
|
||||||
$.rm $.id "mascotContainer"
|
mascots =
|
||||||
Settings.section 'mascots'
|
open: Settings.mascots
|
||||||
|
hyphenatedTitle: 'mascots'
|
||||||
|
Settings.openSection.apply mascots
|
||||||
|
|
||||||
$.add parentdiv, [suboptions, batchmascots, mascotHide]
|
$.add parentdiv, [suboptions, batchmascots, mascotHide]
|
||||||
|
|
||||||
@ -973,8 +986,7 @@ Settings =
|
|||||||
$.set 'theme', Conf['theme']
|
$.set 'theme', Conf['theme']
|
||||||
Themes[@name]["Deleted"] = true
|
Themes[@name]["Deleted"] = true
|
||||||
|
|
||||||
$.get "userThemes", {}, ->
|
$.get "userThemes", {}, ({userThemes}) =>
|
||||||
userThemes = items['userThemes']
|
|
||||||
userThemes[@name] = Themes[@name]
|
userThemes[@name] = Themes[@name]
|
||||||
$.set 'userThemes', userThemes
|
$.set 'userThemes', userThemes
|
||||||
$.rm container
|
$.rm container
|
||||||
@ -982,8 +994,8 @@ Settings =
|
|||||||
restore: ->
|
restore: ->
|
||||||
if confirm "Are you sure you want to restore \"#{@id}\"?"
|
if confirm "Are you sure you want to restore \"#{@id}\"?"
|
||||||
Themes[@id]["Deleted"] = false
|
Themes[@id]["Deleted"] = false
|
||||||
$.get "userThemes", {}, (item) ->
|
|
||||||
userThemes = item["userThemes"]
|
$.get "userThemes", {}, ({userThemes}) =>
|
||||||
userThemes[@id] = Themes[@id]
|
userThemes[@id] = Themes[@id]
|
||||||
$.set 'userThemes', userThemes
|
$.set 'userThemes', userThemes
|
||||||
$.rm @
|
$.rm @
|
||||||
|
|||||||
@ -6,16 +6,15 @@ ThemeTools =
|
|||||||
init: (key) ->
|
init: (key) ->
|
||||||
Conf['editMode'] = "theme"
|
Conf['editMode'] = "theme"
|
||||||
|
|
||||||
if Themes[key]
|
if key
|
||||||
editTheme = JSON.parse(JSON.stringify(Themes[key]))
|
editTheme = JSON.parse(JSON.stringify(Themes[key]))
|
||||||
$.get "userThemes", {}, (items) ->
|
editTheme["Theme"] = if Conf['userThemes'][key]
|
||||||
if items[key]
|
key
|
||||||
editTheme["Theme"] = key
|
else
|
||||||
else
|
key += " [custom]"
|
||||||
editTheme["Theme"] = key += " [custom]"
|
|
||||||
else
|
else
|
||||||
editTheme = JSON.parse(JSON.stringify(Themes['Yotsuba B']))
|
editTheme = JSON.parse(JSON.stringify(Themes['Yotsuba B']))
|
||||||
editTheme["Theme"] = "Untitled"
|
editTheme["Theme"] = "Untitled"
|
||||||
editTheme["Author"] = "Author"
|
editTheme["Author"] = "Author"
|
||||||
editTheme["Author Tripcode"] = "Unknown"
|
editTheme["Author Tripcode"] = "Unknown"
|
||||||
|
|
||||||
@ -102,8 +101,10 @@ ThemeTools =
|
|||||||
$.on input, 'blur', ->
|
$.on input, 'blur', ->
|
||||||
editTheme[@name] = @value
|
editTheme[@name] = @value
|
||||||
$.add $("#themebar", ThemeTools.dialog), header
|
$.add $("#themebar", ThemeTools.dialog), header
|
||||||
themecontent = $("#themecontent", ThemeTools.dialog)
|
themeContent = $("#themecontent", ThemeTools.dialog)
|
||||||
|
|
||||||
|
nodes = []
|
||||||
|
|
||||||
for item in layout
|
for item in layout
|
||||||
unless editTheme[item]
|
unless editTheme[item]
|
||||||
editTheme[item] = ''
|
editTheme[item] = ''
|
||||||
@ -168,11 +169,9 @@ ThemeTools =
|
|||||||
|
|
||||||
editTheme[@name] = @value
|
editTheme[@name] = @value
|
||||||
|
|
||||||
Style.addStyle(editTheme)
|
nodes.push div
|
||||||
|
|
||||||
$.add themecontent, div
|
Style.addStyle(editTheme)
|
||||||
|
|
||||||
$.add themecontent, div
|
|
||||||
|
|
||||||
unless editTheme["Custom CSS"]
|
unless editTheme["Custom CSS"]
|
||||||
editTheme["Custom CSS"] = ""
|
editTheme["Custom CSS"] = ""
|
||||||
@ -185,12 +184,15 @@ ThemeTools =
|
|||||||
editTheme["Custom CSS"] = @value
|
editTheme["Custom CSS"] = @value
|
||||||
Style.themeCSS.textContent = Style.theme editTheme
|
Style.themeCSS.textContent = Style.theme editTheme
|
||||||
|
|
||||||
$.add themecontent, div
|
nodes.push div
|
||||||
|
|
||||||
$.on $('#save > a', ThemeTools.dialog), 'click', ->
|
$.on $('#save > a', ThemeTools.dialog), 'click', ->
|
||||||
ThemeTools.save editTheme
|
ThemeTools.save editTheme
|
||||||
|
|
||||||
$.on $('#close > a', ThemeTools.dialog), 'click', ThemeTools.close
|
$.on $('#close > a', ThemeTools.dialog), 'click', ThemeTools.close
|
||||||
|
|
||||||
|
$.add themeContent, nodes
|
||||||
|
|
||||||
$.add d.body, ThemeTools.dialog
|
$.add d.body, ThemeTools.dialog
|
||||||
Style.themeCSS.textContent = Style.theme editTheme
|
Style.themeCSS.textContent = Style.theme editTheme
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user