From 7f19feff3a29e2c10ee40b1129485c3e2ec2ead6 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 23 Nov 2022 01:43:12 +0000 Subject: [PATCH] * Finish task #77137. --- module/custom/css/mode.css | 3 +- module/custom/js/mode.js | 15 ++--- module/custom/view/mode.html.php | 98 ++++++++++++++++---------------- module/upgrade/css/to18guide.css | 2 +- 4 files changed, 55 insertions(+), 63 deletions(-) diff --git a/module/custom/css/mode.css b/module/custom/css/mode.css index 73f2d0f279..bf17268b27 100644 --- a/module/custom/css/mode.css +++ b/module/custom/css/mode.css @@ -1,5 +1,6 @@ -.pd-l-20{padding-left: 20px!important;} +.pd-l-20 {padding-left: 20px!important;} #selectProgramModal .modal-dialog {width: 550px} #selectProgramModal .modal-header {border-bottom: 0px} #selectProgramModal .modal-header h4.modal-title{font-weight: 700} #selectProgramModal .modal-footer {border-top: 0px; text-align: center} +.btn-wide {padding: 6px 85px;} diff --git a/module/custom/js/mode.js b/module/custom/js/mode.js index d62ef0bf1b..d2b43de9d4 100644 --- a/module/custom/js/mode.js +++ b/module/custom/js/mode.js @@ -2,17 +2,10 @@ $(function() { $('#modeTab').addClass('btn-active-text'); - $('[name=mode]').change(function() + $('#useLight, #useALM').click(function() { - $('#submit').prop('disabled', 'disabled'); - if(mode != $(this).val()) $('#submit').prop('disabled', ''); - $('#program').closest('tr').toggle(mode == 'ALM' && $(this).val() == 'light'); - }); - - $(document).on('click', '#submit', function() - { - var selectedMode = $('[name=mode]:checked').val(); - if(mode == selectedMode) return false; + var selectedMode = $(this).data('mode'); + $('#mode').val(selectedMode); if(selectedMode == 'light' && hasProgram) { @@ -27,7 +20,7 @@ $(function() } return false; - }); + }) $(document).on('click', '.btn-save', function() { diff --git a/module/custom/view/mode.html.php b/module/custom/view/mode.html.php index deffeb57ef..693574ab8b 100644 --- a/module/custom/view/mode.html.php +++ b/module/custom/view/mode.html.php @@ -19,57 +19,55 @@

custom->modeManagement;?>

- - - - - - - - - - - - - - -
custom->currentModeTips, $lang->custom->modeList[$mode], $lang->custom->modeList[$mode == 'light' ? 'ALM' : 'light']);?>
- -

custom->modeIntroductionList['light'];?>

-
- -

custom->modeIntroductionList['ALM'];?>

-
- - - - - - - - - - - - - - - - - +
+

custom->currentModeTips, $lang->custom->modeList[$mode], $lang->custom->modeList[$mode == 'light' ? 'ALM' : 'light']);?>

+
lang->custom->mode;?>custom->modeList['light'];?>custom->modeList['ALM'];?>
lang->custom->scrum->common, implode($lang->comma, $disabledScrumFeatures)) : $this->lang->custom->features[$feature];?>
+ + + + + + + + + + + + + + + + + + + + + - custom->allFeatures as $feature):?> - - - - - - - - - -
lang->custom->mode;?>custom->modeList['light'];?>custom->modeList['ALM'];?>
custom->usage;?>custom->modeIntroductionList['light'];?>custom->modeIntroductionList['ALM'];?>
lang->custom->scrum->common, implode($lang->comma, $disabledScrumFeatures)) : $this->lang->custom->features[$feature];?>
lang->custom->scrum->common, implode($lang->comma, $enabledScrumFeatures)) : $this->lang->custom->features[$feature];?>
-
custom->switch, 'disabled');?>
+ custom->allFeatures as $feature):?> + + + + lang->custom->scrum->common, implode($lang->comma, $enabledScrumFeatures)) : $this->lang->custom->features[$feature];?> + + + + + + lang->custom->selectUsage;?> + + + custom->useLight, "id='useLight' data-mode='light'", "btn btn-wide $primaryClass");?> + + + + custom->useALM, "id='useALM' data-mode='ALM'", "btn btn-wide $primaryClass");?> + + + + + +