From 646a6b11f53b6ec5025b6a8904c5b0f151488542 Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Tue, 20 Oct 2009 23:05:41 +0200 Subject: [PATCH] Nice green +/- buttons for order page. --- app/views/ordering/order.rhtml | 4 ++-- public/stylesheets/main.css | 22 +++++++++++++--------- public/stylesheets/print.css | 22 +++++++++++++--------- public/stylesheets/sass/main.sass | 22 +++++++++++++--------- 4 files changed, 41 insertions(+), 29 deletions(-) diff --git a/app/views/ordering/order.rhtml b/app/views/ordering/order.rhtml index f0fadd43..e027f8ef 100644 --- a/app/views/ordering/order.rhtml +++ b/app/views/ordering/order.rhtml @@ -45,7 +45,7 @@ <%= @order.stockit? ? order_article.article.quantity_available : @unit[i] %> * <%=h order_article.article.unit %> <%= number_to_currency(@price[i]) %> <%= order_article.units_to_order %> - + " value="<%= @quantity[i] %>" size="2" /> <%= @used_quantity[i] %> + <%= @quantity[i] - @used_quantity[i] %> @@ -53,7 +53,7 @@ <%= button_to_function('+', "increaseQuantity(#{i})") %> <%= button_to_function('-', "decreaseQuantity(#{i})") %> - + " value="<%= @tolerance[i] %>" size="2" /> <% if (@unit[i] > 1) -%> <%= @used_tolerance[i] %> + diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 7974d43c..cd3ae81a 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -387,28 +387,30 @@ span.total { table#order { text-align: center; } table#order input { - font-size: 80%; } + font-size: 0.9em; + font-weight: bolder; + background-color: #78B74E; + color: #fff; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + padding: 0; } table#order th#col_required, table#order th#col_tolerance { width: 165px; } table#order th#col_packages, table#order th#col_left_units { width: 50px; } + table#order td.quantity, table#order td.tolerance { + text-align: right; } table#order td#col_left_units { color: #ed0606; } table#order td { padding: 0.6em; } - table#order td.name, table#order tr.note td { + table#order td.name { text-align: left; padding-left: 10px; } table#order tfoot tr { background-color: #e4eed6; } table#order tfoot td { padding-right: 10px; } - table#order tr.note { - background-color: #FBFBFB; - font-size: 0.9em; - border-bottom: 1px solid #DDDDDD; } - table#order tr.note td { - padding-left: 20px; } #order-footer, .article-info { z-index: 1; @@ -425,7 +427,9 @@ table#order { margin: .5em 0; } #order-footer #total-sum #order-button input, .article-info #total-sum #order-button input { background-color: #78B74E; - color: #fff; } + color: #fff; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; } #order-footer #total-sum #order-button input:disabled, .article-info #total-sum #order-button input:disabled { background-color: red; } diff --git a/public/stylesheets/print.css b/public/stylesheets/print.css index 20f24d7f..afa3e82f 100644 --- a/public/stylesheets/print.css +++ b/public/stylesheets/print.css @@ -387,28 +387,30 @@ span.total { table#order { text-align: center; } table#order input { - font-size: 80%; } + font-size: 0.9em; + font-weight: bolder; + background-color: #78B74E; + color: #fff; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + padding: 0; } table#order th#col_required, table#order th#col_tolerance { width: 165px; } table#order th#col_packages, table#order th#col_left_units { width: 50px; } + table#order td.quantity, table#order td.tolerance { + text-align: right; } table#order td#col_left_units { color: #ed0606; } table#order td { padding: 0.6em; } - table#order td.name, table#order tr.note td { + table#order td.name { text-align: left; padding-left: 10px; } table#order tfoot tr { background-color: #e4eed6; } table#order tfoot td { padding-right: 10px; } - table#order tr.note { - background-color: #FBFBFB; - font-size: 0.9em; - border-bottom: 1px solid #DDDDDD; } - table#order tr.note td { - padding-left: 20px; } #order-footer, .article-info { z-index: 1; @@ -425,7 +427,9 @@ table#order { margin: .5em 0; } #order-footer #total-sum #order-button input, .article-info #total-sum #order-button input { background-color: #78B74E; - color: #fff; } + color: #fff; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; } #order-footer #total-sum #order-button input:disabled, .article-info #total-sum #order-button input:disabled { background-color: red; } diff --git a/public/stylesheets/sass/main.sass b/public/stylesheets/sass/main.sass index c8f70c0c..b35c6b60 100644 --- a/public/stylesheets/sass/main.sass +++ b/public/stylesheets/sass/main.sass @@ -428,16 +428,24 @@ span.total table#order :text-align center input - :font-size 80% + font-size: 0.9em + font-weight: bolder + background-color: #78B74E + color: #fff + -moz-border-radius: 3px + -webkit-border-radius: 3px + padding: 0 th#col_required, th#col_tolerance :width 165px th#col_packages, th#col_left_units - :width 50px + :width 50px + td.quantity, td.tolerance + text-align: right td#col_left_units :color #ed0606 td :padding 0.6em - td.name, tr.note td + td.name :text-align left :padding-left 10px tfoot @@ -445,12 +453,6 @@ table#order :background-color = !lightGreen td :padding-right 10px - tr.note - :background-color #FBFBFB - :font-size 0.9em - :border-bottom 1px solid #DDDDDD - td - :padding-left 20px #order-footer, .article-info z-index: 1 position: fixed @@ -467,6 +469,8 @@ table#order input background-color: #78B74E color: #fff + -moz-border-radius: 3px + -webkit-border-radius: 3px input:disabled background-color: red .article-info