js: go to location on click on dialog button created from <a> (#18895)

This commit is contained in:
Frédéric Péters 2017-09-22 11:01:40 +02:00
parent 9841169358
commit 2b7622403d
1 changed files with 5 additions and 1 deletions

View File

@ -212,7 +212,11 @@ var gadjo_js = gadjo_js || {};
}).fail(function() { $anchor.trigger('gadjo:dialog-submit-error');
});
} else {
$elem.click();
if ($elem.is('a')) {
window.location = $elem.attr('href');
} else {
$elem.click();
}
}
return false;
};