Merge branch 'sprint/221_zg_bugs' into 'master'

* Fix bug#25998,26017,23426

See merge request easycorp/zentaopms!4783
This commit is contained in:
王怡栋
2022-08-04 03:56:58 +00:00
4 changed files with 19 additions and 10 deletions
+1 -1
View File
@@ -49,7 +49,7 @@
<tr>
<th class='c-id'><?php echo $lang->idAB;?></th>
<?php if($config->systemMode == 'new' and isset($project) and $project->model == 'scrum'):?>
<th class='c-project required' style="width:100%"><?php echo $lang->execution->projectName;?></th>
<th class='c-project required <?php echo $minWidth?>' style="width:100%"><?php echo $lang->execution->projectName;?></th>
<?php endif;?>
<th class='required <?php echo $minWidth?>' style="width:100%"><?php echo $lang->execution->$name;?></th>
<?php if(!isset($config->setCode) or $config->setCode == 1):?>
+4
View File
@@ -3,3 +3,7 @@
#executionsSummary {padding-left: 10px;}
#mainMenu .pull-left .checkbox-primary {margin-top: 5px;}
.main-table tbody>tr>td:first-child, .main-table thead>tr>th:first-child { padding-left: 8px; }
th.table-nest-title-edit {padding-left: 50px !important;}
th.table-nest-title-edit .table-nest-toggle {left: 28px;}
th.table-nest-title .check-all {position: absolute; left: 15px; top: 7px;}
+10 -5
View File
@@ -30,12 +30,13 @@ $(function()
var checkedLength = $(":checkbox[name^='executionIDList']:checked").length;
if(checkedLength > 0) $('#executionForm').addClass('has-row-checked');
if(notCheckedLength == 0) $('.table-footer #checkAll').prop('checked', true);
if(notCheckedLength == 0) $('#executionForm .checkAll').prop('checked', true);
if(checkedLength == 0)
{
$('.table-footer #checkAll').prop('checked', false);
$('#executionForm .checkAll').prop('checked', false);
$('#executionForm').removeClass('has-row-checked');
}
if(notCheckedLength > 0) $('#executionForm .checkAll').prop('checked', false);
var summary = checkedExecutions.replace('%s', checkedLength);
if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('items', 'item');
@@ -54,11 +55,12 @@ $(function()
});
$(document).on('click', ".table-footer #checkAll", function()
$(document).on('click', "#executionForm .checkAll", function()
{
if($(this).prop('checked'))
{
$(":checkbox[name^='executionIDList']").prop('checked', true);
$("#executionForm .checkAll").prop('checked', true);
$('#executionForm').addClass('has-row-checked');
var checkedLength = $(":checkbox[name^='executionIDList']:checked").length;
var summary = checkedExecutions.replace('%s', checkedLength);
@@ -72,6 +74,7 @@ $(function()
else
{
$(":checkbox[name^='executionIDList']").prop('checked', false);
$("#executionForm .checkAll").prop('checked', false);
$('#executionForm').removeClass('has-row-checked');
$('#executionSummary').removeClass('hidden');
$('#executionsSummary').addClass('hidden');
@@ -86,7 +89,7 @@ $(function()
{
$(this).prop('checked', false);
});
$('.table-footer #checkAll').prop('checked', false);
$('#executionsForm .checkAll').prop('checked', false);
}, 10);
})
@@ -195,13 +198,15 @@ function showEditCheckbox(show)
});
if(show)
{
var tableFooter = "<div class='editCheckbox'><div class='checkbox-primary check-all'><input type='checkbox' id='checkAll' /><label>" + selectAll + "</label></div><div class='table-actions btn-toolbar'><button type='submit' class='btn'>" + edit + "</button></div></div>";
$('.table-nest-title').prepend("<div class='checkbox-primary check-all'><input type='checkbox' class='checkAll' /><label></label></div>").addClass('table-nest-title-edit');
var tableFooter = "<div class='editCheckbox'><div class='checkbox-primary check-all'><input type='checkbox' id='checkAll' class='checkAll' /><label>" + selectAll + "</label></div><div class='table-actions btn-toolbar'><button type='submit' class='btn'>" + edit + "</button></div></div>";
$('#executionForm').attr('action', createLink('execution', 'batchEdit'));
$('.table-footer').prepend(tableFooter).show();
$('body').scroll();
}
else
{
$('.table-nest-title').removeClass('table-nest-title-edit').find('.check-all').remove();
$('#executionForm').find('.editCheckbox').remove();
if($('#executionForm .pager').length == 0) $('.table-footer').hide();
$('#executionForm').removeAttr('action');
+4 -4
View File
@@ -97,8 +97,8 @@ class testcaseModel extends model
$step->parent = ($step->type == 'item') ? $parentStepID : 0;
$step->case = $caseID;
$step->version = 1;
$step->desc = htmlSpecialString($stepDesc);
$step->expect = $step->type == 'group' ? '' : htmlSpecialString($data->expects[$stepID]);
$step->desc = rtrim(htmlSpecialString($stepDesc));
$step->expect = $step->type == 'group' ? '' : rtrim(htmlSpecialString($data->expects[$stepID]));
$this->dao->insert(TABLE_CASESTEP)->data($step)->autoCheck()->exec();
if($step->type == 'group') $parentStepID = $this->dao->lastInsertID();
if($step->type == 'step') $parentStepID = 0;
@@ -826,8 +826,8 @@ class testcaseModel extends model
$step->parent = ($step->type == 'item') ? $parentStepID : 0;
$step->case = $caseID;
$step->version = $version;
$step->desc = htmlSpecialString($stepDesc);
$step->expect = $step->type == 'group' ? '' : htmlSpecialString($data->expects[$stepID]);
$step->desc = rtrim(htmlSpecialString($stepDesc));
$step->expect = $step->type == 'group' ? '' : rtrim(htmlSpecialString($data->expects[$stepID]));
$this->dao->insert(TABLE_CASESTEP)->data($step)->autoCheck()->exec();
if($step->type == 'group') $parentStepID = $this->dao->lastInsertID();
if($step->type == 'step') $parentStepID = 0;