Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
feat(ui): Toggle section display when clicking on label
Browse files Browse the repository at this point in the history
This seems more useful, as toggling section automation is less commonly required.
  • Loading branch information
oliversalzburg committed Jul 17, 2021
1 parent 14633c5 commit 09a2ddd
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/BonfireSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export class BonfireSettingsUi extends SettingsSectionUi<BonfireSettings> {
const element = $("<li/>", { id: "ks-" + toggleName });

const label = $("<label/>", {
for: "toggle-" + toggleName,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: "toggle-" + toggleName,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/CraftSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ export class CraftSettingsUi extends SettingsSectionUi<CraftSettings> {
const element = $("<li/>", { id: `ks-${toggleName}` });

const label = $("<label/>", {
for: `toggle-${toggleName}`,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: `toggle-${toggleName}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/DistributeSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export class DistributeSettingsUi extends SettingsSectionUi<DistributeSettings>
const element = $("<li/>", { id: `ks-${toggleName}` });

const label = $("<label/>", {
for: "toggle-" + toggleName,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: "toggle-" + toggleName,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/EngineSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class EngineSettingsUi extends SettingsSectionUi<EngineSettings> {
const element = $("<li/>", { id: "ks-" + toggleName });

const label = $("<label/>", {
for: "toggle-" + toggleName,
//for: "toggle-" + toggleName,
text: itext,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/FilterSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export class FiltersSettingsUi extends SettingsSectionUi<FilterSettings> {
const element = $("<li/>", { id: "ks-" + toggleName });

const label = $("<label/>", {
for: "toggle-" + toggleName,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: "toggle-" + toggleName,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/OptionsSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export class OptionsSettingsUi extends SettingsSectionUi<OptionsSettings> {
const element = $("<li/>", { id: "ks-" + toggleName });

const label = $("<label/>", {
for: "toggle-" + toggleName,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: "toggle-" + toggleName,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/ReligionSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export class ReligionSettingsUi extends SettingsSectionUi<ReligionSettings> {
const element = $("<li/>", { id: `ks-${toggleName}` });

const label = $("<label/>", {
for: `toggle-${toggleName}`,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: `toggle-${toggleName}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/SpaceSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export class SpaceSettingsUi extends SettingsSectionUi<SpaceSettings> {
const element = $("<li/>", { id: "ks-" + toggleName });

const label = $("<label/>", {
for: "toggle-" + toggleName,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: "toggle-" + toggleName,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/TimeControlSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export class TimeControlSettingsUi extends SettingsSectionUi<TimeControlSettings
const element = $("<li/>", { id: `ks-${toggleName}` });

const label = $("<label/>", {
for: `toggle-${toggleName}`,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: `toggle-${toggleName}`,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/TimeSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export class TimeSettingsUi extends SettingsSectionUi<TimeSettings> {
const element = $("<li/>", { id: "ks-" + toggleName });

const label = $("<label/>", {
for: "toggle-" + toggleName,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: "toggle-" + toggleName,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/TradingSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export class TradingSettingsUi extends SettingsSectionUi<TradingSettings> {
const element = $("<li/>", { id: "ks-" + toggleName });

const label = $("<label/>", {
for: "toggle-" + toggleName,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: "toggle-" + toggleName,
Expand Down
2 changes: 1 addition & 1 deletion packages/userscript/source/ui/UnlockingSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ export class UnlockingSettingsUi extends SettingsSectionUi<UnlockingSettings> {
const element = $("<li/>", { id: "ks-" + toggleName });

const label = $("<label/>", {
for: "toggle-" + toggleName,
text: itext,
});
label.on("click", () => this._itemsButton.trigger("click"));

const input = $("<input/>", {
id: "toggle-" + toggleName,
Expand Down

0 comments on commit 09a2ddd

Please sign in to comment.