Skip to content

Commit

Permalink
[feature] add clock and date separator text default controls
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieFox committed Mar 21, 2020
1 parent 7c261b3 commit f7be3c8
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/html/menu/content/header/clock.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ <h1 class="menu-item-header-text">Clock</h1>
</div>
<div class="form-indent">
<div class="form-wrap">
<input id="control-header-clock-separator-text" class="control-header-clock-separator-text" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder=":" tabindex="-1">
<div class="form-group form-group-block">
<input id="control-header-clock-separator-text" class="control-header-clock-separator-text" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder=":" tabindex="-1">
<button class="control-header-clock-separator-text-default button" tabindex="-1" title="Reset to default"><span class="icon-replay"></span></button>
</div>
</div>
</div>
<hr>
Expand Down
5 changes: 4 additions & 1 deletion src/html/menu/content/header/date.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ <h1 class="menu-item-header-text">Date</h1>
</div>
<div class="form-indent">
<div class="form-wrap">
<input id="control-header-date-separator-text" class="control-header-date-separator-text" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="/" tabindex="-1">
<div class="form-group form-group-block">
<input id="control-header-date-separator-text" class="control-header-date-separator-text" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="/" tabindex="-1">
<button class="control-header-date-separator-text-default button" tabindex="-1" title="Reset to default"><span class="icon-replay"></span></button>
</div>
</div>
</div>
<hr>
Expand Down
34 changes: 30 additions & 4 deletions src/js/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,15 @@ var control = (function() {
clock.render.clear();
clock.render.all();
}
}, {
element: ".control-header-clock-separator-text-default",
type: "button",
func: function() {
mod.default("header.clock.separator.text");
clock.render.clear();
clock.render.all();
render.update.control.menu();
}
}, {
element: ".control-header-clock-hour24-show",
path: "header.clock.hour24.show",
Expand Down Expand Up @@ -1762,6 +1771,19 @@ var control = (function() {
transitional.render.clear();
transitional.render.all();
}
}, {
element: ".control-header-date-separator-text-default",
type: "button",
func: function() {
mod.default("header.date.separator.text");
date.render.clear();
date.render.all();
greeting.render.clear();
greeting.render.all();
transitional.render.clear();
transitional.render.all();
render.update.control.menu();
}
}, {
element: ".control-header-date-format-datemonth",
path: "header.date.format",
Expand Down Expand Up @@ -6899,7 +6921,8 @@ var control = (function() {
dependents: function() {
return [
".control-header-clock-separator-show",
".control-header-clock-separator-text"
".control-header-clock-separator-text",
".control-header-clock-separator-text-default"
];
}
}, {
Expand All @@ -6915,7 +6938,8 @@ var control = (function() {
},
dependents: function() {
return [
".control-header-clock-separator-text"
".control-header-clock-separator-text",
".control-header-clock-separator-text-default"
];
}
}, {
Expand Down Expand Up @@ -7024,7 +7048,8 @@ var control = (function() {
dependents: function() {
return [
".control-header-date-separator-show",
".control-header-date-separator-text"
".control-header-date-separator-text",
".control-header-date-separator-text-default"
];
}
}, {
Expand All @@ -7040,7 +7065,8 @@ var control = (function() {
},
dependents: function() {
return [
".control-header-date-separator-text"
".control-header-date-separator-text",
".control-header-date-separator-text-default"
];
}
}, {
Expand Down

0 comments on commit f7be3c8

Please sign in to comment.