From 0b36b54ab52667610da321837d254803b8a08409 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 28 May 2018 15:34:15 +0800 Subject: [PATCH] * finish task #4146. --- module/bug/css/batchcreate.css | 1 + module/bug/js/batchcreate.js | 3 ++- module/bug/view/batchcreate.html.php | 10 +++++----- module/story/css/batchcreate.css | 1 + module/story/js/batchcreate.js | 4 ++++ module/story/view/batchcreate.html.php | 8 ++++---- module/task/css/batchcreate.css | 9 ++------- module/task/js/batchcreate.js | 6 +++++- module/task/view/batchcreate.html.php | 4 ++-- module/testcase/config.php | 4 ++-- module/testcase/css/batchcreate.css | 1 + module/testcase/js/batchcreate.js | 1 + module/testcase/js/batchedit.js | 5 ++++- module/testcase/view/batchcreate.html.php | 2 +- 14 files changed, 35 insertions(+), 24 deletions(-) diff --git a/module/bug/css/batchcreate.css b/module/bug/css/batchcreate.css index e69de29bb2..9a4637b9eb 100644 --- a/module/bug/css/batchcreate.css +++ b/module/bug/css/batchcreate.css @@ -0,0 +1 @@ +#batchCreateForm{overflow-x:auto;} diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index 0bec2bd3c7..eb3c063969 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -2,6 +2,7 @@ $(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); }) /** @@ -159,4 +160,4 @@ $(document).keydown(function(event) { inputFocusJump('down'); } -}); \ No newline at end of file +}); diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 458c236ff7..a4262dc180 100644 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -49,16 +49,16 @@ '> product->branch;?> bug->module;?> '>bug->project;?> - bug->openedBuild;?> - bug->title;?> - '>bug->deadline;?> - '>bug->steps;?> + bug->openedBuild;?> + bug->title;?> + '>bug->deadline;?> + '>bug->steps;?> '>typeAB;?> '>bug->pri;?> '>bug->severity;?> '>bug->os;?> '>bug->browser;?> - '>bug->keywords;?> + '>bug->keywords;?> diff --git a/module/story/css/batchcreate.css b/module/story/css/batchcreate.css index b67513980e..688ab4a288 100644 --- a/module/story/css/batchcreate.css +++ b/module/story/css/batchcreate.css @@ -6,3 +6,4 @@ #batchCreateForm .col-pri {width: 100px;} #batchCreateForm .col-review, #batchCreateForm .col-estimate {width: 90px;} +#batchCreateForm {overflow-x:auto;} diff --git a/module/story/js/batchcreate.js b/module/story/js/batchcreate.js index 2dd65b9a88..3da67943aa 100644 --- a/module/story/js/batchcreate.js +++ b/module/story/js/batchcreate.js @@ -1,3 +1,7 @@ +$(function() +{ + if($('#batchCreateForm table thead tr th.col-name').width() < 200) $('#batchCreateForm table thead tr th.col-name').width(200); +}); $(document).on('click', '.chosen-with-drop', function() { var select = $(this).prev('select'); diff --git a/module/story/view/batchcreate.html.php b/module/story/view/batchcreate.html.php index afee0c29d2..c61b0a8b21 100644 --- a/module/story/view/batchcreate.html.php +++ b/module/story/view/batchcreate.html.php @@ -44,17 +44,17 @@ idAB;?> - '>product->branch;?> + '>product->branch;?> story->module;?> '>story->plan;?> story->title;?> - '>story->spec;?> + '>story->spec;?> '>story->source;?> - '>story->verify;?> + '>story->verify;?> '>story->pri;?> '>story->estimate;?> '>story->review;?> - '>story->keywords;?> + '>story->keywords;?> diff --git a/module/task/css/batchcreate.css b/module/task/css/batchcreate.css index c0ce2082f2..8846e86a9a 100644 --- a/module/task/css/batchcreate.css +++ b/module/task/css/batchcreate.css @@ -1,9 +1,3 @@ -.outer .chosen-container-single .chosen-drop {border-top: 1px solid #ddd!important} -.outer .chosen-container-single {max-width: 160px; border-radius: 0} -.outer .chosen-container-single .chosen-single {border-radius: 2px 0 0 2px;} -.outer .chosen-container-single + .input-group-btn > .btn {border-left: 0} -.outer .input-group > span {display: block; padding-right: 29px; max-width: 100%;} -.outer .input-group-btn > a {display: block; position: absolute; right: 0; width: 29px; top: 0} .chosen-container[id^="story"] {width: 200px; max-width: 150px;} .chosen-container[id^="story"] .chosen-drop {min-width: 450px !important;} .chosen-container[id^="module"] .chosen-drop {min-width: 400px !important;} @@ -13,10 +7,11 @@ #batchCreateForm .input-group .form-control {position: static;} #batchCreateForm .input-group .colorpicker {z-index: 2;} #batchCreateForm .input-group .colorpicker.open {z-index: 5;} +#batchCreateForm{overflow-x:auto;} .main-header .pull-left {max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} #zeroTaskStory {margin: 0 0 0 20px; height: 32px; padding: 5px 5px 5px 5px; border-radius: 3px; border: 2px solid transparent;} #zeroTaskStory > label:before {top: 7px; left: 5px;} #zeroTaskStory > label:after {top: 5px; left: 5px;} -#zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;} \ No newline at end of file +#zeroTaskStory.checked {border-color: #00a9fc; background: #E9F2FB;} diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index 526fedf638..4a470912b6 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -2,7 +2,11 @@ delete defaultChosenOptions.width; /* Remove 'ditto' in first row. */ -$(document).ready(removeDitto()); +$(function() +{ + removeDitto(); + if($('#batchCreateForm table thead tr th.c-name').width() < 200) $('#batchCreateForm table thead tr th.c-name').width(200); +}); /* Get select of stories.*/ function setStories(moduleID, projectID, num) diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 707230675c..6b22a1880b 100644 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -61,13 +61,13 @@ type != 'ops'):?> '>task->story;?> - task->name;?> + task->name;?> typeAB;?> '>task->assignedTo;?> '>task->estimateAB;?> '>task->estStarted;?> '>task->deadline;?> - '>task->desc;?> + '>task->desc;?> '>task->pri;?> diff --git a/module/testcase/config.php b/module/testcase/config.php index 83ab68720d..e6ac632636 100644 --- a/module/testcase/config.php +++ b/module/testcase/config.php @@ -83,7 +83,7 @@ $config->testcase->datatable->fieldList['id']['required'] = 'yes'; $config->testcase->datatable->fieldList['pri']['title'] = 'priAB'; $config->testcase->datatable->fieldList['pri']['fixed'] = 'left'; -$config->testcase->datatable->fieldList['pri']['width'] = '50'; +$config->testcase->datatable->fieldList['pri']['width'] = '40'; $config->testcase->datatable->fieldList['pri']['required'] = 'no'; $config->testcase->datatable->fieldList['title']['title'] = 'title'; @@ -148,7 +148,7 @@ $config->testcase->datatable->fieldList['lastRunner']['required'] = 'no'; $config->testcase->datatable->fieldList['lastRunDate']['title'] = 'lastRunDate'; $config->testcase->datatable->fieldList['lastRunDate']['fixed'] = 'no'; -$config->testcase->datatable->fieldList['lastRunDate']['width'] = '100'; +$config->testcase->datatable->fieldList['lastRunDate']['width'] = '90'; $config->testcase->datatable->fieldList['lastRunDate']['required'] = 'no'; $config->testcase->datatable->fieldList['lastRunResult']['title'] = 'lastRunResult'; diff --git a/module/testcase/css/batchcreate.css b/module/testcase/css/batchcreate.css index fccb26098a..8edac19133 100644 --- a/module/testcase/css/batchcreate.css +++ b/module/testcase/css/batchcreate.css @@ -9,3 +9,4 @@ #batchCreateForm .input-group .form-control {position: static;} #batchCreateForm .input-group .colorpicker {z-index: 2;} #batchCreateForm .input-group .colorpicker.open {z-index: 5;} +#batchCreateForm {overflow-x: auto;} diff --git a/module/testcase/js/batchcreate.js b/module/testcase/js/batchcreate.js index 086ab502c5..a7adc7a3e0 100644 --- a/module/testcase/js/batchcreate.js +++ b/module/testcase/js/batchcreate.js @@ -1,6 +1,7 @@ $(document).ready(function() { 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'); $(document).on('click', '.chosen-with-drop', function() { diff --git a/module/testcase/js/batchedit.js b/module/testcase/js/batchedit.js index 33667f298e..0e616280eb 100644 --- a/module/testcase/js/batchedit.js +++ b/module/testcase/js/batchedit.js @@ -34,7 +34,10 @@ function loadBranches(product, branch, caseID) $('#modules' + caseID).parent('td').load(moduleLink, function(){$('#modules' + caseID).chosen(defaultChosenOptions);}) } -$(document).ready(removeDitto());//Remove 'ditto' in first row. +$(function() +{ + removeDitto(); //Remove 'ditto' in first row. +}); $(document).on('click', '.chosen-with-drop', function(){oldValue = $(this).prev('select').val();})//Save old value. diff --git a/module/testcase/view/batchcreate.html.php b/module/testcase/view/batchcreate.html.php index 9247cb4e5d..8a0b81b9e7 100644 --- a/module/testcase/view/batchcreate.html.php +++ b/module/testcase/view/batchcreate.html.php @@ -56,7 +56,7 @@ '>product->branch;?> '>testcase->module;?> '> testcase->story;?> - testcase->title;?> + testcase->title;?> testcase->type;?> '>testcase->pri;?> '>testcase->precondition;?>