From aa46567439d9ca410c7220a93651ccc2c209d70c Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 17 Aug 2018 14:29:22 +0530 Subject: [PATCH] refactor: rename hub-card-container to hub-items-container --- erpnext/public/js/hub/components/items_container.js | 4 ++-- erpnext/public/js/hub/pages/category.js | 2 +- erpnext/public/js/hub/pages/home.js | 2 +- erpnext/public/js/hub/pages/published_products.js | 2 +- erpnext/public/less/hub.less | 9 ++------- 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/erpnext/public/js/hub/components/items_container.js b/erpnext/public/js/hub/components/items_container.js index dd29836917..918569bd16 100644 --- a/erpnext/public/js/hub/components/items_container.js +++ b/erpnext/public/js/hub/components/items_container.js @@ -3,13 +3,13 @@ import { get_item_card_html } from './item_card'; function get_item_card_container_html(items, title='', get_item_html = get_item_card_html, action='') { const items_html = (items || []).map(item => get_item_html(item)).join(''); const title_html = title - ? `
+ ? `

${title}

${action}
` : ''; - const html = `
+ const html = `
${title_html} ${items_html}
`; diff --git a/erpnext/public/js/hub/pages/category.js b/erpnext/public/js/hub/pages/category.js index 118d196d55..c279c1aab1 100644 --- a/erpnext/public/js/hub/pages/category.js +++ b/erpnext/public/js/hub/pages/category.js @@ -11,7 +11,7 @@ erpnext.hub.Category = class Category extends SubPage { } get_items_for_category(category) { - this.$wrapper.find('.hub-card-container').empty(); + this.$wrapper.find('.hub-items-container').empty(); return hub.call('get_items', { filters: { hub_category: category diff --git a/erpnext/public/js/hub/pages/home.js b/erpnext/public/js/hub/pages/home.js index b7a55cec05..990223894f 100644 --- a/erpnext/public/js/hub/pages/home.js +++ b/erpnext/public/js/hub/pages/home.js @@ -20,7 +20,7 @@ erpnext.hub.Home = class Home extends SubPage { } get_items_and_render() { - this.$wrapper.find('.hub-card-container').empty(); + this.$wrapper.find('.hub-items-container').empty(); this.get_data() .then(data => { this.render(data); diff --git a/erpnext/public/js/hub/pages/published_products.js b/erpnext/public/js/hub/pages/published_products.js index f20fb27762..17c115e70f 100644 --- a/erpnext/public/js/hub/pages/published_products.js +++ b/erpnext/public/js/hub/pages/published_products.js @@ -3,7 +3,7 @@ import { get_item_card_container_html } from '../components/items_container'; erpnext.hub.PublishedProducts = class PublishedProducts extends SubPage { get_items_and_render() { - this.$wrapper.find('.hub-card-container').empty(); + this.$wrapper.find('.hub-items-container').empty(); this.get_published_products() .then(items => this.render(items)); } diff --git a/erpnext/public/less/hub.less b/erpnext/public/less/hub.less index 51fe340535..ac0aa42ae1 100644 --- a/erpnext/public/less/hub.less +++ b/erpnext/public/less/hub.less @@ -223,15 +223,10 @@ body[data-route^="marketplace/"] { border-bottom: none; } - .hub-card-container { - .hub-card-container-header { - margin-top: 32px; + .hub-items-container { + .hub-items-header { justify-content: space-between; align-items: baseline; - - h4 { - font-weight: 500; - } } }