[FIX] website, web_editor: open in new window

The field `isNewWindow` is used to open a link in a new tab. In this
case, the field newWindow was used, and therefore the property was not
applied.

opw-657510
This commit is contained in:
Nicolas Martinelli
2015-12-02 10:00:16 +01:00
parent 5c6c91bb81
commit 1e9ce28f7b
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1079,7 +1079,7 @@ var LinkDialog = Dialog.extend({
return this.get_data()
.then(function (url, new_window, label, classes) {
self.data.url = url;
self.data.newWindow = new_window;
self.data.isNewWindow = new_window;
self.data.text = label;
self.data.className = classes.replace(/\s+/gi, ' ').replace(/^\s+|\s+$/gi, '');
@@ -233,7 +233,7 @@ var EditMenuDialog = widget.Dialog.extend({
id: _.uniqueId('new-'),
name: link.text,
url: link.url,
new_window: link.newWindow,
new_window: link.isNewWindow,
parent_id: false,
sequence: 0,
children: [],
@@ -256,7 +256,7 @@ var EditMenuDialog = widget.Dialog.extend({
_.extend(menu_obj, {
'name': link.text,
'url': link.url,
'new_window': link.newWindow,
'new_window': link.isNewWindow,
});
var $menu = self.$('[data-menu-id="' + id + '"]');
$menu.find('.js_menu_label').first().text(menu_obj.name);
@@ -310,7 +310,7 @@ var MenuEntryDialog = widget.LinkDialog.extend({
template: 'website.contentMenu.dialog.add',
init: function (editor, data) {
data.text = data.name || '';
data.newWindow = data.new_window;
data.isNewWindow = data.new_window;
this.data = data;
return this._super.apply(this, arguments);
},