keep board horizontal scroll across refresh: restore scrollLeft after #board-container rebuild; v1.0

This commit is contained in:
2026-07-06 21:12:26 -03:00
parent 1bea749fed
commit 9c27b51eed
6 changed files with 91 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ class ConfigController extends BaseController
'title' => t('Settings').' > '.t('Organon Tweaks'),
'values' => array(
'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),
),
'errors' => array(),
)));
@@ -25,8 +26,12 @@ class ConfigController extends BaseController
$values = $this->request->getValues();
$alwaysCommentIcon = isset($values['organon_tweaks_always_comment_icon']) ? 1 : 0;
$keepScroll = isset($values['organon_tweaks_keep_scroll']) ? 1 : 0;
if ($this->configModel->save(array('organon_tweaks_always_comment_icon' => $alwaysCommentIcon))) {
if ($this->configModel->save(array(
'organon_tweaks_always_comment_icon' => $alwaysCommentIcon,
'organon_tweaks_keep_scroll' => $keepScroll,
))) {
$this->flash->success(t('Settings saved successfully.'));
} else {
$this->flash->failure(t('Unable to save your settings.'));