Replace palette-edit button with menu option

This commit is contained in:
Nick O'Leary
2016-09-30 20:33:27 +01:00
parent 538a16a5fb
commit b00985f99f
5 changed files with 64 additions and 65 deletions

View File

@@ -256,6 +256,9 @@ RED.palette.editor = (function() {
}
function showPaletteEditor() {
if (RED.settings.theme('palette.editable') === false) {
return;
}
$("#header-shade").show();
$("#editor-shade").show();
$("#sidebar-shade").show();
@@ -368,8 +371,9 @@ RED.palette.editor = (function() {
}
function init() {
$(".palette-editor-button").show();
if (RED.settings.theme('palette.editable') === false) {
return;
}
editorTabs = RED.tabs.create({
id:"palette-editor-tabs",
@@ -402,13 +406,7 @@ RED.palette.editor = (function() {
hidePaletteEditor();
}
});
$("#palette-edit").on("click",function(e) {
if ($("#main-container").hasClass("palette-expanded")) {
hidePaletteEditor();
} else {
showPaletteEditor();
}
});
$("#palette-editor-close").on("click", function(e) {
hidePaletteEditor();
})
@@ -737,5 +735,6 @@ RED.palette.editor = (function() {
return {
init: init,
show: showPaletteEditor
}
})();

View File

@@ -467,10 +467,6 @@ RED.palette = (function() {
}
}
});
if (RED.settings.theme('palette.editable') !== false) {
RED.palette.editor.init();
}
}
return {