From 34d284b5ee4d7884cc89d98b99059113d0fb2f75 Mon Sep 17 00:00:00 2001 From: "Beau Beauchamp, WebTigers" Date: Fri, 2 Oct 2026 11:33:10 -0400 Subject: [PATCH] =?UTF-8?q?Module=20Manager:=20ajax=20DataTable=20(client/?= =?UTF-8?q?server=20paradigm)=20=E2=80=94=20fixes=20the=20filter=20FOUC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The modules grid server-rendered every row and filtered client-side, so a remembered tab flashed All → the chosen type on load. Refactored to the Tiger datatable paradigm the Users table uses: an EMPTY table fed by System_Service_Modules::datatable over /api (server-side search / type-filter / sort / paginate), column renderers that build the cells + gate the activate/deactivate/delete controls off per-row flags (can_toggle / can_delete), and the chosen type remembered in a cookie the controller reads so the active pill renders server-side and the first ajax load is already filtered — no flash. catalog() is the shared authority (controller pills + the feed). Activate/delete now re-fetch the grid in place (table.ajax.reload) instead of window.location.reload, and the full-catalog counts ride each response so the pills stay accurate. Removes the inline
@@ -62,9 +72,9 @@ $typeIcon = static function ($t) {
@@ -75,55 +85,13 @@ $typeIcon = static function ($t) { t('system.modules.col_module') ?> - t('system.modules.col_type') ?> - t('system.modules.col_version') ?> - t('system.modules.col_source') ?> + t('system.modules.col_type') ?> + t('system.modules.col_version') ?> + t('system.modules.col_source') ?> t('system.modules.col_status') ?> t('system.modules.col_actions') ?> - - - - -
escape($m['name']) ?> - /escape($m['slug']) ?> - -
-
escape($m['description']) ?>
-
- escape($m['author']) ?> - escape($licShort($m['license'])) ?> -
- -
escape($m['compat']['message']) ?>
- - - escape($labelOf($m)) ?> - escape($m['version']) : '—' ?> - t($m['source'] === 'bundled' ? 'system.modules.source_bundled' : 'system.modules.source_addon') ?> - - t('system.modules.status_active') ?> - t('system.modules.status_inactive') ?> - t('system.modules.default_theme') ?> - - - - t('system.modules.always_on') ?> - - - - - - - - $s]); }, Tiger_Module_Dependency::dependents($m['slug'])); ?> - - - - - -
@@ -139,8 +107,6 @@ $typeIcon = static function ($t) { -i18n([ - 'confirmActivate' => 'system.js.confirm_activate', - 'deleteFailed' => 'system.js.delete_failed', - 'deleteUnavailable' => 'system.js.delete_unavailable', - 'networkError' => 'system.js.network_error', - 'activateTitle' => 'system.js.activate_title', - 'activateOk' => 'system.js.activate_ok', - 'deactivateTitle' => 'system.js.deactivate_title', - 'deactivateOk' => 'system.js.deactivate_ok', - 'deactivateRequired' => 'system.js.deactivate_required', - 'deactivateTheme' => 'system.js.deactivate_theme', - 'deactivateConfirm' => 'system.js.deactivate_confirm', - 'activateThemeTitle' => 'system.js.activate_theme_title', - 'activateThemeBody' => 'system.js.activate_theme_body', - 'activateThemeMakeDefault' => 'system.js.activate_theme_make_default', -]); -?>