* Fix bug#20875.

This commit is contained in:
xieqiyu
2022-03-28 10:11:39 +08:00
parent 20f060bcaf
commit f500822991
3 changed files with 37 additions and 3 deletions
+16 -1
View File
@@ -17,7 +17,7 @@
<?php echo $lang->bug->batchCreate;?>
</h2>
<div class="pull-right btn-toolbar">
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=bug&params=' . helper::safe64Encode("productID=$productID&executionID=$executionID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?>
<?php if(common::hasPriv('file', 'uploadImages')) echo html::a($this->createLink('file', 'uploadImages', 'module=bug&params=' . helper::safe64Encode("productID=$productID&branch=$branch&executionID=$executionID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-primary' data-width='70%'")?>
<button type='button' data-toggle='modal' data-target="#importLinesModal" class="btn btn-primary"><?php echo $lang->pasteText;?></button>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=bug&section=custom&key=batchCreateFields')?>
<?php include '../../common/view/customfield.html.php';?>
@@ -219,5 +219,20 @@
</tbody>
</table>
<?php js::set('branch', $branch)?>
<?php if(isonlybody()):?>
<style>
.body-modal .main-header {padding-right: 0px;}
.btn-toolbar > .dropdown {margin: 0px;}
</style>
<?php $html = '<div class="divider"></div><button id="closeModal" type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>';?>
<script>
$(function()
{
parent.$('#triggerModal .modal-content .modal-header .close').hide();
$('#mainContent .main-header .pull-right.btn-toolbar').append(<?php echo json_encode($html)?>);
$('#closeModal').on('click', function(){window.parent.$.closeModal();})
})
</script>
<?php endif;?>
<?php include '../../common/view/pastetext.html.php';?>
<?php include '../../common/view/footer.html.php';?>
+5 -1
View File
@@ -50,7 +50,11 @@ $(function()
{
line = $.trim(line);
if (!line.length) return;
if (!$lastRow) $row = $form.find('tbody>tr:first');
if (!$lastRow)
{
$row = $form.find('tbody>tr .title-import').first().closest('tr');
if(!$row && batchForm) $row = batchForm.createRow();
}
else $row = $lastRow.next();
while ($row.length && $row.find('.title-import').val().length)
{
+16 -1
View File
@@ -150,7 +150,7 @@ $(function()
$select.next('.chosen-container').find('.chosen-drop').width($select.closest('td').width() + 50);
}, 200);
});
var storyTitle = storyTitles && storyTitles[index];
var storyTitle = storyTitles && storyTitles[index - 1];
if (storyTitle !== undefined && storyTitle !== null)
{
$row.find('.input-story-title').val(storyTitle).after('<input type="hidden" name="uploadImage[' + index + ']" id="uploadImage[' + index + ']" value="' + imageTitles[storyTitle] + '">');
@@ -172,5 +172,20 @@ $(function()
</script>
<?php if(isset($execution)) js::set('execution', $execution);?>
<?php js::set('storyType', $type);?>
<?php if(isonlybody()):?>
<style>
.body-modal .main-header {padding-right: 0px;}
.btn-toolbar > .dropdown {margin: 0px;}
</style>
<?php $html = '<div class="divider"></div><button id="closeModal" type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>';?>
<script>
$(function()
{
parent.$('#triggerModal .modal-content .modal-header .close').hide();
$('#mainContent .main-header .pull-right.btn-toolbar').append(<?php echo json_encode($html)?>);
$('#closeModal').on('click', function(){window.parent.$.closeModal();})
})
</script>
<?php endif;?>
<?php include '../../common/view/pastetext.html.php';?>
<?php include '../../common/view/footer.html.php';?>