Browse Source

Ensure dashboard is responsive

Before this change, the dashboard wasn't behaving responsively which was
a regression (I think) since 0.6.4. It looks like the change came from
the bootstrap upgrade to 2.3.2.

This change ensures responsive.css is loaded for the dashboard templates
and adjusts the padding on the body so content isn't flush to the
viewport edges.

The link to the dashboard is shown when in the narrowest viewport. It
was previously hidden.

A couple of minor FED gremlins are also squashed (hat-tip @andysellick).
master
David Winterbottom 11 years ago
parent
commit
33a1decbe4

+ 2
- 1
oscar/static/oscar/css/dashboard.css View File

@@ -2987,6 +2987,7 @@ body {
2987 2987
   /*  max-width: 1170px;*/
2988 2988
 
2989 2989
   position: relative;
2990
+  padding: 0 20px;
2990 2991
 }
2991 2992
 .dashboard > .content {
2992 2993
   margin-top: 18px;
@@ -3122,7 +3123,7 @@ button {
3122 3123
   background-color: transparent;
3123 3124
 }
3124 3125
 .page-header {
3125
-  padding: 0 20px 10px 0;
3126
+  padding: 0 0 10px 0;
3126 3127
   margin-bottom: 0;
3127 3128
   border-bottom: 0;
3128 3129
 }

+ 2
- 1
oscar/static/oscar/less/dashboard.less View File

@@ -230,6 +230,7 @@ body {
230 230
   margin: 0 auto;
231 231
 /*  max-width: 1170px;*/
232 232
   position: relative;
233
+  padding: 0 20px;
233 234
 }
234 235
 .dashboard > .content {
235 236
   margin-top: @baseLineHeight;
@@ -348,7 +349,7 @@ button {
348 349
   background-color:transparent;
349 350
 }
350 351
 .page-header {
351
-  padding: 0 20px 10px 0;
352
+  padding: 0 0 10px 0;
352 353
   margin-bottom: 0;
353 354
   border-bottom: 0;
354 355
 }

+ 2
- 2
oscar/templates/oscar/base.html View File

@@ -8,11 +8,11 @@
8 8
     <head>
9 9
         <title>{% if display_version %}[{% trans "Build" %} {{ version }}] {% endif %}{% block title %}{{ shop_name }} - {{ shop_tagline }}{% endblock %}</title>
10 10
 
11
-        <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
11
+        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
12 12
         <meta name="created" content="{% now "jS M Y h:i" %}" />
13 13
         <meta name="description" content="{% block description %}{% endblock %}" />
14 14
         <meta name="keywords" content="{% block keywords %}{% endblock %}" />
15
-        <meta name="viewport" content="{% block viewport %}width=device-width"{% endblock %}>
15
+        <meta name="viewport" content="{% block viewport %}width=device-width{% endblock %}" />
16 16
 
17 17
         <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
18 18
         <!--[if lt IE 9]>

+ 2
- 0
oscar/templates/oscar/dashboard/layout.html View File

@@ -11,8 +11,10 @@
11 11
         <link rel="stylesheet" href="{% static "oscar/css/bootstrap.min.css" %}" />
12 12
         {% if use_less %}
13 13
             <link rel="stylesheet" type="text/less" href="{% static "oscar/less/dashboard.less" %}" />
14
+            <link rel="stylesheet" type="text/less" href="{% static "oscar/less/responsive.less" %}" />
14 15
         {% else %}
15 16
             <link rel="stylesheet" type="text/css" href="{% static "oscar/css/dashboard.css" %}" />
17
+            <link rel="stylesheet" type="text/css" href="{% static "oscar/css/responsive.css" %}" />
16 18
         {% endif %}
17 19
     {% endcompress %}
18 20
 {% endblock %}

+ 1
- 1
oscar/templates/oscar/partials/nav_accounts.html View File

@@ -42,7 +42,7 @@
42 42
                             {% endif %}
43 43
                         </li>
44 44
                         {% if user.is_staff or perms.partner.dashboard_access %}
45
-                            <li class="hidden-phone"><a href="{% url 'dashboard:index' %}"><i class="icon-list-ul"></i> {% trans "Dashboard" %}</a></li>
45
+                            <li><a href="{% url 'dashboard:index' %}"><i class="icon-list-ul"></i> {% trans "Dashboard" %}</a></li>
46 46
                         {% endif %}
47 47
                         <li><a id="logout_link" href="{% url 'customer:logout' %}"><i class="icon-signout"></i> {% trans "Logout" %}</a></li>
48 48
                     {% else %}

Loading…
Cancel
Save