* Fix bug #44538 and rename productChange to toggleStageBy.
This commit is contained in:
@@ -94,8 +94,8 @@ function addNewLine(e)
|
||||
function removeLine(e)
|
||||
{
|
||||
const obj = e.target;
|
||||
if(typeof productChange == 'function') productChange(obj);
|
||||
$(obj).closest('.productBox').remove();
|
||||
if(typeof toggleStageBy == 'function') toggleStageBy();
|
||||
}
|
||||
|
||||
window.loadPlans = function(product, branch)
|
||||
|
||||
@@ -23,7 +23,7 @@ function changeType()
|
||||
else
|
||||
{
|
||||
$('.productsBox').removeClass('hidden');
|
||||
if(typeof productChange == 'function') productChange($(this));
|
||||
if(typeof toggleStageBy == 'function') toggleStageBy($(this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,10 +91,10 @@ window.setParentProgram = function()
|
||||
/* Init product. */
|
||||
window.waitDom('[name^=products]', function()
|
||||
{
|
||||
if($('.newProductBox').length > 0) productChange($('[name^=products]').eq(0));
|
||||
if($('.newProductBox').length > 0) toggleStageBy($('[name^=products]').eq(0));
|
||||
});
|
||||
|
||||
window.productChange = function()
|
||||
window.toggleStageBy = function()
|
||||
{
|
||||
let chosenProducts = 0;
|
||||
$(".productsBox [name^='products']").each(function()
|
||||
|
||||
@@ -62,7 +62,7 @@ formGridPanel
|
||||
on::change('[name=hasProduct]', 'changeType'),
|
||||
on::change('[name=future]', 'toggleBudget'),
|
||||
on::change('[name=begin], [name=end]', 'computeWorkDays'),
|
||||
on::change('[name^=products]', 'productChange'),
|
||||
on::change('[name^=products]', 'toggleStageBy'),
|
||||
on::change('[name=parent], [name=budget]', 'checkBudget'),
|
||||
set::title($lang->project->create),
|
||||
set::fullModeOrders(array('begin,days,PM,budget', !empty($config->setCode) ? 'parent,hasProduct,name,code,begin' : 'parent,name,hasProduct,begin')),
|
||||
|
||||
Reference in New Issue
Block a user