[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:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user