Stop event bubbling on clicking edit item

This commit is contained in:
Suraj Shetty 2018-08-22 11:52:20 +05:30
parent 12de0aec11
commit 831ff42101

View File

@ -74,13 +74,18 @@ erpnext.hub.Publish = class Publish extends SubPage {
this.make_publishing_dialog();
this.$wrapper.on('click', '[data-route]', (e) => {
e.stopPropagation();
const $target = $(e.currentTarget);
const route = $target.data().route;
frappe.set_route(route);
});
this.$wrapper.on('click', '.hub-card', (e) => {
const $target = $(e.currentTarget);
const item_code = $target.attr('data-id');
this.show_publishing_dialog_for_item(item_code);
this.$current_selected_card = $target.parent();
});
}