From 2544b973ca6819cb0ab227d9a80542f2bffecdf9 Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 20 Jun 2018 13:37:38 +0800 Subject: [PATCH] * fix paste text lines in batch create form not work. --- module/bug/js/batchcreate.js | 5 +- module/bug/js/common.js | 13 ++--- module/bug/view/batchcreate.html.php | 26 +++++----- module/common/view/pastetext.html.php | 26 +++++++--- module/story/view/batchcreate.html.php | 4 +- module/task/view/batchcreate.html.php | 47 +++++++++-------- module/testcase/control.php | 2 +- module/testcase/js/common.js | 2 +- module/testcase/view/batchcreate.html.php | 50 +++++++++++-------- module/testcase/view/exporttemplet.html.php | 2 +- module/testsuite/js/common.js | 2 +- .../testsuite/view/batchcreatecase.html.php | 42 +++++++++------- 12 files changed, 127 insertions(+), 94 deletions(-) diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index eb3c063969..91cfc514d4 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -1,8 +1,9 @@ $(function() { - $(".chosenBox select").chosen(defaultChosenOptions); removeDitto();//Remove 'ditto' in first row. - if($('#batchCreateForm table thead tr th.c-title').width() < 150) $('#batchCreateForm table thead tr th.c-title').width(150); + + var $titleCol = $('#batchCreateForm table thead tr th.c-title'); + if($titleCol.width() < 150) $titleCol.width(150); }) /** diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 0dfe01be23..9e565e87a2 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -1,13 +1,14 @@ $(function() { - $('#subNavbar a[data-toggle=dropdown]').parent().addClass('dropdown dropdown-hover'); + var page = window.page || ''; + var flow = window.flow; - if(typeof page == 'undefined') page = ''; + $('#subNavbar a[data-toggle=dropdown]').parent().addClass('dropdown dropdown-hover'); if(page == 'create') { - productID = $('#product').val(); - moduleID = $('#module').val(); - assignedto = $('#assignedTo').val(); + var productID = $('#product').val(); + var moduleID = $('#module').val(); + var assignedto = $('#assignedTo').val(); changeProductConfirmed = true; oldStoryID = $('#story').val() || 0; oldProjectID = 0; @@ -23,7 +24,7 @@ $(function() $("#story, #task, #mailto").chosen(defaultChosenOptions); } - if(flow != 'full') + if(window.flow != 'full') { $('.querybox-toggle').click(function() { diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 502f6b7b32..d908ec85fa 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -19,7 +19,7 @@
createLink('file', 'uploadImages', 'module=bug¶ms=' . helper::safe64Encode("productID=$productID&projectID=$projectID&moduleID=$moduleID")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn btn-info' data-width='70%'")?> - + createLink('custom', 'ajaxSaveCustomFields', 'module=bug§ion=custom&key=batchCreateFields')?>
@@ -138,7 +138,7 @@
- +
- +
- + - - + + - - - - - + + + + + diff --git a/module/common/view/pastetext.html.php b/module/common/view/pastetext.html.php index 0e4858b285..ea70a2a9bc 100644 --- a/module/common/view/pastetext.html.php +++ b/module/common/view/pastetext.html.php @@ -17,15 +17,28 @@ -
+

testcase->exportTemplet;?>

diff --git a/module/testsuite/js/common.js b/module/testsuite/js/common.js index d8ba4e43b7..0c109aebfb 100644 --- a/module/testsuite/js/common.js +++ b/module/testsuite/js/common.js @@ -1,6 +1,6 @@ $(function() { - if(flow != 'full') + if(window.flow != 'full') { $('.querybox-toggle').click(function() { diff --git a/module/testsuite/view/batchcreatecase.html.php b/module/testsuite/view/batchcreatecase.html.php index dc2d61752c..06f7045cfe 100644 --- a/module/testsuite/view/batchcreatecase.html.php +++ b/module/testsuite/view/batchcreatecase.html.php @@ -17,7 +17,7 @@

testcase->batchCreate;?>

- pasteText, "data-toggle='importLinesModal' ", 'btn btn-info')?> + pasteText, "data-toggle='modal' data-target='#importLinesModal' ", 'btn btn-info')?>
@@ -48,16 +48,14 @@
@@ -75,22 +73,28 @@
%s' style='overflow:visible'>' style='overflow:visible'> ' style='overflow:visible'>' style='overflow:visible'>
- +
- +
'> '>' style='overflow:visible'> bug->typeList, $type, "class='form-control'");?>' style='overflow:visible'> bug->priList, '', "class='form-control'");?>' style='overflow:visible'>bug->severityList, '', "class='form-control'");?>' style='overflow:visible'> bug->osList, $os, "class='form-control'");?>' style='overflow:visible'> bug->browserList, $browser, "class='form-control'");?>' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?>' style='overflow:visible'> bug->priList, '', "class='form-control chosen'");?>' style='overflow:visible'>bug->severityList, '', "class='form-control chosen'");?>' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?>' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?> '>
-
-
- -
- - - -
+
+ +
+ + +
- +
- + +
+ +
+ + + +
- - + + - +
%s -
- testcase->colorTag}' data-update-text='#title\\[%s\\]'");?> -
testcase->typeList, $type, "class=form-control");?>testcase->priList, $pri, "class=form-control");?>testcase->typeList, $type, "class='form-control chosen'");?>testcase->priList, $pri, "class=form-control chosen");?> testcase->stageList, '', "class='form-control' multiple");?>testcase->stageList, '', "class='form-control chosen' multiple");?>