* Fix bug #44538 and rename productChange to toggleStageBy.

This commit is contained in:
liumengyi
2024-01-23 08:54:00 +08:00
parent 5e7814cf28
commit c6f6060680
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -23,7 +23,7 @@ function changeType()
else
{
$('.productsBox').removeClass('hidden');
if(typeof productChange == 'function') productChange($(this));
if(typeof toggleStageBy == 'function') toggleStageBy($(this));
}
}
+2 -2
View File
@@ -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()
+1 -1
View File
@@ -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')),