Fix add of box
This commit is contained in:
parent
a40083ae1c
commit
a2245bd7db
@ -1174,14 +1174,15 @@ class FormOther
|
|||||||
jQuery("#boxcombo").change(function() {
|
jQuery("#boxcombo").change(function() {
|
||||||
var boxid=jQuery("#boxcombo").val();
|
var boxid=jQuery("#boxcombo").val();
|
||||||
if (boxid > 0) {
|
if (boxid > 0) {
|
||||||
|
console.log("A box widget has been selected for addition, we call ajax page to add it.")
|
||||||
var left_list = cleanSerialize(jQuery("#boxhalfleft").sortable("serialize"));
|
var left_list = cleanSerialize(jQuery("#boxhalfleft").sortable("serialize"));
|
||||||
var right_list = cleanSerialize(jQuery("#boxhalfright").sortable("serialize"));
|
var right_list = cleanSerialize(jQuery("#boxhalfright").sortable("serialize"));
|
||||||
var boxorder = \'A:\' + left_list + \'-B:\' + right_list;
|
var boxorder = \'A:\' + left_list + \'-B:\' + right_list;
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&boxid=\'+boxid+\'&zone='.$areacode.'&userid='.$user->id.'\',
|
url: \''.DOL_URL_ROOT.'/core/ajax/box.php?boxorder=\'+boxorder+\'&boxid=\'+boxid+\'&zone='.$areacode.'&userid='.$user->id.'\'
|
||||||
async: false
|
}).done(function() {
|
||||||
});
|
window.location.search=\'mainmenu='.GETPOST("mainmenu", "aZ09").'&leftmenu='.GETPOST('leftmenu', "aZ09").'\';
|
||||||
window.location.search=\'mainmenu='.GETPOST("mainmenu", "aZ09").'&leftmenu='.GETPOST('leftmenu', "aZ09").'&action=addbox&boxid=\'+boxid;
|
});
|
||||||
}
|
}
|
||||||
});';
|
});';
|
||||||
if (!count($arrayboxtoactivatelabel)) {
|
if (!count($arrayboxtoactivatelabel)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user