2018-08-01 14:09:07 +05:30
|
|
|
frappe.provide('erpnext.hub');
|
2017-12-10 22:02:41 +05:30
|
|
|
|
2018-07-23 18:44:46 +05:30
|
|
|
frappe.views.marketplaceFactory = class marketplaceFactory extends frappe.views.Factory {
|
|
|
|
show() {
|
|
|
|
if (frappe.pages.marketplace) {
|
|
|
|
frappe.container.change_to('marketplace');
|
|
|
|
erpnext.hub.marketplace.refresh();
|
|
|
|
} else {
|
|
|
|
this.make('marketplace');
|
|
|
|
}
|
|
|
|
}
|
2017-12-10 22:02:41 +05:30
|
|
|
|
2018-07-23 18:44:46 +05:30
|
|
|
make(page_name) {
|
|
|
|
const assets = [
|
2018-08-01 14:09:07 +05:30
|
|
|
'/assets/js/marketplace.min.js'
|
2018-07-23 18:44:46 +05:30
|
|
|
];
|
2018-01-25 09:18:32 +05:30
|
|
|
|
2018-07-23 18:44:46 +05:30
|
|
|
frappe.require(assets, () => {
|
|
|
|
erpnext.hub.marketplace = new erpnext.hub.Marketplace({
|
|
|
|
parent: this.make_page(true, page_name)
|
|
|
|
});
|
2018-02-15 10:17:07 +05:30
|
|
|
});
|
2018-07-25 16:51:01 +05:30
|
|
|
}
|
2018-07-23 18:44:46 +05:30
|
|
|
}
|
2018-04-03 10:44:13 +05:30
|
|
|
|
2018-08-01 15:56:39 +05:30
|
|
|
$(document).on('toolbar_setup', () => {
|
|
|
|
$('#toolbar-user .navbar-reload').after(`
|
|
|
|
<li>
|
|
|
|
<a href="#marketplace/home">${__('Marketplace')}
|
|
|
|
</li>
|
|
|
|
`)
|
2018-08-06 13:56:53 +05:30
|
|
|
})
|