OrganonTweaks: enhance recurrence dialog -- Yes/No radios + [+7] factor button (JS); v1.3.0

This commit is contained in:
2026-07-07 09:40:51 -03:00
parent ff6abf1d49
commit 95561e5565
5 changed files with 32 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ class ConfigController extends BaseController
'organon_tweaks_always_comment_icon' => (int) $this->configModel->get('organon_tweaks_always_comment_icon', 1),
'organon_tweaks_keep_scroll' => (int) $this->configModel->get('organon_tweaks_keep_scroll', 1),
'organon_tweaks_quick_click_only' => (int) $this->configModel->get('organon_tweaks_quick_click_only', 1),
'organon_tweaks_enhance_recurrence' => (int) $this->configModel->get('organon_tweaks_enhance_recurrence', 1),
),
'errors' => array(),
)));

View File

@@ -42,6 +42,14 @@ class Plugin extends Base
'template' => 'plugins/OrganonTweaks/Asset/js/click-guard.js',
));
}
// Tweak: enhance the native "Edit recurrence" dialog (Yes/No radios + a [+7] button
// on the factor). No template hook there, so it is done in JS.
if ((int) $this->configModel->get('organon_tweaks_enhance_recurrence', 1) === 1) {
$this->hook->on('template:layout:js', array(
'template' => 'plugins/OrganonTweaks/Asset/js/enhance-recurrence.js',
));
}
}
public function getHelpers()
@@ -68,7 +76,7 @@ class Plugin extends Base
public function getPluginVersion()
{
return '1.2.1';
return '1.3.0';
}
public function getPluginHomepage()

View File

@@ -58,6 +58,19 @@ clicks (well under 100 ms) still open cards as usual. The 100 ms threshold is fi
- **On by default.** Toggle it under "Settings -> Organon Tweaks".
### Enhance the recurrence dialog
Kanboard's native "Edit recurrence" dialog is a plain form. This makes two small usability
edits when it opens (there is no template hook, so it is done in JS,
`Asset/js/enhance-recurrence.js`):
- the "Generate recurrent task" **Yes/No dropdown** becomes two **radio buttons** (one click
to set, instead of open + select). The original select is kept hidden and stays in sync, so
the form submits exactly as before.
- a small **[+7]** button next to the "Factor" input adds 7 to it (one week of days).
- **On by default.** Toggle it under "Settings -> Organon Tweaks".
## Settings
Global (per Kanboard instance) and admin-only, under "Settings -> Organon Tweaks":
@@ -65,6 +78,7 @@ Global (per Kanboard instance) and admin-only, under "Settings -> Organon Tweaks
- **Always show the comment icon on board cards** -- default on.
- **Keep the board scroll position across refreshes** -- default on.
- **Open a card only on a quick click** -- default on.
- **Enhance the recurrence dialog** -- default on.
## Requirements

View File

@@ -26,6 +26,13 @@
</p>
</fieldset>
<fieldset>
<?= $this->form->checkbox('organon_tweaks_enhance_recurrence', t('Enhance the recurrence dialog'), 1, isset($values['organon_tweaks_enhance_recurrence']) && $values['organon_tweaks_enhance_recurrence'] == 1) ?>
<p class="form-help">
<?= t('In the native "Edit recurrence" dialog, replace the Generate recurrent task dropdown with Yes/No radio buttons (one click), and add a [+7] button next to the factor that adds 7 (one week of days).') ?>
</p>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>

View File

@@ -1 +1 @@
OrganonTweaks v1.2.1
OrganonTweaks v1.3.0