[refactor] fix a word

This commit is contained in:
zombieFox 2019-01-05 22:35:50 +00:00
parent 4d4d8668dd
commit 44f678f79a
7 changed files with 28 additions and 28 deletions

View File

@ -13,7 +13,7 @@
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.clock-seperator, .clock-separator,
.clock-hours, .clock-hours,
.clock-minutes, .clock-minutes,
.clock-seconds, .clock-seconds,
@ -24,7 +24,7 @@
align-items: center; align-items: center;
} }
.clock-seperator { .clock-separator {
min-width: 0.5em; min-width: 0.5em;
color: rgb(var(--accent)); color: rgb(var(--accent));
} }

View File

@ -13,7 +13,7 @@
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.date-seperator, .date-separator,
.date-date, .date-date,
.date-day, .date-day,
.date-month, .date-month,
@ -24,7 +24,7 @@
align-items: center; align-items: center;
} }
.date-seperator { .date-separator {
min-width: 0.5em; min-width: 0.5em;
color: rgb(var(--accent)); color: rgb(var(--accent));
} }

View File

@ -115,8 +115,8 @@
<label for="control-header-clock-show-seconds"><span class="label-icon"></span>Seconds</label> <label for="control-header-clock-show-seconds"><span class="label-icon"></span>Seconds</label>
</div> </div>
<div class="checkbox-wrap"> <div class="checkbox-wrap">
<input id="control-header-clock-show-seperator" class="control-header-clock-show-seperator" type="checkbox" tabindex="1"> <input id="control-header-clock-show-separator" class="control-header-clock-show-separator" type="checkbox" tabindex="1">
<label for="control-header-clock-show-seperator"><span class="label-icon"></span>Seperators</label> <label for="control-header-clock-show-separator"><span class="label-icon"></span>Separators</label>
</div> </div>
<div class="checkbox-wrap"> <div class="checkbox-wrap">
<input id="control-header-clock-24" class="control-header-clock-24" type="checkbox" tabindex="1"> <input id="control-header-clock-24" class="control-header-clock-24" type="checkbox" tabindex="1">
@ -146,8 +146,8 @@
<label for="control-header-date-show-year"><span class="label-icon"></span>Year</label> <label for="control-header-date-show-year"><span class="label-icon"></span>Year</label>
</div> </div>
<div class="checkbox-wrap"> <div class="checkbox-wrap">
<input id="control-header-date-show-seperator" class="control-header-date-show-seperator" type="checkbox" tabindex="1"> <input id="control-header-date-show-separator" class="control-header-date-show-separator" type="checkbox" tabindex="1">
<label for="control-header-date-show-seperator"><span class="label-icon"></span>Seperators</label> <label for="control-header-date-show-separator"><span class="label-icon"></span>Separators</label>
</div> </div>
<div class="radio-wrap"> <div class="radio-wrap">
<input id="control-header-date-character-length-short" class="control-header-date-character-length-short" type="radio" tabindex="1" name="control-header-date-character-length" value="short"> <input id="control-header-date-character-length-short" class="control-header-date-character-length-short" type="radio" tabindex="1" name="control-header-date-character-length" value="short">

View File

@ -88,20 +88,20 @@ var clock = (function() {
if (!state.get().header.clock.hour24 && state.get().header.clock.show.meridiem) { if (!state.get().header.clock.hour24 && state.get().header.clock.show.meridiem) {
clock.appendChild(meridiem); clock.appendChild(meridiem);
}; };
if (state.get().header.clock.show.seperator) { if (state.get().header.clock.show.separator) {
var parts = clock.querySelectorAll("span"); var parts = clock.querySelectorAll("span");
if (parts.length > 1) { if (parts.length > 1) {
parts.forEach(function(arrayItem, index) { parts.forEach(function(arrayItem, index) {
if (index > 0 && !arrayItem.classList.contains("clock-meridiem")) { if (index > 0 && !arrayItem.classList.contains("clock-meridiem")) {
var seperator = helper.makeNode({ var separator = helper.makeNode({
tag: "span", tag: "span",
text: sepCha, text: sepCha,
attr: [{ attr: [{
key: "class", key: "class",
value: "clock-seperator" value: "clock-separator"
}] }]
}); });
clock.insertBefore(seperator, arrayItem); clock.insertBefore(separator, arrayItem);
}; };
}); });
}; };

View File

@ -118,9 +118,9 @@ var control = (function() {
}; };
}); });
if (activeCount >= 2 && (state.get().header.date.show.date || state.get().header.date.show.day || state.get().header.date.show.month || state.get().header.date.show.year)) { if (activeCount >= 2 && (state.get().header.date.show.date || state.get().header.date.show.day || state.get().header.date.show.month || state.get().header.date.show.year)) {
helper.e(".control-header-date-show-seperator").disabled = false; helper.e(".control-header-date-show-separator").disabled = false;
} else { } else {
helper.e(".control-header-date-show-seperator").disabled = true; helper.e(".control-header-date-show-separator").disabled = true;
}; };
if (state.get().header.date.show.day || state.get().header.date.show.month) { if (state.get().header.date.show.day || state.get().header.date.show.month) {
helper.e(".control-header-date-character-length-short").disabled = false; helper.e(".control-header-date-character-length-short").disabled = false;
@ -139,9 +139,9 @@ var control = (function() {
}; };
}); });
if (activeCount >= 2 && (state.get().header.clock.show.seconds || state.get().header.clock.show.minutes || state.get().header.clock.show.hours)) { if (activeCount >= 2 && (state.get().header.clock.show.seconds || state.get().header.clock.show.minutes || state.get().header.clock.show.hours)) {
helper.e(".control-header-clock-show-seperator").disabled = false; helper.e(".control-header-clock-show-separator").disabled = false;
} else { } else {
helper.e(".control-header-clock-show-seperator").disabled = true; helper.e(".control-header-clock-show-separator").disabled = true;
}; };
if (state.get().header.clock.show.seconds || state.get().header.clock.show.minutes || state.get().header.clock.show.hours) { if (state.get().header.clock.show.seconds || state.get().header.clock.show.minutes || state.get().header.clock.show.hours) {
helper.e(".control-header-clock-24").disabled = false; helper.e(".control-header-clock-24").disabled = false;
@ -327,9 +327,9 @@ var control = (function() {
header.render(); header.render();
data.save(); data.save();
}, false); }, false);
helper.e(".control-header-date-show-seperator").addEventListener("change", function() { helper.e(".control-header-date-show-separator").addEventListener("change", function() {
state.change({ state.change({
path: "header.date.show.seperator", path: "header.date.show.separator",
value: this.checked value: this.checked
}); });
render(); render();
@ -388,9 +388,9 @@ var control = (function() {
header.render(); header.render();
data.save(); data.save();
}, false); }, false);
helper.e(".control-header-clock-show-seperator").addEventListener("change", function() { helper.e(".control-header-clock-show-separator").addEventListener("change", function() {
state.change({ state.change({
path: "header.clock.show.seperator", path: "header.clock.show.separator",
value: this.checked value: this.checked
}); });
clock.clear(); clock.clear();
@ -482,11 +482,11 @@ var control = (function() {
helper.e(".control-header-date-show-day").checked = state.get().header.date.show.day; helper.e(".control-header-date-show-day").checked = state.get().header.date.show.day;
helper.e(".control-header-date-show-month").checked = state.get().header.date.show.month; helper.e(".control-header-date-show-month").checked = state.get().header.date.show.month;
helper.e(".control-header-date-show-year").checked = state.get().header.date.show.year; helper.e(".control-header-date-show-year").checked = state.get().header.date.show.year;
helper.e(".control-header-date-show-seperator").checked = state.get().header.date.show.seperator; helper.e(".control-header-date-show-separator").checked = state.get().header.date.show.separator;
helper.e(".control-header-clock-show-seconds").checked = state.get().header.clock.show.seconds; helper.e(".control-header-clock-show-seconds").checked = state.get().header.clock.show.seconds;
helper.e(".control-header-clock-show-minutes").checked = state.get().header.clock.show.minutes; helper.e(".control-header-clock-show-minutes").checked = state.get().header.clock.show.minutes;
helper.e(".control-header-clock-show-hours").checked = state.get().header.clock.show.hours; helper.e(".control-header-clock-show-hours").checked = state.get().header.clock.show.hours;
helper.e(".control-header-clock-show-seperator").checked = state.get().header.clock.show.seperator; helper.e(".control-header-clock-show-separator").checked = state.get().header.clock.show.separator;
helper.e(".control-header-clock-24").checked = state.get().header.clock.hour24; helper.e(".control-header-clock-24").checked = state.get().header.clock.hour24;
helper.e(".control-header-clock-show-meridiem").checked = state.get().header.clock.show.meridiem; helper.e(".control-header-clock-show-meridiem").checked = state.get().header.clock.show.meridiem;
helper.e(".control-header-edit-add-active").checked = state.get().header.editAdd.active; helper.e(".control-header-edit-add-active").checked = state.get().header.editAdd.active;

View File

@ -74,20 +74,20 @@ var date = (function() {
if (state.get().header.date.show.year) { if (state.get().header.date.show.year) {
date.appendChild(year); date.appendChild(year);
}; };
if (state.get().header.date.show.seperator) { if (state.get().header.date.show.separator) {
var parts = date.querySelectorAll("span"); var parts = date.querySelectorAll("span");
if (parts.length > 1) { if (parts.length > 1) {
parts.forEach(function(arrayItem, index) { parts.forEach(function(arrayItem, index) {
if (index > 0) { if (index > 0) {
var seperator = helper.makeNode({ var separator = helper.makeNode({
tag: "span", tag: "span",
text: sepCha, text: sepCha,
attr: [{ attr: [{
key: "class", key: "class",
value: "date-seperator" value: "date-separator"
}] }]
}); });
date.insertBefore(seperator, arrayItem); date.insertBefore(separator, arrayItem);
}; };
}); });
}; };

View File

@ -9,7 +9,7 @@ var state = (function() {
day: false, day: false,
month: true, month: true,
year: false, year: false,
seperator: true separator: true
} }
}, },
clock: { clock: {
@ -18,7 +18,7 @@ var state = (function() {
seconds: true, seconds: true,
minutes: true, minutes: true,
hours: true, hours: true,
seperator: true, separator: true,
meridiem: true meridiem: true
} }
}, },