diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index 4781b66d24..38cec1f3af 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -78,6 +78,25 @@ function loadProductModules(productID, branch) setStories(); } +/** + * Load module. + * + * @param int $libID + * @access public + * @return void + */ +function loadLibModules(libID, branch) +{ + if(typeof(branch) == 'undefined') branch = 0; + if(!branch) branch = 0; + link = createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + libID + '&viewtype=caselib&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true'); + $('#moduleIdBox').load(link, function() + { + $(this).find('select').chosen(defaultChosenOptions) + if(typeof(caseModule) == 'string') $('#moduleIdBox').prepend("" + caseModule + "") + }); +} + /** * Set story field. * diff --git a/module/testcase/view/edit.html.php b/module/testcase/view/edit.html.php index 0d476a5ae9..f51f03b73e 100644 --- a/module/testcase/view/edit.html.php +++ b/module/testcase/view/edit.html.php @@ -145,6 +145,24 @@ + + testcase->module;?> + +
+ "; + echo html::a($this->createLink('tree', 'browse', "rootID=$libID&view=caselib¤tModuleID=0&branch=$case->branch"), $lang->tree->manage, '_blank'); + echo '  '; + echo html::a("javascript:loadLibModules($libID)", $lang->refresh); + echo ''; + } + ?> +
+ + testcase->product;?> @@ -155,7 +173,6 @@ - testcase->module;?> @@ -174,6 +191,7 @@ + testcase->story;?>