From d0a952bcda41aa569f7eb11acd9b371c7bee254a Mon Sep 17 00:00:00 2001 From: Prateeksha Singh Date: Mon, 27 Aug 2018 10:12:45 +0530 Subject: [PATCH] [hub] Register components, init Item Page - commonly used components are pre-registered - add DetailHeaderItem component - begin ItemPage --- erpnext/public/js/hub/PageContainer.vue | 28 ++- .../js/hub/components/DetailHeaderItem.vue | 20 ++ .../public/js/hub/components/DetailView.vue | 29 ++- .../js/hub/components/ReviewTimelineItem.vue | 0 erpnext/public/js/hub/marketplace.js | 176 +----------------- erpnext/public/js/hub/pages/Category.vue | 5 - erpnext/public/js/hub/pages/Home.vue | 9 - erpnext/public/js/hub/pages/Item.vue | 150 +++++++++++++++ erpnext/public/js/hub/pages/NotFound.vue | 5 - erpnext/public/js/hub/pages/Profile.vue | 5 - erpnext/public/js/hub/pages/Publish.vue | 10 +- .../public/js/hub/pages/PublishedProducts.vue | 5 - erpnext/public/js/hub/pages/SavedProducts.vue | 5 - erpnext/public/js/hub/pages/Search.vue | 7 - erpnext/public/js/hub/pages/Seller.vue | 7 - erpnext/public/js/hub/pages/messages.js | 6 +- erpnext/public/js/hub/vue-plugins.js | 16 ++ 17 files changed, 235 insertions(+), 248 deletions(-) create mode 100644 erpnext/public/js/hub/components/DetailHeaderItem.vue create mode 100644 erpnext/public/js/hub/components/ReviewTimelineItem.vue create mode 100644 erpnext/public/js/hub/pages/Item.vue diff --git a/erpnext/public/js/hub/PageContainer.vue b/erpnext/public/js/hub/PageContainer.vue index ca4c63a28a6..794d4cb334f 100644 --- a/erpnext/public/js/hub/PageContainer.vue +++ b/erpnext/public/js/hub/PageContainer.vue @@ -3,25 +3,37 @@ + diff --git a/erpnext/public/js/hub/components/DetailView.vue b/erpnext/public/js/hub/components/DetailView.vue index b86468b83bf..eca31d1e511 100644 --- a/erpnext/public/js/hub/components/DetailView.vue +++ b/erpnext/public/js/hub/components/DetailView.vue @@ -31,16 +31,31 @@ -
+

{{ title }}

-

-

+
+ +
+ +
`).appendTo($(parent)); - - new Vue({ - render: h => h(Home) - }).$mount('#vue-area-home'); - } - - show() { - $('[data-page-name="home"]').show(); - } - - hide() { - $('[data-page-name="home"]').hide(); - } -} - -erpnext.hub.SavedProductsPage = class { - constructor(parent) { - this.$wrapper = $(`
`).appendTo($(parent)); - - new Vue({ - render: h => h(SavedProducts) - }).$mount('#vue-area-saved'); - } - - show() { - $('[data-page-name="saved-products"]').show(); - } - - hide() { - $('[data-page-name="saved-products"]').hide(); - } -} - -erpnext.hub.PublishPage = class { - constructor(parent) { - this.$wrapper = $(`
`).appendTo($(parent)); - - new Vue({ - render: h => h(Publish) - }).$mount('#vue-area'); - } - - show() { - $('[data-page-name="publish"]').show(); - } - - hide() { - $('[data-page-name="publish"]').hide(); - } - -} - -erpnext.hub.CategoryPage = class { - constructor(parent) { - this.$wrapper = $(`
`).appendTo($(parent)); - - new Vue({ - render: h => h(Category) - }).$mount('#vue-area-category'); - } - - show() { - $('[data-page-name="category"]').show(); - } - - hide() { - $('[data-page-name="category"]').hide(); - } -} - -erpnext.hub.PublishedProductsPage = class { - constructor(parent) { - this.$wrapper = $(`
`).appendTo($(parent)); - - new Vue({ - render: h => h(PublishedProducts) - }).$mount('#vue-area-published-products'); - } - - show() { - $('[data-page-name="published-products"]').show(); - } - - hide() { - $('[data-page-name="published-products"]').hide(); - } -} - -erpnext.hub.SearchPage = class { - constructor(parent) { - this.$wrapper = $(`