Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix tablet issues

Krzysztof Białogłowiczc28d460bfb30
diff --git a/saleor/static/js/dashboard.js b/saleor/static/js/dashboard.js
index d3cfb7803e..8b03286cb2 100644
--- a/saleor/static/js/dashboard.js
+++ b/saleor/static/js/dashboard.js
@@ -52,10 +52,6 @@ $(document).ready(function() {
initSelects();
$('.modal').modal();
- if (isTablet()) {
- $('.equal-height-on-med').matchHeight();
- }
-
let $tabs = $('ul.tabs');
if ($tabs.length) {
$tabs.find('.tab').on('click', function (e) {
diff --git a/saleor/static/scss/dashboard/components/_nav.scss b/saleor/static/scss/dashboard/components/_nav.scss
index 77b4060e92..b0361fd791 100644
--- a/saleor/static/scss/dashboard/components/_nav.scss
+++ b/saleor/static/scss/dashboard/components/_nav.scss
@@ -22,6 +22,7 @@ header {
margin-bottom: 0;
transition: background-color .2s ease-out;
width: 100%;
+ line-height: 1;
&:hover {
background-color: rgba(255, 255, 255, .25);
}
@@ -111,6 +112,9 @@ header {
top: $navbar-height-mobile + $subheader-height;
height: 100vh;
transition: transform .1s;
+ @media (min-width: $small-screen) {
+ top: $header-height + $subheader-height;
+ }
@media (min-width: $medium-screen) {
background: transparent;
box-shadow: none;
diff --git a/saleor/static/scss/dashboard/dashboard.scss b/saleor/static/scss/dashboard/dashboard.scss
index cd1a8ae762..d13157c8e1 100644
--- a/saleor/static/scss/dashboard/dashboard.scss
+++ b/saleor/static/scss/dashboard/dashboard.scss
@@ -261,7 +261,7 @@ tr[data-action-go]>td:not(.ignore-link):hover {
#base-modal {
@media only screen and (min-width: 1367px) {
- width: 35%;
+ width: 40%;
}
}
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index 61a32a7105..5e7e3b66f5 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -136,8 +136,7 @@
</div>
</main>
- <div class="hide-on-med-only"></div>
- <div class="hide-on-large-only"></div>
+
<div id="base-modal" class="modal"></div>
<div id="base-modal-fixed" class="modal modal-fixed-footer"></div>
diff --git a/templates/dashboard/category/detail.html b/templates/dashboard/category/detail.html
index cf1574d738..133d5624a1 100644
--- a/templates/dashboard/category/detail.html
+++ b/templates/dashboard/category/detail.html
@@ -36,7 +36,7 @@
{% block content %}
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<div class="card">
<form method="post" id="form-category" enctype="multipart/form-data" novalidate>
<div class="card-content">
@@ -79,6 +79,6 @@
</form>
</div>
</div>
- <div class="col s12 m3 help-box"></div>
+ <div class="col m12 l3 help-box"></div>
</div>
{% endblock %}
diff --git a/templates/dashboard/discount/sale_form.html b/templates/dashboard/discount/sale_form.html
index 12cc8e6d81..7a68fcce13 100644
--- a/templates/dashboard/discount/sale_form.html
+++ b/templates/dashboard/discount/sale_form.html
@@ -47,7 +47,7 @@
{% block content %}
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<div class="card">
<form method="post" enctype="multipart/form-data" id="form-sales" novalidate>
<div class="card-content">
@@ -91,6 +91,6 @@
</form>
</div>
</div>
- <div class="col s12 m3 help-box"></div>
+ <div class="col m12 l3 help-box"></div>
</div>
{% endblock %}
diff --git a/templates/dashboard/discount/voucher_form.html b/templates/dashboard/discount/voucher_form.html
index 21f709aa6b..c8f3c2727a 100644
--- a/templates/dashboard/discount/voucher_form.html
+++ b/templates/dashboard/discount/voucher_form.html
@@ -46,7 +46,7 @@
{% block content %}
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<div class="card">
<form method="post" enctype="multipart/form-data" id="form-vouchers" novalidate>
<div class="card-content">
@@ -118,6 +118,6 @@
</form>
</div>
</div>
- <div class="col s12 m3 help-box"></div>
+ <div class="col m12 l3 help-box"></div>
</div>
{% endblock %}
diff --git a/templates/dashboard/product/attributes/form.html b/templates/dashboard/product/attributes/form.html
index 8fac02b91f..b790bfb4e3 100644
--- a/templates/dashboard/product/attributes/form.html
+++ b/templates/dashboard/product/attributes/form.html
@@ -36,7 +36,7 @@
<li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">
{% trans "Attributes" context "Attribute detail breadcrumbs" %}
</a></li>
- <li class="back-mobile"><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
+ <li class="back-mobile"><a href="{% url 'dashboard:product-attributes' %}"><i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">
{% if attribute.pk %}{{ attribute }}{% else %}{% trans "Add new attribute" context "Attribute detail breadcrumbs" %}{% endif %}
</span></li>
@@ -47,7 +47,7 @@
{% block content %}
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<div class="card">
<form method="post" enctype="multipart/form-data" id="form-attributes" novalidate>
<div class="card-content">
@@ -105,6 +105,6 @@
</form>
</div>
</div>
- <div class="col s12 m3 help-box"></div>
+ <div class="col m12 l3 help-box"></div>
</div>
{% endblock %}
diff --git a/templates/dashboard/product/product_class_form.html b/templates/dashboard/product/product_class_form.html
index 673b7b1a4e..fa64dfcd05 100644
--- a/templates/dashboard/product/product_class_form.html
+++ b/templates/dashboard/product/product_class_form.html
@@ -22,7 +22,7 @@
<li><a href="{% url "dashboard:product-class-list" %}" class="breadcrumb">
{% trans "Product types" context "Product class breadcrumbs" %}</a></li>
<li class="back-mobile">
- <a href="{% url "dashboard:product-class-list" %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>
+ <a href="{% url "dashboard:product-class-list" %}"><i class="material-icons">arrow_back</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">
{% if product_class.pk %}{{ product_class }}{% else %}
{% trans 'Add new product type' context "Product class breadcrumbs" %}{% endif %}</span></li>
@@ -48,7 +48,7 @@
{% block content %}
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<div class="card">
<form method="post" id="form-product" enctype="multipart/form-data" novalidate>
<div class="card-content">
@@ -94,7 +94,7 @@
</form>
</div>
</div>
- <div class="col s12 m3 help-box">
+ <div class="col m12 l3 help-box">
<p class="grey-text">
<i class="material-icons">help</i>
{% blocktrans trimmed context "Product class help text" %}
diff --git a/templates/dashboard/product/product_form.html b/templates/dashboard/product/product_form.html
index fb15dba884..f1bc7d93bf 100644
--- a/templates/dashboard/product/product_form.html
+++ b/templates/dashboard/product/product_form.html
@@ -23,7 +23,7 @@
<li><a href="{% url "dashboard:product-list" %}" class="breadcrumb">
{% trans "Products" context "Product form breadcrumbs" %}
</a></li>
- <li class="back-mobile"><a href="{% url "dashboard:product-list" %}" class="breadcrumb">
+ <li class="back-mobile"><a href="{% url "dashboard:product-list" %}">
<i class="material-icons">arrow_back</i>
</a></li>
<li><span class="breadcrumbs--ellipsed-item">
@@ -96,7 +96,7 @@
<div class="tab-content" id="details">
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<form method="post" class="card" id="form-product" enctype="multipart/form-data" novalidate>
{% csrf_token %}
<div class="card-content">
@@ -156,7 +156,7 @@
</div>
</form>
</div>
- <div class="col s12 m3 help-box"></div>
+ <div class="col m12 l3 help-box"></div>
</div>
</div>
diff --git a/templates/dashboard/product/stock_locations/form.html b/templates/dashboard/product/stock_locations/form.html
index d1826c8d5a..0263f28c07 100644
--- a/templates/dashboard/product/stock_locations/form.html
+++ b/templates/dashboard/product/stock_locations/form.html
@@ -42,7 +42,7 @@
{% block content %}
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<div class="card">
<form method="post" id="form-product" novalidate>
<div class="card-content">
@@ -71,6 +71,6 @@
</form>
</div>
</div>
- <div class="col s12 m3 help-box"></div>
+ <div class="col m12 l3 help-box"></div>
</div>
{% endblock %}
diff --git a/templates/dashboard/shipping/method_form.html b/templates/dashboard/shipping/method_form.html
index fb3570592f..927d384e66 100644
--- a/templates/dashboard/shipping/method_form.html
+++ b/templates/dashboard/shipping/method_form.html
@@ -57,7 +57,7 @@
{% block content %}
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<div class="card">
<form method="post" id="form-method">
<div class="card-content">
@@ -115,6 +115,6 @@
</form>
</div>
</div>
- <div class="col s12 m3 help-box"></div>
+ <div class="col m12 l3 help-box"></div>
</div>
{% endblock %}
diff --git a/templates/dashboard/sites/detail.html b/templates/dashboard/sites/detail.html
index 7d110de715..41d6ed22c9 100644
--- a/templates/dashboard/sites/detail.html
+++ b/templates/dashboard/sites/detail.html
@@ -16,7 +16,7 @@
{% block content %}
<div class="row">
- <div class="col s12 m9">
+ <div class="col m12 l9">
<div class="card">
<form method="post" id="form-category" enctype="multipart/form-data" novalidate>
<div class="card-content">
@@ -42,6 +42,6 @@
</form>
</div>
</div>
- <div class="col s12 m3 help-box"></div>
+ <div class="col m12 l3 help-box"></div>
</div>
{% endblock %}