Skip to content

Commit

Permalink
1.0.0-b4
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWCS committed Dec 6, 2023
1 parent 4ed747b commit 0440530
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lukewcs/togglectrl/adm/style/acp_togglectrl_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h1>{{ lang('TOGGLECTRL_CONFIG_TITLE') }}</h1>
</dd>
</dl>

<dl id="togglectrl_opt_type">
<dl>
<dt>
<label>{{ lang('TOGGLECTRL_TYPE') ~ lang('COLON') }}</label><br>
<span>{{ lang('TOGGLECTRL_TYPE_EXP') }}</span></dt>
Expand Down
15 changes: 8 additions & 7 deletions lukewcs/togglectrl/adm/style/acp_togglectrl_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ var constants = Object.freeze({
});

function setState() {
dimOptionGroup('togglectrl_type', !$('[name="togglectrl_enabled"]').prop('checked'));
};

function dimOptionGroup(elememtName, dimCondition) {
var c = constants;

$('#togglectrl_opt_type').css('opacity', (
$('input[name="togglectrl_enabled"]').prop('checked')
) ? c.OpacityEnabled : c.OpacityDisabled
);
};
$('[name="' + elememtName + '"]').parents('dl').css('opacity', dimCondition ? c.OpacityDisabled : c.OpacityEnabled);
}

function formReset() {
setTimeout(function() {
Expand All @@ -34,8 +35,8 @@ function formReset() {
$(window).ready(function () {
setState();

$('input[name="togglectrl_enabled"]') .on('change', setState);
$('#togglectrl_form') .on('reset' , formReset);
$('[name="togglectrl_enabled"]') .on('change', setState);
$('#togglectrl_form') .on('reset' , formReset);
});

})(); // IIFE end
4 changes: 2 additions & 2 deletions lukewcs/togglectrl/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"type": "phpbb-extension",
"description": "Makes it possible to decide centrally for all extensions which visual style should be used for yes/no switches, provided extensions support Toggle Control.",
"homepage": "https://github.com/LukeWCS/toggle-control",
"version": "1.0.0-b3",
"time": "2023-12-04",
"version": "1.0.0-b4",
"time": "2023-12-06",
"license": "GPL-2.0-only",
"authors": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
### 1.0.0-b4
* Release (2023-12-)
* Template:
* Bei der Optionsgruppe von `togglectrl_type` die ID entfernt.
* JS:
* Funktion hinzugefügt, mit der eine Optionsgruppe anhand des Element-Namens abgeblendet werden kann. Somit keine ID mehr notwendig.

#### 1.0.0-b3
* Durch den Controller wurde die Template Variable `TOGGLECTRL_TYPE` unnötig doppelt generiert, wenn TC aktiv ist.
* `composer.json` korrigiert und URL hinzugefügt.
Expand Down
4 changes: 4 additions & 0 deletions toggle-control_changelog_de.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### 1.0.0
(2023-12-)

* Erste offizielle Version.
Empty file removed toggle-ctrl_changelog_de.md
Empty file.

0 comments on commit 0440530

Please sign in to comment.