* Finish task #74667.

This commit is contained in:
daitingting
2022-11-03 03:15:41 +00:00
parent 2bd3030dc1
commit b07b1031ea
6 changed files with 64 additions and 60 deletions
+17 -24
View File
@@ -9,39 +9,32 @@ $(function()
$('#program').closest('tr').toggle(mode == 'ALM' && $(this).val() == 'light');
});
$(document).on('click', '#submit', function()
{
if(mode == $('[name=mode]:checked').val()) return false;
var selectedMode = $('[name=mode]:checked').val();
if(mode == selectedMode) return false;
if($(this).hasClass('canSubmit'))
if(selectedMode == 'light')
{
$(this).removeClass('canSubmit');
$('#confirmModal').modal('hide');
return true;
$('#selectProgramModal').modal('show');
}
else
{
bootbox.confirm(changeModeTips, function(result)
{
if(result) $('#modeForm').submit();
});
}
$(this).addClass('canSubmit');
var $mode = $('[name=mode]:checked').val();
var confirmTitle = changeModeTitleTips[$mode];
var confirmContent = changeModeContentTips[$mode]
$('#confirmModal .modal-title').html(confirmTitle);
$('#confirmModal .modal-body').html(confirmContent);
$('#confirmModal').modal('show');
return false;
});
$(document).on('click', '.btn-confirm', function()
$(document).on('click', '.btn-save', function()
{
$('#submit').click();
});
$('#confirmModal').on('hide.zui.modal', function()
{
$('#submit').removeClass('canSubmit');
setTimeout(function()
{
$('#selectProgramModal').modal('hide');
$('#modeForm').submit();
}, 1000);
});
})
+7 -4
View File
@@ -57,6 +57,7 @@ $lang->custom->code = $lang->code;
$lang->custom->setCode = 'Enable or Disable Code';
$lang->custom->execution = 'Execution';
$lang->custom->defaultProgram = 'Default program';
$lang->custom->selectDefaultProgram = 'Please select default program';
$lang->custom->unitList['efficiency'] = 'Working Hours/';
$lang->custom->unitList['manhour'] = 'Man-hour/';
@@ -240,10 +241,12 @@ $lang->custom->sprintConceptList[1] = 'Program Product Sprint';
$lang->custom->workingList['full'] = 'Full Management of Dev';
$lang->custom->menuTip = 'Click to show/hide navigation bar. Drag to swtich display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->page = ' Page';
$lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.';
$lang->custom->menuTip = 'Click to show/hide the menu. Drag to switch display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->page = ' Page';
$lang->custom->currentModeTips = 'You are currently using %s, you can switch to the %s.';
$lang->custom->changeModeTips = 'Please double confirm to switch to %s Mode.';
$lang->custom->selectProgramTips = 'After switching to the Light Mode, in order to ensure the consistency of the data structure, you need to select a program as the default program, and subsequent new product and project data are associated with this default program.';
$lang->custom->changeModeTitleTips['ALM'] = 'Please double confirm to switch to ALM Mode.';
$lang->custom->changeModeTitleTips['light'] = 'Please double confirm to switch to Light Mode.';
+7 -4
View File
@@ -56,6 +56,7 @@ $lang->custom->dept = 'Dept';
$lang->custom->code = $lang->code;
$lang->custom->setCode = 'Enable or Disable Code';
$lang->custom->execution = 'Execution';
$lang->custom->selectDefaultProgram = 'Please select default program';
$lang->custom->defaultProgram = 'Default program';
$lang->custom->unitList['efficiency'] = 'Working Hours/';
@@ -240,10 +241,12 @@ $lang->custom->sprintConceptList[1] = 'Program Product Sprint';
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
$lang->custom->menuTip = 'Click to show/hide the menu. Drag to switch display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->page = ' Page';
$lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.';
$lang->custom->menuTip = 'Click to show/hide the menu. Drag to switch display order.';
$lang->custom->saveFail = 'Failed to save!';
$lang->custom->page = ' Page';
$lang->custom->currentModeTips = 'You are currently using %s, you can switch to the %s.';
$lang->custom->changeModeTips = 'Please double confirm to switch to %s Mode.';
$lang->custom->selectProgramTips = 'After switching to the Light Mode, in order to ensure the consistency of the data structure, you need to select a program as the default program, and subsequent new product and project data are associated with this default program.';
$lang->custom->changeModeTitleTips['ALM'] = 'Please double confirm to switch to ALM Mode.';
$lang->custom->changeModeTitleTips['light'] = 'Please double confirm to switch to Light Mode.';
+7 -4
View File
@@ -56,6 +56,7 @@ $lang->custom->dept = 'Dept';
$lang->custom->code = $lang->code;
$lang->custom->setCode = 'Activer ou Désactiver le Code';
$lang->custom->execution = 'Execution';
$lang->custom->selectDefaultProgram = 'Please select default program';
$lang->custom->defaultProgram = 'Default program';
$lang->custom->unitList['efficiency'] = 'Working Hours/';
@@ -240,10 +241,12 @@ $lang->custom->sprintConceptList[1] = 'Program Product Sprint';
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
$lang->custom->menuTip = "Cliquez pour montrer/cacher le menu. Déplacez pour changer l'ordre d'affichage.";
$lang->custom->saveFail = 'Echec de la sauvegarde !';
$lang->custom->page = ' Page';
$lang->custom->changeModeTips = 'Historical deleted data does not participate in the data merging process. After switching the mode, it will not support restoration. Please know.';
$lang->custom->menuTip = "Cliquez pour montrer/cacher le menu. Déplacez pour changer l'ordre d'affichage.";
$lang->custom->saveFail = 'Echec de la sauvegarde !';
$lang->custom->page = ' Page';
$lang->custom->currentModeTips = 'You are currently using %s, you can switch to the %s.';
$lang->custom->changeModeTips = 'Please double confirm to switch to %s Mode.';
$lang->custom->selectProgramTips = 'After switching to the Light Mode, in order to ensure the consistency of the data structure, you need to select a program as the default program, and subsequent new product and project data are associated with this default program.';
$lang->custom->changeModeTitleTips['ALM'] = 'Please double confirm to switch to ALM Mode.';
$lang->custom->changeModeTitleTips['light'] = 'Please double confirm to switch to Light Mode.';
+8 -5
View File
@@ -56,7 +56,8 @@ $lang->custom->dept = '部门';
$lang->custom->code = $lang->code;
$lang->custom->setCode = '是否启用代号';
$lang->custom->execution = '执行';
$lang->custom->defaultProgram = '选择默认项目集';
$lang->custom->selectDefaultProgram = '选择一个默认项目集';
$lang->custom->defaultProgram = '默认项目集';
$lang->custom->unitList['efficiency'] = '工时/';
$lang->custom->unitList['manhour'] = '人时/';
@@ -241,10 +242,12 @@ $lang->custom->sprintConceptList[1] = '项目 产品 冲刺';
$lang->custom->workingList['full'] = '完整研发管理工具';
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
$lang->custom->saveFail = '保存失败!';
$lang->custom->page = '页面';
$lang->custom->changeModeTips = '历史删除数据不参与数据归并流程,切换模式后将不支持还原,请知悉';
$lang->custom->menuTip = '点击显示或隐藏导航条目,拖拽来更改显示顺序。';
$lang->custom->saveFail = '保存失败!';
$lang->custom->page = '页面';
$lang->custom->currentModeTips = '您当前使用的是%s, 您可以切换到%s';
$lang->custom->changeModeTips = '您确定要切换到%s吗?';
$lang->custom->selectProgramTips = '切换到轻量管理模式后,为确保数据结构一致,需要选择一个项目集作为默认项目集,后续新增的产品和项目数据都关联在这个默认的项目集下。';
$lang->custom->changeModeTitleTips['ALM'] = '您确定要切换到全生命周期管理模式吗?';
$lang->custom->changeModeTitleTips['light'] = '您确定要切换到轻量管理模式吗?';
+18 -19
View File
@@ -32,17 +32,6 @@
</td>
<td></td>
</tr>
<?php if($program):?>
<tr class='hide'>
<th><?php echo $lang->custom->defaultProgram;?></th>
<td>
<?php
$disabled = $mode == 'light' ? "disabled" : '';
echo html::select('program', $program, $programID, "class='form-control chosen' $disabled" );
?>
</td>
</tr>
<?php endif;?>
<tr>
<td></td>
<td><?php echo html::submitButton($lang->custom->switch, 'disabled');?></td>
@@ -51,24 +40,34 @@
</form>
</div>
<div class='modal fade' id='confirmModal'>
<div class='modal fade' id='selectProgramModal'>
<div class='modal-dialog'>
<div class='modal-content'>
<div class='modal-header'>
<button type='button' class='close' data-dismiss='modal'><span aria-hidden='true'>×</span><span class='sr-only'><?php echo $this->lang->close;?></span></button>
<h4 class='modal-title'></h4>
<h4 class='modal-title'><?php echo $lang->custom->selectDefaultProgram;?></h4>
</div>
<div class='modal-body'>
<div class='alert alert-primary'>
<p class='text-info'><?php echo $lang->custom->selectProgramTips;?></p>
</div>
<table class='table table-form'>
<tr>
<th><?php echo $lang->custom->defaultProgram;?></th>
<td><?php echo html::select('program', $program, $programID, "class='form-control chosen'");?></td>
</tr>
</table>
</div>
<div class='modal-body'></div>
<div class='modal-footer'>
<button type='button' class='btn btn-primary btn-wide btn-confirm'><?php echo $lang->confirm;?></button>
<button type='button' class='btn btn-default btn-wide' data-dismiss='modal'><?php echo $this->lang->cancel;?></button>
<button type='button' class='btn btn-primary btn-wide btn-save'><?php echo $lang->save;?></button>
</div>
</div>
</div>
</div>
<style>
#confirmModal .modal-header {border-bottom: 0px}
#confirmModal .modal-header h4.modal-title{font-weight: 700}
#confirmModal .modal-footer {border-top: 0px; text-align: center}
#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}
</style>
<?php include '../../common/view/footer.html.php';?>