chore: UI refresh for grid/list view and search

- enhanced UI for grid/list view, actions visible on hover only
- enhanced search UI
- Added indicator to show if item is in cart
- Moved search with view togglers
This commit is contained in:
marination
2021-07-12 03:28:33 +05:30
parent c0811c4c74
commit b5e7f04b33
14 changed files with 440 additions and 196 deletions

View File

@@ -1,20 +1,9 @@
{% from "erpnext/templates/includes/macros.html" import attribute_filter_section, field_filter_section, discount_range_filters %}
{% extends "templates/web.html" %}
{% block title %}{{ _('Products') }}{% endblock %}
{% block title %}{{ _('All Products') }}{% endblock %}
{% block header %}
<div class="row mb-6" style="width: 65vw">
<div class="mb-6 col-4 order-1">{{ _('Products') }}</div>
<div class="input-group mb-6 col-8 order-2">
<div class="dropdown w-100" id="dropdownMenuSearch">
<input type="search" name="query" id="search-box" class="form-control font-md"
placeholder="Search for products..."
aria-label="Product" aria-describedby="button-addon2">
<!-- Results dropdown rendered in product_search.js -->
</div>
</div>
</div>
<div class="mb-6">{{ _('All Products') }}</div>
{% endblock header %}
{% block page_content %}

View File

@@ -9,8 +9,6 @@ $(() => {
// Render Product Views, Filters & Search
frappe.require('/assets/js/e-commerce.min.js', function() {
new erpnext.ProductSearch();
new erpnext.ProductView({
view_type: view_type,
products_section: $('#product-listing'),