Explorar el Código

repositioned alert for responsive layout and css positioned it fixed rather that absolute

master
Jon Price hace 14 años
padre
commit
8d625a4bb7

+ 7
- 0
oscar/static/css/responsive.css Ver fichero

@@ -239,6 +239,13 @@
239 239
   .header {
240 240
     text-shadow: none;
241 241
   }
242
+  .alert {
243
+    /*  Position alerts at the bottom of the browser window*/
244
+  
245
+    position: static;
246
+    width: auto;
247
+    margin-bottom: 0px;
248
+  }
242 249
 }
243 250
 @media (max-width: 768px) {
244 251
   .container {

+ 1
- 1
oscar/static/css/styles.css Ver fichero

@@ -1633,7 +1633,7 @@ button.btn.small, input[type="submit"].btn.small {
1633 1633
   border-radius: 4px;
1634 1634
   /*  Position alerts at the bottom of the browser window*/
1635 1635
 
1636
-  position: absolute;
1636
+  position: fixed;
1637 1637
   bottom: 0;
1638 1638
   right: 2em;
1639 1639
   width: 200px;

+ 2
- 1
oscar/static/js/oscar/ui.js Ver fichero

@@ -72,8 +72,9 @@ $(document).ready(function()
72 72
     $('.typeahead').typeahead();
73 73
     
74 74
     // This activates the alerts
75
-    $(".alert").alert('close');
75
+    $('.alert').alert('.close');
76 76
     
77
+
77 78
     
78 79
     // This activates elastislide
79 80
     $('#carousel').elastislide({

+ 1
- 1
oscar/static/less/bootstrap/alerts.less Ver fichero

@@ -10,7 +10,7 @@
10 10
   border: 1px solid @warningBorder;
11 11
   .border-radius(4px);
12 12
 /*  Position alerts at the bottom of the browser window*/
13
-  position: absolute;
13
+  position: fixed;
14 14
   bottom: 0;
15 15
   right: 2em;
16 16
   width: 200px;

+ 6
- 1
oscar/static/less/responsive.less Ver fichero

@@ -287,7 +287,12 @@
287 287
   .header {
288 288
     text-shadow:none;
289 289
   }
290
-
290
+  .alert {
291
+  /*  Position alerts at the bottom of the browser window*/
292
+    position: static;
293
+    width: auto;
294
+    margin-bottom:0px;
295
+  }
291 296
 }
292 297
 
293 298
 

+ 6
- 6
oscar/templates/checkout/layout.html Ver fichero

@@ -10,12 +10,6 @@
10 10
 {% endblock %}
11 11
 
12 12
 {% block layout %}
13
-    {% for message in messages %}
14
-    <div class="alert fade in alert-{{ message.tags }}">
15
-    	<a class="close" data-dismiss="alert">x</a>
16
-    	{{ message }}
17
-    </div>
18
-    {% endfor %}
19 13
     {% include "partials/nav_accounts.html" %}
20 14
     
21 15
     <header class="header container-fluid">
@@ -49,6 +43,12 @@
49 43
             </div><!-- /navbar-inner -->
50 44
         </div><!-- /navbar -->
51 45
     </header><!-- /header -->
46
+    {% for message in messages %}
47
+       <div class="alert fade in alert-{{ message.tags }}">
48
+       	<a class="close" data-dismiss="alert">x</a>
49
+       	{{ message }}
50
+       </div>
51
+    {% endfor %}
52 52
     <div class="container-fluid page">
53 53
        {% block header %}
54 54
        {% endblock %}

+ 6
- 7
oscar/templates/layout.html Ver fichero

@@ -14,12 +14,6 @@
14 14
 {% endblock %}
15 15
 
16 16
 {% block layout %}
17
-    {% for message in messages %}
18
-    <div class="alert fade in alert-{{ message.tags }}">
19
-    	<a class="close" data-dismiss="alert">x</a>
20
-    	{{ message }}
21
-    </div>
22
-    {% endfor %}
23 17
     {% include "partials/nav_accounts.html" %}
24 18
     <header class="header container-fluid">
25 19
         <div class="row-fluid">
@@ -77,7 +71,12 @@
77 71
             </div><!-- /navbar-inner -->
78 72
         </div><!-- /navbar -->
79 73
     </header><!-- /header -->
80
-
74
+    {% for message in messages %}
75
+    <div class="alert fade in alert-{{ message.tags }}">
76
+    	<a class="close" data-dismiss="alert">x</a>
77
+    	{{ message }}
78
+    </div>
79
+    {% endfor %}
81 80
     <div class="container-fluid page">
82 81
         {% block header %}
83 82
         {% endblock %}

+ 6
- 7
oscar/templates/promotions/layout.html Ver fichero

@@ -10,12 +10,6 @@
10 10
 {% endblock %}
11 11
 
12 12
 {% block layout %}
13
-    {% for message in messages %}
14
-    <div class="alert fade in alert-{{ message.tags }}">
15
-    	<a class="close" data-dismiss="alert">x</a>
16
-    	{{ message }}
17
-    </div>
18
-    {% endfor %}
19 13
     {% include "partials/nav_accounts.html" %}
20 14
     
21 15
     <header class="header container-fluid">
@@ -79,7 +73,12 @@
79 73
         
80 74
         
81 75
     </header><!-- /header -->
82
-
76
+    {% for message in messages %}
77
+    <div class="alert fade in alert-{{ message.tags }}">
78
+    	<a class="close" data-dismiss="alert">x</a>
79
+    	{{ message }}
80
+    </div>
81
+    {% endfor %}
83 82
     <div class="container-fluid page home">
84 83
         <div class="page_inner">
85 84
             <div class="row-fluid">

Loading…
Cancelar
Guardar