Do not change location hash when clicking on links

issue7596
review49521002
This commit is contained in:
Cédric Krier committed 2018-08-06 19:08:07 +02:00
1 parent 535c6b7fe4
commit 4bfa18fff3
5 files changed
+17 -8

No files matched your search

+4 -2
View File
@@ -3158,7 +3158,8 @@
}).append(jQuery('<a/>', {
'href': '#'
}).append(this._format_action(content)))
.click(function() {
.click(function(evt) {
evt.preventDefault();
if (this.action_activated) {
this.action_activated(action_id);
}
@@ -3209,7 +3210,8 @@
}).append(jQuery('<a/>', {
'href': '#'
}).append(this._format(value)))
.click(function() {
.click(function(evt) {
evt.preventDefault();
if (this.match_selected) {
this.match_selected(value);
}
+4 -2
View File
@@ -565,7 +565,8 @@ var Sao = {};
icon.attr('src',
Sao.common.ICONFACTORY.get_icon_url(menu_item[2]));
a.append(menu_item[1]);
a.click(function() {
a.click(function(evt) {
evt.preventDefault();
Sao.favorites_menu_clear();
// ids is not defined to prevent to add suffix
Sao.Action.exec_keyword('tree_open', {
@@ -582,7 +583,8 @@ var Sao = {};
'role': 'presentation'
}).append(jQuery('<a/>', {
'href': '#'
}).click(function() {
}).click(function(evt) {
evt.preventDefault();
Sao.favorites_menu_clear();
Sao.Tab.create({
'model': Sao.main_menu_screen.model_name +
+1
View File
@@ -274,6 +274,7 @@
}.bind(this));
},
bookmark_activate: function(e) {
e.preventDefault();
var domain = e.data;
this.set_text(this.screen.domain_parser().string(domain));
this.do_search();
+6 -3
View File
@@ -390,7 +390,8 @@
'aria-hidden': true
}).append('&times;')).append(jQuery('<span/>', {
'class': 'sr-only'
}).append(Sao.i18n.gettext('Close'))).click(function() {
}).append(Sao.i18n.gettext('Close'))).click(function(evt) {
evt.preventDefault();
tab.close();
}))
.append(tab.name_el);
@@ -543,7 +544,8 @@
'tabindex': -1
}).append(
button.attributes.string || ''))
.click(function() {
.click(function(evt) {
evt.preventDefault();
screen.button(button.attributes);
})
.appendTo(menu);
@@ -559,7 +561,8 @@
'href': '#',
'tabindex': -1
}).append(action.name))
.click(function() {
.click(function(evt) {
evt.preventDefault();
var prm = jQuery.when();
if (this.screen.modified()) {
prm = this.save();
+2 -1
View File
@@ -1986,7 +1986,8 @@ function eval_pyson(value){
return function(option) {
dropdown.append(jQuery('<li/>').append(jQuery('<a/>', {
'href': '#'
}).append(option).click(function() {
}).append(option).click(function(evt) {
evt.preventDefault();
document.execCommand(properties.command, false, option);
})));
};