From a9d90a73c98116a25a4f79260cc49bec90299aa5 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 11 Nov 2015 13:29:55 +0800 Subject: [PATCH] * finish task #2386,2402. --- module/bug/js/common.js | 8 ++++++-- module/bug/view/create.html.php | 6 ++++-- module/story/view/create.html.php | 18 +++++++++--------- module/story/view/header.html.php | 2 +- module/testcase/js/common.js | 8 ++++++-- module/testcase/view/create.html.php | 25 ++++++++++++++----------- 6 files changed, 40 insertions(+), 27 deletions(-) diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 6ca594d66e..c12b8db577 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -181,7 +181,11 @@ function loadProductModules(productID) branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug&branch=' + branch + '&rootModuleID=0&returnType=html&needManage=true'); - $('#moduleIdBox').load(link, function(){$(this).find('select').chosen(defaultChosenOptions)}); + $('#moduleIdBox').load(link, function() + { + $(this).find('select').chosen(defaultChosenOptions) + if(typeof(bugModule) == 'string') $('#moduleIdBox').prepend("" + bugModule + "") + }); } /** @@ -372,7 +376,7 @@ function loadProductBranches(productID) if(data) { $('#product').closest('.input-group').append(data); - $('#branch').css('width', page == 'create' ? '100px' : '65px'); + $('#branch').css('width', page == 'create' ? '120px' : '65px'); } }) } diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index a85656b91c..783d635992 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -30,15 +30,16 @@ js::set('refresh', $lang->refresh);
- +
bug->lblProductAndModule;?>bug->product;?>
- session->currentProductType != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch()' class='form-control' style='width:100px'");?> + session->currentProductType != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch()' class='form-control' style='width:120px'");?>
+ bug->module?> refresh);
+bug->module);?> diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index 73966320c9..0a86aeb447 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -24,13 +24,13 @@ - - - - + - + - - + - +
story->product;?> +
- type != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control' style='width:65px'");?> + type != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control' style='width:120px'");?>
+
story->module;?>
story->title;?> +
@@ -104,15 +104,15 @@
story->spec;?>
story->specTemplate;?>
story->specTemplate;?>
story->verify;?>
story->mailto;?> +
story->legendAttatch;?>fetch('file', 'buildform');?>fetch('file', 'buildform');?>
diff --git a/module/story/view/header.html.php b/module/story/view/header.html.php index 5faabd2bea..c521500706 100644 --- a/module/story/view/header.html.php +++ b/module/story/view/header.html.php @@ -24,7 +24,7 @@ function loadProductBranches(productID) if(data) { $('#product').closest('.input-group').append(data); - $('#branch').css('width', '65px'); + $('#branch').css('width', config.currentMethod == 'create' ? '120px' : '65px'); } }) } diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index 11d84f0a00..084b3e1698 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -42,7 +42,7 @@ function loadProductBranches(productID) if(data) { $('#product').closest('.input-group').append(data); - $('#branch').css('width', '65px'); + $('#branch').css('width', config.currentMethod == 'create' ? '120px' : '65px'); } }) } @@ -70,7 +70,11 @@ function loadProductModules(productID, branch) if(typeof(branch) == 'undefined') branch = 0; if(!branch) branch = 0; link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=case&branch=' + branch + '&rootModuleID=0&returnType=html&needManage=true'); - $('#moduleIdBox').load(link, function(){$(this).find('select').chosen(defaultChosenOptions)}); + $('#moduleIdBox').load(link, function() + { + $(this).find('select').chosen(defaultChosenOptions) + if(typeof(caseModule) == 'string') $('#moduleIdBox').prepend("" + caseModule + "") + }); setStories(); } diff --git a/module/testcase/view/create.html.php b/module/testcase/view/create.html.php index 6ff031f7c8..f28e66246b 100644 --- a/module/testcase/view/create.html.php +++ b/module/testcase/view/create.html.php @@ -25,15 +25,16 @@
- - + - - - - + -
testcase->lblProductAndModule;?> + testcase->product;?>
- session->currentProductType != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control' style='width:65px'");?> + session->currentProductType != 'normal') echo html::select('branch', $branches, $branch, "onchange='loadBranch();' class='form-control' style='width:120px'");?>
+
+ testcase->module?>
testcase->lblStory;?> +
searchMore . '"');?> @@ -75,7 +76,7 @@
testcase->title;?> +
@@ -91,11 +92,11 @@
testcase->precondition;?>
testcase->steps;?> + @@ -126,14 +127,15 @@ - + - + - + +
testcase->keywords;?>
testcase->files;?>fetch('file', 'buildform');?>fetch('file', 'buildform');?>
@@ -154,4 +156,5 @@ +testcase->module)?>