[FIX] website: Incorrect 'Go to page' link in page properties dialog

Before this commit, clicking on 'Go to page' in a page properties dialog would
redirect user to an incorrect link (relative vs absolute) because the link
would not have a leading slash. (We removed it earlier to hide it in the input)

Now, the link is correct
This commit is contained in:
Romain Derie
2017-11-10 16:39:01 +01:00
parent 996a817071
commit dbce2491fe
+1 -1
View File
@@ -45,7 +45,7 @@ var PagePropertiesDialog = widget.Dialog.extend({
{text: _t("Discard"), close: true},
];
if (options.fromPageManagement) {
buttons.push({text: _t("Go To Page"), icon: "fa-globe", classes: "btn-link pull-right", click: function(e){window.location.href = self.page.url;}});
buttons.push({text: _t("Go To Page"), icon: "fa-globe", classes: "btn-link pull-right", click: function(e){window.location.href = '/' + self.page.url;}});
}
this._super(parent, _.extend({}, {
title: _t("Page Properties"),