[FIX] website: Page is added to menu even if the checkbox is unchecked at adding time

bzr revid: chm@openerp.com-20140218144215-vmlah8giy28oq3cd
This commit is contained in:
Christophe Matthieu 2014-02-18 15:42:15 +01:00
parent ce28079010
commit e473e795f6
1 changed files with 3 additions and 2 deletions

View File

@ -35,8 +35,9 @@
}
}).then(function (val, field, $dialog) {
if (val) {
console.log('/website/add/' + encodeURI(val) + "?add_menu=" + $dialog.find('input[type="checkbox"]').is(':checked'));
document.location = '/website/add/' + encodeURI(val) + "?add_menu=" + $dialog.find('input[type="checkbox"]').is(':checked');
var url = '/website/add/' + encodeURI(val);
if ($dialog.find('input[type="checkbox"]').is(':checked')) url +="?add_menu=1";
document.location = url;
}
});
}