* Finish task #53651.

This commit is contained in:
zhouxudong
2022-05-11 03:02:28 +00:00
parent 1723a78c92
commit da5cd2aa44
2 changed files with 14 additions and 13 deletions
+13 -12
View File
@@ -1,14 +1,15 @@
$(function()
function sync(obj, executionID, projectID)
{
$('[id^="projects"]').change(function()
var $td = $(obj).closest('td');
if($td.find('[id^="syncStories"]').length == 0)
{
var executionID = $(this).attr('id').replace('projects', '');
var $td = $(this).closest('td');
if($td.find('[id^="sync"]').length == 0)
{
$td.append("<input type='hidden' id='sync" + executionID + "' name='sync[" + executionID + "]' value='no' />");
}
alert(confirmSync);
$("#sync" + executionID).val('yes');
})
});
console.log($td);
$td.append("<input type='hidden' id='syncStories" + executionID + "' name='syncStories[" + executionID + "]' value='no' />");
}
var confirmVal = confirm(confirmSync);
$("#syncStories" + executionID).val(confirmVal ? 'yes' : 'no');
if(!confirmVal)
{
$(obj).val(projectID).trigger("chosen:updated");
}
};
+1 -1
View File
@@ -83,7 +83,7 @@
<tr>
<td><?php echo sprintf('%03d', $executionID) . html::hidden("executionIDList[$executionID]", $executionID);?></td>
<?php if($config->systemMode == 'new' and isset($project) and $project->model == 'scrum'):?>
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[$executionID]", $allProjects, $executions[$executionID]->project, "class='form-control picker-select'");?></td>
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[$executionID]", $allProjects, $executions[$executionID]->project, "class='form-control picker-select' onchange='sync(this, $executionID, {$executions[$executionID]->project})'");?></td>
<?php endif;?>
<td title='<?php echo $executions[$executionID]->name?>'><?php echo html::input("names[$executionID]", $executions[$executionID]->name, "class='form-control'");?></td>
<td><?php echo html::input("codes[$executionID]", $executions[$executionID]->code, "class='form-control'");?></td>