* Fix bug #46314
This commit is contained in:
@@ -4,7 +4,7 @@ window.branchChange = function(e)
|
||||
loadPlans($product, $(e.target));
|
||||
}
|
||||
|
||||
function loadBranches(e)
|
||||
window.loadBranches = function(e)
|
||||
{
|
||||
/* When selecting a product, delete a plan that is empty by default. */
|
||||
$("#planDefault").remove();
|
||||
@@ -52,7 +52,7 @@ function loadBranches(e)
|
||||
loadPlans(e.target, branch.length > 0 ? branch[0] : branch);
|
||||
}
|
||||
|
||||
function addNewLine(e)
|
||||
window.addNewLine = function(e)
|
||||
{
|
||||
const obj = e.target
|
||||
const newLine = $(obj).closest('.productBox').clone();
|
||||
@@ -96,7 +96,7 @@ function addNewLine(e)
|
||||
new zui.Picker(`#plans${index}`, {items:[], multiple: true, name: `plans[${index}]`});
|
||||
}
|
||||
|
||||
function removeLine(e)
|
||||
window.removeLine = function(e)
|
||||
{
|
||||
const obj = e.target;
|
||||
$(obj).closest('.productBox').remove();
|
||||
|
||||
@@ -58,9 +58,9 @@ class productsBox extends wg
|
||||
return div
|
||||
(
|
||||
setClass('productsBox'),
|
||||
on::click('.productsBox .addLine', 'addNewLine'),
|
||||
on::click('.productsBox .removeLine', 'removeLine'),
|
||||
on::change('.productsBox [name^=products]', 'loadBranches'),
|
||||
on::click('.productsBox .addLine', 'window.addNewLine'),
|
||||
on::click('.productsBox .removeLine', 'window.removeLine'),
|
||||
on::change('.productsBox [name^=products]', 'window.loadBranches'),
|
||||
jsVar('multiBranchProducts', data('multiBranchProducts')),
|
||||
jsVar('project', \zget($project, 'id', 0)),
|
||||
jsVar('errorSameProducts', $errorSameProducts),
|
||||
|
||||
Reference in New Issue
Block a user