mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-06-27 04:51:25 +02:00
[refactor] organise control module
This commit is contained in:
parent
74ea775af1
commit
e8a29d9bc1
@ -127,7 +127,10 @@ var control = (function() {
|
|||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
|
||||||
mod.menu = [{
|
mod.menu = {
|
||||||
|
controls: {
|
||||||
|
nav: {
|
||||||
|
buttons: [{
|
||||||
element: ".control-menu-layout",
|
element: ".control-menu-layout",
|
||||||
type: "button",
|
type: "button",
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -187,7 +190,10 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
menu.close();
|
menu.close();
|
||||||
}
|
}
|
||||||
}, {
|
}]
|
||||||
|
},
|
||||||
|
layout: {
|
||||||
|
scaling: [{
|
||||||
element: ".control-layout-size-range",
|
element: ".control-layout-size-range",
|
||||||
path: "layout.size",
|
path: "layout.size",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -282,7 +288,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
area: [{
|
||||||
element: ".control-layout-width-range",
|
element: ".control-layout-width-range",
|
||||||
path: "layout.width",
|
path: "layout.width",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -373,7 +380,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
alignment: [{
|
||||||
element: ".control-layout-alignment-topleft",
|
element: ".control-layout-alignment-topleft",
|
||||||
path: "layout.alignment",
|
path: "layout.alignment",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -470,7 +478,8 @@ var control = (function() {
|
|||||||
render.dependents();
|
render.dependents();
|
||||||
header.render.color.scrolling();
|
header.render.color.scrolling();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
padding: [{
|
||||||
element: ".control-layout-padding-range",
|
element: ".control-layout-padding-range",
|
||||||
path: "layout.padding",
|
path: "layout.padding",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -559,7 +568,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
gutter: [{
|
||||||
element: ".control-layout-gutter-range",
|
element: ".control-layout-gutter-range",
|
||||||
path: "layout.gutter",
|
path: "layout.gutter",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -648,7 +658,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
page: [{
|
||||||
element: ".control-layout-title",
|
element: ".control-layout-title",
|
||||||
path: "layout.title",
|
path: "layout.title",
|
||||||
type: "text",
|
type: "text",
|
||||||
@ -684,7 +695,10 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}]
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
area: [{
|
||||||
element: ".control-header-area-width-range",
|
element: ".control-header-area-width-range",
|
||||||
path: "header.area.width",
|
path: "header.area.width",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -796,7 +810,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
alignment: [{
|
||||||
element: ".control-header-area-justify-left",
|
element: ".control-header-area-justify-left",
|
||||||
path: "header.area.justify",
|
path: "header.area.justify",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -879,7 +894,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
greeting: [{
|
||||||
element: ".control-header-greeting-show",
|
element: ".control-header-greeting-show",
|
||||||
path: "header.greeting.show",
|
path: "header.greeting.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -1036,7 +1052,150 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
|
}],
|
||||||
|
transitional: [{
|
||||||
|
element: ".control-header-transitional-show",
|
||||||
|
path: "header.transitional.show",
|
||||||
|
type: "checkbox",
|
||||||
|
func: function() {
|
||||||
|
header.render.item.clear();
|
||||||
|
header.render.item.all();
|
||||||
|
greeting.render.clear();
|
||||||
|
greeting.render.all();
|
||||||
|
clock.render.clear();
|
||||||
|
clock.render.all();
|
||||||
|
transitional.render.clear();
|
||||||
|
transitional.render.all();
|
||||||
|
date.render.clear();
|
||||||
|
date.render.all();
|
||||||
|
render.dependents();
|
||||||
|
render.update.control.header();
|
||||||
|
bind.control.header();
|
||||||
|
search.render.engine();
|
||||||
|
search.bind.input();
|
||||||
|
search.bind.clear();
|
||||||
|
dropdown.bind.editAdd();
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
|
element: ".control-header-transitional-type-timeanddate",
|
||||||
|
path: "header.transitional.type",
|
||||||
|
type: "radio",
|
||||||
|
func: function() {
|
||||||
|
transitional.render.clear();
|
||||||
|
transitional.render.all();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-transitional-type-its",
|
||||||
|
path: "header.transitional.type",
|
||||||
|
type: "radio",
|
||||||
|
func: function() {
|
||||||
|
transitional.render.clear();
|
||||||
|
transitional.render.all();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-transitional-size-range",
|
||||||
|
path: "header.transitional.size",
|
||||||
|
type: "range",
|
||||||
|
valueConvert: ["float"],
|
||||||
|
valueModify: {
|
||||||
|
min: 10,
|
||||||
|
max: 500,
|
||||||
|
step: 10
|
||||||
|
},
|
||||||
|
mirrorElement: [{
|
||||||
|
element: ".control-header-transitional-size-number",
|
||||||
|
path: "header.transitional.size",
|
||||||
|
type: "number",
|
||||||
|
valueConvert: ["float"]
|
||||||
|
}],
|
||||||
|
additionalEvents: [{
|
||||||
|
event: "input",
|
||||||
|
func: function() {
|
||||||
|
edge.box.open({
|
||||||
|
element: helper.e(".transitional"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
event: "mousedown",
|
||||||
|
func: function() {
|
||||||
|
edge.box.open({
|
||||||
|
element: helper.e(".transitional"),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
event: "mouseup",
|
||||||
|
func: function() {
|
||||||
|
edge.box.close();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
event: "touchend",
|
||||||
|
func: function() {
|
||||||
|
edge.box.close();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
event: "keydown",
|
||||||
|
func: function() {
|
||||||
|
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
||||||
|
edge.box.open({
|
||||||
|
element: helper.e(".transitional"),
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
event: "keyup",
|
||||||
|
func: function() {
|
||||||
|
edge.box.close();
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
func: function() {
|
||||||
|
header.render.transitional.size();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-transitional-size-number",
|
||||||
|
path: "header.transitional.size",
|
||||||
|
type: "number",
|
||||||
|
valueConvert: ["float"],
|
||||||
|
valueModify: {
|
||||||
|
min: 10,
|
||||||
|
max: 500,
|
||||||
|
step: 10
|
||||||
|
},
|
||||||
|
mirrorElement: [{
|
||||||
|
element: ".control-header-transitional-size-range",
|
||||||
|
path: "header.transitional.size",
|
||||||
|
type: "range",
|
||||||
|
valueConvert: ["float"]
|
||||||
|
}],
|
||||||
|
func: function() {
|
||||||
|
header.render.transitional.size();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-transitional-size-default",
|
||||||
|
type: "button",
|
||||||
|
additionalEvents: [{
|
||||||
|
event: "click",
|
||||||
|
func: function() {
|
||||||
|
edge.box.open({
|
||||||
|
element: helper.e(".transitional"),
|
||||||
|
delay: 500
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
func: function() {
|
||||||
|
mod.default("header.transitional.size");
|
||||||
|
header.render.transitional.size();
|
||||||
|
render.update.control.header();
|
||||||
|
render.update.control.menu();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-transitional-newline",
|
||||||
|
path: "header.transitional.newLine",
|
||||||
|
type: "checkbox",
|
||||||
|
func: function() {
|
||||||
|
render.class();
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
clock: [{
|
||||||
element: ".control-header-clock-hours-show",
|
element: ".control-header-clock-hours-show",
|
||||||
path: "header.clock.hours.show",
|
path: "header.clock.hours.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -1281,148 +1440,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
element: ".control-header-transitional-show",
|
|
||||||
path: "header.transitional.show",
|
|
||||||
type: "checkbox",
|
|
||||||
func: function() {
|
|
||||||
header.render.item.clear();
|
|
||||||
header.render.item.all();
|
|
||||||
greeting.render.clear();
|
|
||||||
greeting.render.all();
|
|
||||||
clock.render.clear();
|
|
||||||
clock.render.all();
|
|
||||||
transitional.render.clear();
|
|
||||||
transitional.render.all();
|
|
||||||
date.render.clear();
|
|
||||||
date.render.all();
|
|
||||||
render.dependents();
|
|
||||||
render.update.control.header();
|
|
||||||
bind.control.header();
|
|
||||||
search.render.engine();
|
|
||||||
search.bind.input();
|
|
||||||
search.bind.clear();
|
|
||||||
dropdown.bind.editAdd();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-transitional-type-timeanddate",
|
|
||||||
path: "header.transitional.type",
|
|
||||||
type: "radio",
|
|
||||||
func: function() {
|
|
||||||
transitional.render.clear();
|
|
||||||
transitional.render.all();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-transitional-type-its",
|
|
||||||
path: "header.transitional.type",
|
|
||||||
type: "radio",
|
|
||||||
func: function() {
|
|
||||||
transitional.render.clear();
|
|
||||||
transitional.render.all();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-transitional-size-range",
|
|
||||||
path: "header.transitional.size",
|
|
||||||
type: "range",
|
|
||||||
valueConvert: ["float"],
|
|
||||||
valueModify: {
|
|
||||||
min: 10,
|
|
||||||
max: 500,
|
|
||||||
step: 10
|
|
||||||
},
|
|
||||||
mirrorElement: [{
|
|
||||||
element: ".control-header-transitional-size-number",
|
|
||||||
path: "header.transitional.size",
|
|
||||||
type: "number",
|
|
||||||
valueConvert: ["float"]
|
|
||||||
}],
|
}],
|
||||||
additionalEvents: [{
|
date: [{
|
||||||
event: "input",
|
|
||||||
func: function() {
|
|
||||||
edge.box.open({
|
|
||||||
element: helper.e(".transitional"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
event: "mousedown",
|
|
||||||
func: function() {
|
|
||||||
edge.box.open({
|
|
||||||
element: helper.e(".transitional"),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
event: "mouseup",
|
|
||||||
func: function() {
|
|
||||||
edge.box.close();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
event: "touchend",
|
|
||||||
func: function() {
|
|
||||||
edge.box.close();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
event: "keydown",
|
|
||||||
func: function() {
|
|
||||||
if (event.keyCode == 37 || event.keyCode == 38 || event.keyCode == 39 || event.keyCode == 40) {
|
|
||||||
edge.box.open({
|
|
||||||
element: helper.e(".transitional"),
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
event: "keyup",
|
|
||||||
func: function() {
|
|
||||||
edge.box.close();
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
func: function() {
|
|
||||||
header.render.transitional.size();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-transitional-size-number",
|
|
||||||
path: "header.transitional.size",
|
|
||||||
type: "number",
|
|
||||||
valueConvert: ["float"],
|
|
||||||
valueModify: {
|
|
||||||
min: 10,
|
|
||||||
max: 500,
|
|
||||||
step: 10
|
|
||||||
},
|
|
||||||
mirrorElement: [{
|
|
||||||
element: ".control-header-transitional-size-range",
|
|
||||||
path: "header.transitional.size",
|
|
||||||
type: "range",
|
|
||||||
valueConvert: ["float"]
|
|
||||||
}],
|
|
||||||
func: function() {
|
|
||||||
header.render.transitional.size();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-transitional-size-default",
|
|
||||||
type: "button",
|
|
||||||
additionalEvents: [{
|
|
||||||
event: "click",
|
|
||||||
func: function() {
|
|
||||||
edge.box.open({
|
|
||||||
element: helper.e(".transitional"),
|
|
||||||
delay: 500
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}],
|
|
||||||
func: function() {
|
|
||||||
mod.default("header.transitional.size");
|
|
||||||
header.render.transitional.size();
|
|
||||||
render.update.control.header();
|
|
||||||
render.update.control.menu();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-transitional-newline",
|
|
||||||
path: "header.transitional.newLine",
|
|
||||||
type: "checkbox",
|
|
||||||
func: function() {
|
|
||||||
render.class();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-date-day-show",
|
element: ".control-header-date-day-show",
|
||||||
path: "header.date.day.show",
|
path: "header.date.day.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -1848,7 +1867,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
search: [{
|
||||||
element: ".control-header-search-show",
|
element: ".control-header-search-show",
|
||||||
path: "header.search.show",
|
path: "header.search.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -2240,7 +2260,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
editadd: [{
|
||||||
element: ".control-header-editadd-show",
|
element: ".control-header-editadd-show",
|
||||||
path: "header.editAdd.show",
|
path: "header.editAdd.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -2412,7 +2433,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
coloraccent: [{
|
||||||
element: ".control-header-coloraccent-show",
|
element: ".control-header-coloraccent-show",
|
||||||
path: "header.colorAccent.show",
|
path: "header.colorAccent.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -2606,7 +2628,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
settings: [{
|
||||||
element: ".control-header-menu-style-box",
|
element: ".control-header-menu-style-box",
|
||||||
path: "header.menu.style",
|
path: "header.menu.style",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -2754,7 +2777,112 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
|
}],
|
||||||
|
border: [{
|
||||||
|
element: ".control-header-border-top-range",
|
||||||
|
path: "header.border.top",
|
||||||
|
type: "range",
|
||||||
|
valueModify: {
|
||||||
|
min: 0,
|
||||||
|
max: 60
|
||||||
|
},
|
||||||
|
mirrorElement: [{
|
||||||
|
element: ".control-header-border-top-number",
|
||||||
|
path: "header.border.top",
|
||||||
|
type: "number"
|
||||||
|
}],
|
||||||
|
func: function() {
|
||||||
|
header.render.border();
|
||||||
|
render.class();
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
|
element: ".control-header-border-top-number",
|
||||||
|
path: "header.border.top",
|
||||||
|
type: "number",
|
||||||
|
valueModify: {
|
||||||
|
min: 0,
|
||||||
|
max: 60
|
||||||
|
},
|
||||||
|
mirrorElement: [{
|
||||||
|
element: ".control-header-border-top-range",
|
||||||
|
path: "header.border.top",
|
||||||
|
type: "range"
|
||||||
|
}],
|
||||||
|
func: function() {
|
||||||
|
header.render.border();
|
||||||
|
render.class();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-border-top-default",
|
||||||
|
type: "button",
|
||||||
|
func: function() {
|
||||||
|
mod.default("header.border.top");
|
||||||
|
header.render.border();
|
||||||
|
render.class();
|
||||||
|
render.update.control.header();
|
||||||
|
render.update.control.menu();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-border-bottom-range",
|
||||||
|
path: "header.border.bottom",
|
||||||
|
type: "range",
|
||||||
|
valueModify: {
|
||||||
|
min: 0,
|
||||||
|
max: 60
|
||||||
|
},
|
||||||
|
mirrorElement: [{
|
||||||
|
element: ".control-header-border-bottom-number",
|
||||||
|
path: "header.border.bottom",
|
||||||
|
type: "number"
|
||||||
|
}],
|
||||||
|
func: function() {
|
||||||
|
header.render.border();
|
||||||
|
render.class();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-border-bottom-number",
|
||||||
|
path: "header.border.bottom",
|
||||||
|
type: "number",
|
||||||
|
valueModify: {
|
||||||
|
min: 0,
|
||||||
|
max: 60
|
||||||
|
},
|
||||||
|
mirrorElement: [{
|
||||||
|
element: ".control-header-border-bottom-range",
|
||||||
|
path: "header.border.bottom",
|
||||||
|
type: "range"
|
||||||
|
}],
|
||||||
|
func: function() {
|
||||||
|
header.render.border();
|
||||||
|
render.class();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-border-bottom-default",
|
||||||
|
type: "button",
|
||||||
|
func: function() {
|
||||||
|
mod.default("header.border.bottom");
|
||||||
|
header.render.border();
|
||||||
|
render.class();
|
||||||
|
render.update.control.header();
|
||||||
|
render.update.control.menu();
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
position: [{
|
||||||
|
element: ".control-header-position-sticky",
|
||||||
|
path: "header.position",
|
||||||
|
type: "radio",
|
||||||
|
func: function() {
|
||||||
|
render.class();
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-header-position-inline",
|
||||||
|
path: "header.position",
|
||||||
|
type: "radio",
|
||||||
|
func: function() {
|
||||||
|
render.class();
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
color: [{
|
||||||
element: ".control-header-color-show",
|
element: ".control-header-color-show",
|
||||||
path: "header.color.show",
|
path: "header.color.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -2873,109 +3001,10 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}]
|
||||||
element: ".control-header-border-top-range",
|
|
||||||
path: "header.border.top",
|
|
||||||
type: "range",
|
|
||||||
valueModify: {
|
|
||||||
min: 0,
|
|
||||||
max: 60
|
|
||||||
},
|
},
|
||||||
mirrorElement: [{
|
bookmarks: {
|
||||||
element: ".control-header-border-top-number",
|
area: [{
|
||||||
path: "header.border.top",
|
|
||||||
type: "number"
|
|
||||||
}],
|
|
||||||
func: function() {
|
|
||||||
header.render.border();
|
|
||||||
render.class();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-border-top-number",
|
|
||||||
path: "header.border.top",
|
|
||||||
type: "number",
|
|
||||||
valueModify: {
|
|
||||||
min: 0,
|
|
||||||
max: 60
|
|
||||||
},
|
|
||||||
mirrorElement: [{
|
|
||||||
element: ".control-header-border-top-range",
|
|
||||||
path: "header.border.top",
|
|
||||||
type: "range"
|
|
||||||
}],
|
|
||||||
func: function() {
|
|
||||||
header.render.border();
|
|
||||||
render.class();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-border-top-default",
|
|
||||||
type: "button",
|
|
||||||
func: function() {
|
|
||||||
mod.default("header.border.top");
|
|
||||||
header.render.border();
|
|
||||||
render.class();
|
|
||||||
render.update.control.header();
|
|
||||||
render.update.control.menu();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-border-bottom-range",
|
|
||||||
path: "header.border.bottom",
|
|
||||||
type: "range",
|
|
||||||
valueModify: {
|
|
||||||
min: 0,
|
|
||||||
max: 60
|
|
||||||
},
|
|
||||||
mirrorElement: [{
|
|
||||||
element: ".control-header-border-bottom-number",
|
|
||||||
path: "header.border.bottom",
|
|
||||||
type: "number"
|
|
||||||
}],
|
|
||||||
func: function() {
|
|
||||||
header.render.border();
|
|
||||||
render.class();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-border-bottom-number",
|
|
||||||
path: "header.border.bottom",
|
|
||||||
type: "number",
|
|
||||||
valueModify: {
|
|
||||||
min: 0,
|
|
||||||
max: 60
|
|
||||||
},
|
|
||||||
mirrorElement: [{
|
|
||||||
element: ".control-header-border-bottom-range",
|
|
||||||
path: "header.border.bottom",
|
|
||||||
type: "range"
|
|
||||||
}],
|
|
||||||
func: function() {
|
|
||||||
header.render.border();
|
|
||||||
render.class();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-border-bottom-default",
|
|
||||||
type: "button",
|
|
||||||
func: function() {
|
|
||||||
mod.default("header.border.bottom");
|
|
||||||
header.render.border();
|
|
||||||
render.class();
|
|
||||||
render.update.control.header();
|
|
||||||
render.update.control.menu();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-position-sticky",
|
|
||||||
path: "header.position",
|
|
||||||
type: "radio",
|
|
||||||
func: function() {
|
|
||||||
render.class();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-header-position-inline",
|
|
||||||
path: "header.position",
|
|
||||||
type: "radio",
|
|
||||||
func: function() {
|
|
||||||
render.class();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-link-area-width-range",
|
element: ".control-link-area-width-range",
|
||||||
path: "link.area.width",
|
path: "link.area.width",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -3087,7 +3116,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
alignment: [{
|
||||||
element: ".control-link-area-justify-left",
|
element: ".control-link-area-justify-left",
|
||||||
path: "link.area.justify",
|
path: "link.area.justify",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -3149,7 +3179,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
bookmarks: [{
|
||||||
element: ".control-link-item-size-range",
|
element: ".control-link-item-size-range",
|
||||||
path: "link.item.size",
|
path: "link.item.size",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -3289,7 +3320,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
link.groupAndItems();
|
link.groupAndItems();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
content: [{
|
||||||
element: ".control-link-item-display-alignment-topcenter",
|
element: ".control-link-item-display-alignment-topcenter",
|
||||||
path: "link.item.display.alignment",
|
path: "link.item.display.alignment",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -3345,6 +3377,13 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
element: ".control-link-item-display-alignment-topleft",
|
||||||
|
path: "link.item.display.alignment",
|
||||||
|
type: "radio",
|
||||||
|
func: function() {
|
||||||
|
render.class();
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
element: ".control-link-item-display-rotate-range",
|
element: ".control-link-item-display-rotate-range",
|
||||||
path: "link.item.display.rotate",
|
path: "link.item.display.rotate",
|
||||||
@ -3549,7 +3588,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
letcon: [{
|
||||||
element: ".control-link-item-display-letcon-show",
|
element: ".control-link-item-display-letcon-show",
|
||||||
path: "link.item.display.letcon.show",
|
path: "link.item.display.letcon.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -3651,7 +3691,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
name: [{
|
||||||
element: ".control-link-item-display-name-show",
|
element: ".control-link-item-display-name-show",
|
||||||
path: "link.item.display.name.show",
|
path: "link.item.display.name.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -3706,14 +3747,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
element: ".control-link-item-display-alignment-topleft",
|
style: [{
|
||||||
path: "link.item.display.alignment",
|
|
||||||
type: "radio",
|
|
||||||
func: function() {
|
|
||||||
render.class();
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
element: ".control-link-style-block",
|
element: ".control-link-style-block",
|
||||||
path: "link.style",
|
path: "link.style",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -3727,7 +3762,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
color: [{
|
||||||
element: ".control-link-item-color-by-theme",
|
element: ".control-link-item-color-by-theme",
|
||||||
path: "link.item.color.by",
|
path: "link.item.color.by",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -3769,7 +3805,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
link.render.item.color.custom();
|
link.render.item.color.custom();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
border: [{
|
||||||
element: ".control-link-item-border-range",
|
element: ".control-link-item-border-range",
|
||||||
path: "link.item.border",
|
path: "link.item.border",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -3813,7 +3850,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
orientation: [{
|
||||||
element: ".control-link-orientation-top",
|
element: ".control-link-orientation-top",
|
||||||
path: "link.orientation",
|
path: "link.orientation",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -3827,7 +3865,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
sort: [{
|
||||||
element: ".control-link-sort-letter",
|
element: ".control-link-sort-letter",
|
||||||
type: "button",
|
type: "button",
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -3848,7 +3887,8 @@ var control = (function() {
|
|||||||
bookmarks.sort("name");
|
bookmarks.sort("name");
|
||||||
link.groupAndItems();
|
link.groupAndItems();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
accent: [{
|
||||||
element: ".control-link-accent-clear",
|
element: ".control-link-accent-clear",
|
||||||
type: "button",
|
type: "button",
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -3862,7 +3902,10 @@ var control = (function() {
|
|||||||
link.mod.accent.rainbow();
|
link.mod.accent.rainbow();
|
||||||
link.groupAndItems();
|
link.groupAndItems();
|
||||||
}
|
}
|
||||||
}, {
|
}]
|
||||||
|
},
|
||||||
|
groups: {
|
||||||
|
area: [{
|
||||||
element: ".control-group-area-justify-left",
|
element: ".control-group-area-justify-left",
|
||||||
path: "group.area.justify",
|
path: "group.area.justify",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -3883,7 +3926,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
order: [{
|
||||||
element: ".control-group-order-headerbody",
|
element: ".control-group-order-headerbody",
|
||||||
path: "group.order",
|
path: "group.order",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -3897,7 +3941,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
names: [{
|
||||||
element: ".control-group-name-show",
|
element: ".control-group-name-show",
|
||||||
path: "group.name.show",
|
path: "group.name.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -4001,7 +4046,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
openall: [{
|
||||||
element: ".control-group-openall-show",
|
element: ".control-group-openall-show",
|
||||||
path: "group.openAll.show",
|
path: "group.openAll.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -4119,7 +4165,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
link.groupAndItems();
|
link.groupAndItems();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
border: [{
|
||||||
element: ".control-group-border-range",
|
element: ".control-group-border-range",
|
||||||
path: "group.border",
|
path: "group.border",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -4163,7 +4210,10 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}]
|
||||||
|
},
|
||||||
|
theme: {
|
||||||
|
saved: [{
|
||||||
element: ".control-theme-custom-add",
|
element: ".control-theme-custom-add",
|
||||||
type: "button",
|
type: "button",
|
||||||
func: function() {
|
func: function() {
|
||||||
@ -4178,7 +4228,8 @@ var control = (function() {
|
|||||||
theme.render.custom.tabIndex();
|
theme.render.custom.tabIndex();
|
||||||
render.class();
|
render.class();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
style: [{
|
||||||
element: ".control-theme-style-dark",
|
element: ".control-theme-style-dark",
|
||||||
path: "theme.style",
|
path: "theme.style",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -4192,7 +4243,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
theme.style.light();
|
theme.style.light();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
fonts: [{
|
||||||
element: ".control-theme-font-display-name",
|
element: ".control-theme-font-display-name",
|
||||||
path: "theme.font.display.name",
|
path: "theme.font.display.name",
|
||||||
type: "text",
|
type: "text",
|
||||||
@ -4410,7 +4462,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
color: [{
|
||||||
element: ".control-theme-color-rgb-color",
|
element: ".control-theme-color-rgb-color",
|
||||||
path: "theme.color.rgb",
|
path: "theme.color.rgb",
|
||||||
type: "color",
|
type: "color",
|
||||||
@ -5336,7 +5389,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
accent: [{
|
||||||
element: ".control-theme-accent-rgb-color",
|
element: ".control-theme-accent-rgb-color",
|
||||||
path: "theme.accent.rgb",
|
path: "theme.accent.rgb",
|
||||||
type: "color",
|
type: "color",
|
||||||
@ -5446,7 +5500,8 @@ var control = (function() {
|
|||||||
theme.accent.random();
|
theme.accent.random();
|
||||||
link.groupAndItems();
|
link.groupAndItems();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
radius: [{
|
||||||
element: ".control-theme-radius-range",
|
element: ".control-theme-radius-range",
|
||||||
path: "theme.radius",
|
path: "theme.radius",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -5495,7 +5550,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
shadow: [{
|
||||||
element: ".control-theme-shadow-range",
|
element: ".control-theme-shadow-range",
|
||||||
path: "theme.shadow",
|
path: "theme.shadow",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -5542,7 +5598,8 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
shade: [{
|
||||||
element: ".control-theme-shade-opacity-range",
|
element: ".control-theme-shade-opacity-range",
|
||||||
path: "theme.shade.opacity",
|
path: "theme.shade.opacity",
|
||||||
type: "range",
|
type: "range",
|
||||||
@ -5589,7 +5646,10 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}]
|
||||||
|
},
|
||||||
|
background: {
|
||||||
|
color: [{
|
||||||
element: ".control-background-color-by-theme",
|
element: ".control-background-color-by-theme",
|
||||||
path: "background.color.by",
|
path: "background.color.by",
|
||||||
type: "radio",
|
type: "radio",
|
||||||
@ -5631,7 +5691,8 @@ var control = (function() {
|
|||||||
func: function() {
|
func: function() {
|
||||||
background.render.color.custom();
|
background.render.color.custom();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
image: [{
|
||||||
element: ".control-background-image-show",
|
element: ".control-background-image-show",
|
||||||
path: "background.image.show",
|
path: "background.image.show",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
@ -5902,26 +5963,45 @@ var control = (function() {
|
|||||||
render.update.control.header();
|
render.update.control.header();
|
||||||
render.update.control.menu();
|
render.update.control.menu();
|
||||||
}
|
}
|
||||||
}, {
|
}]
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
restore: [{
|
||||||
element: ".control-data-import",
|
element: ".control-data-import",
|
||||||
type: "file",
|
type: "file",
|
||||||
func: function() {
|
func: function() {
|
||||||
data.mod.import();
|
data.mod.import();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
backup: [{
|
||||||
element: ".control-data-export",
|
element: ".control-data-export",
|
||||||
type: "a",
|
type: "a",
|
||||||
func: function() {
|
func: function() {
|
||||||
data.mod.export();
|
data.mod.export();
|
||||||
}
|
}
|
||||||
}, {
|
}],
|
||||||
|
clear: [{
|
||||||
element: ".control-data-clear",
|
element: ".control-data-clear",
|
||||||
type: "a",
|
type: "a",
|
||||||
func: function() {
|
func: function() {
|
||||||
menu.close();
|
menu.close();
|
||||||
data.render.clear();
|
data.render.clear();
|
||||||
}
|
}
|
||||||
}];
|
}]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
all: function() {
|
||||||
|
var allMenuControls = [];
|
||||||
|
for (key1 in mod.menu.controls) {
|
||||||
|
for (key2 in mod.menu.controls[key1]) {
|
||||||
|
mod.menu.controls[key1][key2].forEach(function(arrayItem, index) {
|
||||||
|
allMenuControls.push(arrayItem);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
return allMenuControls;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
mod.default = function(path) {
|
mod.default = function(path) {
|
||||||
helper.setObject({
|
helper.setObject({
|
||||||
@ -6102,7 +6182,7 @@ var control = (function() {
|
|||||||
bind.control.action(object);
|
bind.control.action(object);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
mod.menu.forEach(function(arrayItem, index) {
|
mod.menu.all().forEach(function(arrayItem, index) {
|
||||||
if (helper.e(arrayItem.element)) {
|
if (helper.e(arrayItem.element)) {
|
||||||
bind.control.action(arrayItem);
|
bind.control.action(arrayItem);
|
||||||
};
|
};
|
||||||
@ -7511,7 +7591,7 @@ var control = (function() {
|
|||||||
render.update.value.set[object.type](object);
|
render.update.value.set[object.type](object);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
mod.menu.forEach(function(arrayItem, index) {
|
mod.menu.all().forEach(function(arrayItem, index) {
|
||||||
if (bind.control.supportedElement.includes(arrayItem.type)) {
|
if (bind.control.supportedElement.includes(arrayItem.type)) {
|
||||||
render.update.value.set[arrayItem.type](arrayItem);
|
render.update.value.set[arrayItem.type](arrayItem);
|
||||||
};
|
};
|
||||||
@ -7523,7 +7603,7 @@ var control = (function() {
|
|||||||
|
|
||||||
render.input = {
|
render.input = {
|
||||||
header: function() {
|
header: function() {
|
||||||
mod.menu.forEach(function(arrayItem, index) {
|
mod.header.forEach(function(arrayItem, index) {
|
||||||
if (arrayItem.valueModify) {
|
if (arrayItem.valueModify) {
|
||||||
for (var key in arrayItem.valueModify) {
|
for (var key in arrayItem.valueModify) {
|
||||||
helper.e(arrayItem.element)[key] = arrayItem.valueModify[key];
|
helper.e(arrayItem.element)[key] = arrayItem.valueModify[key];
|
||||||
@ -7532,7 +7612,7 @@ var control = (function() {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
menu: function() {
|
menu: function() {
|
||||||
mod.header.forEach(function(arrayItem, index) {
|
mod.menu.all().forEach(function(arrayItem, index) {
|
||||||
if (arrayItem.valueModify) {
|
if (arrayItem.valueModify) {
|
||||||
for (var key in arrayItem.valueModify) {
|
for (var key in arrayItem.valueModify) {
|
||||||
helper.e(arrayItem.element)[key] = arrayItem.valueModify[key];
|
helper.e(arrayItem.element)[key] = arrayItem.valueModify[key];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user