From dc407470006d458f93cb1be522ba69669ecb518a Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Tue, 21 Feb 2023 05:14:28 +0000 Subject: [PATCH] * Finish task #85051. --- module/execution/css/edit.css | 2 ++ module/execution/js/edit.js | 5 ++++ module/execution/view/edit.html.php | 44 +++++++++++++++++++++-------- 3 files changed, 39 insertions(+), 12 deletions(-) diff --git a/module/execution/css/edit.css b/module/execution/css/edit.css index 1331271af3..69e41e254b 100644 --- a/module/execution/css/edit.css +++ b/module/execution/css/edit.css @@ -7,3 +7,5 @@ #dateRange {vertical-align: top; padding-top: 13px;} .form-date {min-width: 90px;} + +.productsBox div[id^='branch'].chosen-disabled {pointer-events: none;} diff --git a/module/execution/js/edit.js b/module/execution/js/edit.js index 78d040216c..5527fd5b0b 100644 --- a/module/execution/js/edit.js +++ b/module/execution/js/edit.js @@ -107,6 +107,11 @@ $(function() }); $(document).on('change', "select[id^='branch']", disableSelectedBranch); + + if($('.disabledBranch').length > 0) + { + $('.disabledBranch div[id^="branch"]').addClass('chosen-disabled'); + } }) var lastProjectID = $("#project").val(); diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php index 299f88e233..6ade126e6e 100644 --- a/module/execution/view/edit.html.php +++ b/module/execution/view/edit.html.php @@ -243,23 +243,43 @@ type == 'stage' and !in_array($execution->attribute, array('request', 'design', 'review'))) or $execution->type != 'stage'): ?> + + - execution->manageProducts;?> - -
- - $product):?> - branches as $branchID):?> - -
- " . $product->name . $branchName;?> + project->manageProductPlan;?> + +
+
+
+
+ type != 'normal' and isset($branchGroups[$product->id]);?> +
'> + product->common;?> + type == 'stage' ? "disabled='disabled'" : '';?> + id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> + type == 'stage' and !$project->division) echo html::hidden("products[$i]", $product->id);?> +
+
+
'> +
+ project->branch;?> + branches) ? join(',', $product->branches) : '';?> + id]) ? $branchGroups[$product->id] : array(), $branchIdList, "class='form-control chosen' multiple onchange=\"loadPlans('#products{$i}', this)\"");?> +
+
+
+
+
+
> + product->plan;?> + id][]", isset($productPlans[$product->id]) ? $productPlans[$product->id] : array(), isset($product->plans) ? $product->plans : '', "class='form-control chosen' multiple");?> +
- - -
+ +