Skip to content

Commit f7be3c8

Browse files
committed
[feature] add clock and date separator text default controls
1 parent 7c261b3 commit f7be3c8

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

‎src/html/menu/content/header/clock.html‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ <h1 class="menu-item-header-text">Clock</h1>
6060
</div>
6161
<divclass="form-indent">
6262
<divclass="form-wrap">
63-
<inputid="control-header-clock-separator-text" class="control-header-clock-separator-text" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder=":" tabindex="-1">
63+
<divclass="form-group form-group-block">
64+
<inputid="control-header-clock-separator-text" class="control-header-clock-separator-text" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder=":" tabindex="-1">
65+
<buttonclass="control-header-clock-separator-text-default button" tabindex="-1" title="Reset to default"><spanclass="icon-replay"></span></button>
66+
</div>
6467
</div>
6568
</div>
6669
<hr>

‎src/html/menu/content/header/date.html‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ <h1 class="menu-item-header-text">Date</h1>
143143
</div>
144144
<divclass="form-indent">
145145
<divclass="form-wrap">
146-
<inputid="control-header-date-separator-text" class="control-header-date-separator-text" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="/" tabindex="-1">
146+
<divclass="form-group form-group-block">
147+
<inputid="control-header-date-separator-text" class="control-header-date-separator-text" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" placeholder="/" tabindex="-1">
148+
<buttonclass="control-header-date-separator-text-default button" tabindex="-1" title="Reset to default"><spanclass="icon-replay"></span></button>
149+
</div>
147150
</div>
148151
</div>
149152
<hr>

‎src/js/control.js‎

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,15 @@ var control = (function(){
13281328
clock.render.clear();
13291329
clock.render.all();
13301330
}
1331+
},{
1332+
element: ".control-header-clock-separator-text-default",
1333+
type: "button",
1334+
func: function(){
1335+
mod.default("header.clock.separator.text");
1336+
clock.render.clear();
1337+
clock.render.all();
1338+
render.update.control.menu();
1339+
}
13311340
},{
13321341
element: ".control-header-clock-hour24-show",
13331342
path: "header.clock.hour24.show",
@@ -1762,6 +1771,19 @@ var control = (function(){
17621771
transitional.render.clear();
17631772
transitional.render.all();
17641773
}
1774+
},{
1775+
element: ".control-header-date-separator-text-default",
1776+
type: "button",
1777+
func: function(){
1778+
mod.default("header.date.separator.text");
1779+
date.render.clear();
1780+
date.render.all();
1781+
greeting.render.clear();
1782+
greeting.render.all();
1783+
transitional.render.clear();
1784+
transitional.render.all();
1785+
render.update.control.menu();
1786+
}
17651787
},{
17661788
element: ".control-header-date-format-datemonth",
17671789
path: "header.date.format",
@@ -6899,7 +6921,8 @@ var control = (function(){
68996921
dependents: function(){
69006922
return[
69016923
".control-header-clock-separator-show",
6902-
".control-header-clock-separator-text"
6924+
".control-header-clock-separator-text",
6925+
".control-header-clock-separator-text-default"
69036926
];
69046927
}
69056928
},{
@@ -6915,7 +6938,8 @@ var control = (function(){
69156938
},
69166939
dependents: function(){
69176940
return[
6918-
".control-header-clock-separator-text"
6941+
".control-header-clock-separator-text",
6942+
".control-header-clock-separator-text-default"
69196943
];
69206944
}
69216945
},{
@@ -7024,7 +7048,8 @@ var control = (function(){
70247048
dependents: function(){
70257049
return[
70267050
".control-header-date-separator-show",
7027-
".control-header-date-separator-text"
7051+
".control-header-date-separator-text",
7052+
".control-header-date-separator-text-default"
70287053
];
70297054
}
70307055
},{
@@ -7040,7 +7065,8 @@ var control = (function(){
70407065
},
70417066
dependents: function(){
70427067
return[
7043-
".control-header-date-separator-text"
7068+
".control-header-date-separator-text",
7069+
".control-header-date-separator-text-default"
70447070
];
70457071
}
70467072
},{

0 commit comments

Comments
(0)