summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.contentMenu.js
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2016-10-03 16:53:37 +0200
committerDenis Ledoux <dle@odoo.com>2016-10-03 16:56:58 +0200
commit48f6b8278e6c29487ac8d340b45784c216be260e (patch)
treea5c09d92e3fe41047712a8ab7ec222f720a70db7 /addons/website/static/src/js/website.contentMenu.js
parent366b01f0791c1721cbd303e201dd252b886071c9 (diff)
[FIX] website: fix library incompatibility for moves of menus
Since the library nestedSortable was updated to the release 2.1a, at the below revision: https://github.com/odoo/odoo/commit/aa19d9edd02756d87056a44340e36568b3183e21 It was no longer possible, in the front-end, to move the menus: Re-sequence them, put one below another, ... Indeed, in that piece of code, `.item_id` was never set with the new release, while it was the case with the former one. We replace with `.id`, which looks like to have the same behavior.
Diffstat (limited to 'addons/website/static/src/js/website.contentMenu.js')
-rw-r--r--addons/website/static/src/js/website.contentMenu.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website/static/src/js/website.contentMenu.js b/addons/website/static/src/js/website.contentMenu.js
index aa695857746..f5764ad7fd2 100644
--- a/addons/website/static/src/js/website.contentMenu.js
+++ b/addons/website/static/src/js/website.contentMenu.js
@@ -291,9 +291,9 @@ var EditMenuDialog = widget.Dialog.extend({
var context = base.get_context();
// Resequence, re-tree and remove useless data
new_menu.forEach(function (menu) {
- if (menu.item_id) {
+ if (menu.id) {
levels[menu.depth] = (levels[menu.depth] || 0) + 1;
- var mobj = self.flat[menu.item_id];
+ var mobj = self.flat[menu.id];
mobj.sequence = levels[menu.depth];
mobj.parent_id = (menu.parent_id|0) || menu.parent_id || self.root_menu_id;
delete(mobj.children);