diff --git a/module/bug/js/common.ui.js b/module/bug/js/common.ui.js index e912cca759..a391bb6609 100644 --- a/module/bug/js/common.ui.js +++ b/module/bug/js/common.ui.js @@ -13,7 +13,7 @@ function changeProduct(event) if(result) { changeProductConfirmed = true; // Only notice the user one time. - loadAll(event); + changeProduct(event); } else { @@ -123,10 +123,14 @@ function loadProductBranches(productID) function loadProductModules(productID) { + if(config.currentMethod == 'edit') + { + const moduleID = $('#module').val(); + } + let branch = $('#branch').val(); if(typeof(branch) == 'undefined') branch = 0; if(typeof(moduleID) == 'undefined') moduleID = 0; - if(config.currentMethod == 'edit') moduleID = $('#module').val(); const link = $.createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=bug&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=nodeleted¤tModuleID=' + moduleID); $('#moduleBox').load(link); diff --git a/module/bug/js/edit.ui.js b/module/bug/js/edit.ui.js new file mode 100644 index 0000000000..7cb6e517ee --- /dev/null +++ b/module/bug/js/edit.ui.js @@ -0,0 +1,5 @@ +$(function() +{ + changeProductConfirmed = false; + resolution = $('#resolution').val(); +}); diff --git a/module/bug/ui/edit.html.php b/module/bug/ui/edit.html.php index a1aa08a135..369123a2d2 100644 --- a/module/bug/ui/edit.html.php +++ b/module/bug/ui/edit.html.php @@ -10,11 +10,35 @@ declare(strict_types=1); * @link http://www.zentao.net */ namespace zin; + +jsVar('confirmChangeProduct', $lang->bug->confirmChangeProduct); +jsVar('oldProjectID', $bug->project); +jsVar('oldProductID', $product->id); +jsVar('oldStoryID', $bug->story); +jsVar('oldTaskID', $bug->task); +jsVar('oldOpenedBuild', $bug->openedBuild); +jsVar('oldResolvedBuild', $bug->resolvedBuild); +jsVar('moduleID', $moduleID); +jsVar('tab', $this->app->tab); +jsVar('bugBranch', $bug->branch); +jsVar('isClosedBug', $bug->status == 'closed'); +jsVar('released', $lang->build->released); +if($this->app->tab == 'execution') jsVar('objectID', $bug->execution); +if($this->app->tab == 'project') jsVar('objectID', $bug->project); + panel ( set::title($bug->title), form ( + on::change('#product', 'changeProduct'), + on::change('#branch', 'changeBranch'), + on::change('#project', 'changeProject'), + on::change('#execution', 'changeExecution'), + on::change('#module', 'changeModule'), + on::click('#refresh', 'clickRefresh'), + on::click('#allBuilds', 'loadAllBuilds'), + on::click('#allUsers', 'loadAllUsers'), div ( set::class('flex'),