From 0707be9df75f056b3ff635ff6e32977ec207fcdc Mon Sep 17 00:00:00 2001 From: spartanicus Date: Fri, 5 Nov 2021 16:44:27 -0400 Subject: [PATCH 1/3] Upgrade Match to Bootstrap 5 (CO-2266) --- app/templates/Standard/index.php | 12 +- app/templates/element/dialog.php | 8 +- app/templates/element/javascript.php | 30 +- app/templates/element/menuAction.php | 4 +- app/templates/element/menuTop.php | 6 +- app/templates/layout/default.php | 4 +- .../css/bootstrap/bootstrap-4.4.1.min.css | 7 - .../css/bootstrap/bootstrap-5.0.2.min.css | 7 + .../css/bootstrap/bootstrap.min.css.map | 1 - app/webroot/css/co-base.css | 5 +- .../jquery-ui-1.12.1.custom/AUTHORS.txt | 333 - .../jquery-ui-1.12.1.custom/LICENSE.txt | 43 - .../images/ui-bg_glass_75_d0e5f5_1x400.png | Bin 336 -> 0 bytes .../images/ui-bg_glass_85_dfeffc_1x400.png | Bin 341 -> 0 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 332 -> 0 bytes .../ui-bg_gloss-wave_30_8dbbdd_500x100.png | Bin 5782 -> 0 bytes .../ui-bg_inset-hard_100_f5f8f9_1x100.png | Bin 333 -> 0 bytes .../ui-bg_inset-hard_100_fcfdfd_1x100.png | Bin 292 -> 0 bytes .../images/ui-icons_000_256x240.png | Bin 5331 -> 0 bytes .../images/ui-icons_217bc0_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_469bdd_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_6da8d5_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_d8e7f3_256x240.png | Bin 4549 -> 0 bytes .../jquery/jquery-ui-1.12.1.custom/index.html | 559 - .../jquery-ui-1.12.1.custom/jquery-ui.css | 1312 -- .../jquery-ui-1.12.1.custom/jquery-ui.js | 18706 ---------------- .../jquery-ui-1.12.1.custom/jquery-ui.min.css | 7 - .../jquery-ui-1.12.1.custom/jquery-ui.min.js | 13 - .../jquery-ui.structure.css | 886 - .../jquery-ui.structure.min.css | 5 - .../jquery-ui.theme.css | 443 - .../jquery-ui.theme.min.css | 5 - .../jquery-ui-1.12.1.custom/package.json | 74 - .../bootstrap/bootstrap-4.6.0.bundle.min.js | 7 - .../js/bootstrap/bootstrap-4.6.0.min.css | 7 - .../bootstrap/bootstrap-5.0.2.bundle.min.js | 7 + .../jquery-ui-1.12.1.custom/AUTHORS.txt | 333 - .../jquery-ui-1.12.1.custom/LICENSE.txt | 43 - .../external/jquery/jquery.js | 11008 --------- .../images/ui-bg_glass_75_d0e5f5_1x400.png | Bin 336 -> 0 bytes .../images/ui-bg_glass_85_dfeffc_1x400.png | Bin 341 -> 0 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 332 -> 0 bytes .../ui-bg_gloss-wave_30_8dbbdd_500x100.png | Bin 5782 -> 0 bytes .../ui-bg_inset-hard_100_f5f8f9_1x100.png | Bin 333 -> 0 bytes .../ui-bg_inset-hard_100_fcfdfd_1x100.png | Bin 292 -> 0 bytes .../images/ui-icons_000_256x240.png | Bin 5331 -> 0 bytes .../images/ui-icons_217bc0_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_469bdd_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_6da8d5_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_d8e7f3_256x240.png | Bin 4549 -> 0 bytes .../jquery/jquery-ui-1.12.1.custom/index.html | 559 - .../jquery-ui-1.12.1.custom/jquery-ui.css | 1312 -- .../jquery-ui-1.12.1.custom/jquery-ui.js | 18706 ---------------- .../jquery-ui-1.12.1.custom/jquery-ui.min.css | 7 - .../jquery-ui-1.12.1.custom/jquery-ui.min.js | 13 - .../jquery-ui.structure.css | 886 - .../jquery-ui.structure.min.css | 5 - .../jquery-ui.theme.css | 443 - .../jquery-ui.theme.min.css | 5 - .../jquery-ui-1.12.1.custom/package.json | 74 - 64 files changed, 38 insertions(+), 55847 deletions(-) delete mode 100755 app/webroot/css/bootstrap/bootstrap-4.4.1.min.css create mode 100644 app/webroot/css/bootstrap/bootstrap-5.0.2.min.css delete mode 100755 app/webroot/css/bootstrap/bootstrap.min.css.map delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/AUTHORS.txt delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/LICENSE.txt delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-bg_glass_75_d0e5f5_1x400.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-bg_glass_85_dfeffc_1x400.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-bg_glass_95_fef1ec_1x400.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-bg_gloss-wave_30_8dbbdd_500x100.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-bg_inset-hard_100_f5f8f9_1x100.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-bg_inset-hard_100_fcfdfd_1x100.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-icons_000_256x240.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-icons_217bc0_256x240.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-icons_2e83ff_256x240.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-icons_469bdd_256x240.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-icons_6da8d5_256x240.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-icons_cd0a0a_256x240.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/images/ui-icons_d8e7f3_256x240.png delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/index.html delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/jquery-ui.css delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/jquery-ui.js delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/jquery-ui.min.css delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/jquery-ui.min.js delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/jquery-ui.structure.css delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/jquery-ui.structure.min.css delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/jquery-ui.theme.css delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/jquery-ui.theme.min.css delete mode 100644 app/webroot/css/jquery/jquery-ui-1.12.1.custom/package.json delete mode 100644 app/webroot/js/bootstrap/bootstrap-4.6.0.bundle.min.js delete mode 100644 app/webroot/js/bootstrap/bootstrap-4.6.0.min.css create mode 100644 app/webroot/js/bootstrap/bootstrap-5.0.2.bundle.min.js delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/AUTHORS.txt delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/LICENSE.txt delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/external/jquery/jquery.js delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-bg_glass_75_d0e5f5_1x400.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-bg_glass_85_dfeffc_1x400.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-bg_glass_95_fef1ec_1x400.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-bg_gloss-wave_30_8dbbdd_500x100.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-bg_inset-hard_100_f5f8f9_1x100.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-bg_inset-hard_100_fcfdfd_1x100.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-icons_000_256x240.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-icons_217bc0_256x240.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-icons_2e83ff_256x240.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-icons_469bdd_256x240.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-icons_6da8d5_256x240.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-icons_cd0a0a_256x240.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/images/ui-icons_d8e7f3_256x240.png delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/index.html delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/jquery-ui.css delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/jquery-ui.js delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/jquery-ui.min.css delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/jquery-ui.min.js delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/jquery-ui.structure.css delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/jquery-ui.structure.min.css delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/jquery-ui.theme.css delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/jquery-ui.theme.min.css delete mode 100644 app/webroot/js/jquery/jquery-ui-1.12.1.custom/package.json diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index e048c37a2..5fb1ed1e1 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -228,16 +228,16 @@ function _column_key($modelsName, $c, $tz=null) { } if(!empty($cfg['button']['popover'])) { if($cfg['button']['popover'] == 'fieldVal') { - $buttonAttrs['data-content'] = $entity->$col; + $buttonAttrs['data-bs-content'] = $entity->$col; } else { - $buttonAttrs['data-content'] = $cfg['button']['popover']; + $buttonAttrs['data-bs-content'] = $cfg['button']['popover']; } $label = !empty($cfg['label']) ? $cfg['label'] : _column_key($modelsName, $col, $vv_tz); $buttonAttrs['title'] = $label; - $buttonAttrs['data-toggle'] = 'popover'; - $buttonAttrs['data-container'] = 'body'; - $buttonAttrs['data-placement'] = 'top'; - $buttonAttrs['data-animation'] = 'false'; + $buttonAttrs['data-bs-toggle'] = 'popover'; + $buttonAttrs['data-bs-container'] = 'body'; + $buttonAttrs['data-bs-placement'] = 'top'; + $buttonAttrs['data-bs-animation'] = 'false'; } print $this->Form->button($buttonText, $buttonAttrs); } diff --git a/app/templates/element/dialog.php b/app/templates/element/dialog.php index d2105a858..2cfdfc076 100644 --- a/app/templates/element/dialog.php +++ b/app/templates/element/dialog.php @@ -35,16 +35,14 @@ diff --git a/app/templates/element/javascript.php b/app/templates/element/javascript.php index fb6c62f95..361b0f8d3 100644 --- a/app/templates/element/javascript.php +++ b/app/templates/element/javascript.php @@ -94,29 +94,11 @@ } }); // END DESKTOP MENU DRAWER BEHAVIOR - - // USER MENU BEHAVIORS - - // Toggle the custom user panel in the user menu - $("#user-panel-toggle").click(function(e) { - e.stopPropagation(); - if ($("#user-panel").is(":visible")) { - $("#user-panel").hide(); - $("#user-panel").attr("aria-expanded","false"); - } else { - $("#user-panel").show(); - $("#user-panel").attr("aria-expanded","true"); - } - }); - + // Click outside behaviors $(document).on('click', function (e) { - // Hide custom user menu items on click outside - if ($(e.target).closest("#user-panel").length === 0) { - $("#user-panel").hide(); - } // Hide popovers on click outside but don't close current popover when interacting with content inside it - $('#content [data-toggle="popover"]').each(function () { + $('#content [data-bs-toggle="popover"]').each(function () { if (!$(this).is(e.target) && $('.popover.show').has(e.target).length === 0) { $(this).popover('hide'); } @@ -171,10 +153,10 @@ $("input:submit").addClass("spin submit-button btn btn-primary"); // Make all select form controls Bootstrappy - $("select").addClass("form-control"); + $("select").addClass("form-select"); // Enable Bootstrap Popovers. Unless needed elsewhere, constrain this to #content - $('#content [data-toggle="popover"]').popover(); + $('#content [data-bs-toggle="popover"]').popover(); // Generic row click handling for div-based rows $('div.linked-row').click(function (e) { @@ -185,8 +167,8 @@ $('td.row-link').each(function (e) { url = $(this).find('a').attr('href'); if(url != undefined && url != '') { - $(this).closest('tr').addClass('linked-row').attr('data-target',url).click(function (e) { - location.href = $(this).attr('data-target'); + $(this).closest('tr').addClass('linked-row').attr('data-cm-target',url).click(function (e) { + location.href = $(this).attr('data-cm-target'); }).find('a').on('click',function(e){ // don't propagate on other links to avoid redirecting dialog boxes e.stopPropagation(); diff --git a/app/templates/element/menuAction.php b/app/templates/element/menuAction.php index 597d60c88..7027556ae 100644 --- a/app/templates/element/menuAction.php +++ b/app/templates/element/menuAction.php @@ -38,7 +38,7 @@ class=""> 'id' => 'action-menu-content_' . $actionsMenuUid, 'class' => 'nospin action-menu-toggle', 'escape' => false, - 'data-toggle' => 'dropdown', + 'data-bs-toggle' => 'dropdown', 'aria-haspopup' => true, 'aria-expanded' => false, 'title' => __('match.fd.action') @@ -82,7 +82,7 @@ class=""> . '\']);'; ?> + data-bs-toggle="modal" data-bs-target="#dialog"> diff --git a/app/templates/element/menuTop.php b/app/templates/element/menuTop.php index 99c95d100..56ecb0628 100644 --- a/app/templates/element/menuTop.php +++ b/app/templates/element/menuTop.php @@ -30,7 +30,7 @@