diff --git a/module/execution/config.php b/module/execution/config.php index 2cd16fb6ba..f2304568fe 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -10,9 +10,10 @@ $config->execution->defaultBurnPeriod = 30; $config->execution->list = new stdclass(); $config->execution->list->exportFields = 'id,name,projectName,PM,begin,end,status,totalEstimate,totalConsumed,totalLeft,progress'; -$config->execution->modelList['scrum'] = 'sprint'; -$config->execution->modelList['waterfall'] = 'stage'; -$config->execution->modelList['kanban'] = 'kanban'; +$config->execution->modelList['scrum'] = 'sprint'; +$config->execution->modelList['waterfall'] = 'stage'; +$config->execution->modelList['kanban'] = 'kanban'; +$config->execution->modelList['waterfallplus'] = 'stage'; $config->execution->statusActions = array('start', 'putoff', 'suspend', 'close', 'activate'); diff --git a/module/execution/control.php b/module/execution/control.php index 0264d93147..44d1973535 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1694,7 +1694,7 @@ class execution extends control $lang->execution->typeList['sprint'] = $executionCommonLang; } - elseif(!empty($project) and $project->model == 'waterfall') + elseif(!empty($project) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) { global $lang; $lang->executionCommon = $lang->execution->stage; diff --git a/module/execution/css/create.css b/module/execution/css/create.css index a71b046e42..8a387053df 100644 --- a/module/execution/css/create.css +++ b/module/execution/css/create.css @@ -38,3 +38,4 @@ .productsBox .input-group-addon > div {display: inline-block !important;} .productsBox .required + .text-danger.help-text {position: relative; left: 10px;} .productsBox > #productNameLabel {padding-top: 8px;} +.productsBox div[id^='branch'].chosen-disabled {pointer-events: none;} diff --git a/module/execution/js/common.js b/module/execution/js/common.js index b7a2eb2964..7a138fe055 100644 --- a/module/execution/js/common.js +++ b/module/execution/js/common.js @@ -179,6 +179,13 @@ function loadBranches(product) var branch = $('#branch' + index); loadPlans(product, branch); + + if(typeof isWaterfall != 'undefined' && isWaterfall == true) + { + $tableRow.find("select[name^='branch'] option").attr('selected', 'selected'); + $tableRow.find("select[name^='branch']").trigger('chosen:updated'); + $tableRow.find("div[id^='branch']").addClass('chosen-disabled'); + } }); } @@ -210,15 +217,15 @@ function loadPlans(product, branch) /** * Add new line for link product. - * - * @param obj $obj + * + * @param obj $obj * @access public * @return void */ function addNewLine(obj) { var newLine = $(obj).closest('tr').clone(); - var index = 0; + var index = 0; $(".productsBox select[name^='products']").each(function() { var id = $(this).attr('id').replace('products' , ''); diff --git a/module/execution/js/create.js b/module/execution/js/create.js index b3f027e5cb..750bdae6b0 100644 --- a/module/execution/js/create.js +++ b/module/execution/js/create.js @@ -148,6 +148,11 @@ $(function() }); $(document).on('change', "select[id^='branch']", disableSelectedBranch); + + if($('.disabledBranch').length > 0) + { + $('.disabledBranch div[id^="branch"]').addClass('chosen-disabled'); + } }); function showLifeTimeTips() diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index e9368b5f66..472a35d630 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -31,6 +31,7 @@ +model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false;?> execution->weekend);?> execution->placeholder);?> @@ -46,6 +47,7 @@ execution->cancelCopy);?> execution->copyNoExecution);?> model) ? $project->model : '');?> +