From fb564d21b8262f4ea990dbc8d9ad79144f188f01 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Wed, 23 Jul 2014 22:56:59 +0200 Subject: [PATCH] table: add checkbox and checkbox --- app/assets/images/sprite.svg | 9 ++- .../app/views/dashboard/ticket.jst.eco | 8 +-- .../app/views/generic/table.jst.eco | 20 +++++- app/assets/stylesheets/zzz.css.erb | 65 ++++++++++++++++--- 4 files changed, 83 insertions(+), 19 deletions(-) diff --git a/app/assets/images/sprite.svg b/app/assets/images/sprite.svg index 9398a578c..bc11d7f99 100644 --- a/app/assets/images/sprite.svg +++ b/app/assets/images/sprite.svg @@ -93,7 +93,12 @@ - - + + + + + + + \ No newline at end of file diff --git a/app/assets/javascripts/app/views/dashboard/ticket.jst.eco b/app/assets/javascripts/app/views/dashboard/ticket.jst.eco index 1ead3df53..0930cb443 100644 --- a/app/assets/javascripts/app/views/dashboard/ticket.jst.eco +++ b/app/assets/javascripts/app/views/dashboard/ticket.jst.eco @@ -13,8 +13,8 @@ <% else: %> - - + + <% end %> @@ -26,8 +26,8 @@ <% else: %> - - + + <% end %> diff --git a/app/assets/javascripts/app/views/generic/table.jst.eco b/app/assets/javascripts/app/views/generic/table.jst.eco index a12fef6b7..dbbb1007b 100644 --- a/app/assets/javascripts/app/views/generic/table.jst.eco +++ b/app/assets/javascripts/app/views/generic/table.jst.eco @@ -2,11 +2,17 @@ <% if @checkbox: %> - + + + <% end %> <% if @radio: %> <% end %> + <% for item in @header: %> style="<%= item.style %>"<% end %>><%- @T( item.display ) %> <% end %> @@ -38,10 +44,18 @@ <% end %> <% end %> <% position++ %> - + <% if @checkbox: %> - + + + <% end %> + + + <% if @radio: %> <% end %> diff --git a/app/assets/stylesheets/zzz.css.erb b/app/assets/stylesheets/zzz.css.erb index aa9698de6..7de1e4eb9 100644 --- a/app/assets/stylesheets/zzz.css.erb +++ b/app/assets/stylesheets/zzz.css.erb @@ -44,8 +44,9 @@ table { white-space: nowrap; } +.table > thead:first-child > tr:first-child > th, .table > thead > tr > th { - padding: 12px 9px 9px; + padding: 12px 9px 10px; border-bottom: none; border-top: 1px solid #ececec; background: #f0f1f2; @@ -54,12 +55,40 @@ table { font-size: 12px; text-transform: uppercase; } - -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: 9px; - border-top-color: #f2f2f2; + +.table > tbody > tr > td { + padding: 10px 9px 9px; + border: none; + box-shadow: 0 1px rgba(0,0,0,.02) inset; +} + +.table > tbody > tr:first-child > td { + box-shadow: none; +} + +.table-hover > tbody > tr:hover > td, +.table-hover > tbody > tr:hover > th { + background: rgba(0,8,14,.015); +} + +.table > thead:first-child > tr:first-child > th.no-padding, +.table > thead > tr > th.no-padding, +.table > tbody > tr > td.no-padding { + padding: 0; +} + +.table .checkbox-replacement { + padding: 0; + margin: 0; + height: 38px; +} + +.table .checkbox-replacement input[type=checkbox] { + display: none; +} + +.table .priority.icon:after { + background: #f8f9fa; } .table .table-cell { @@ -540,7 +569,7 @@ label { } .page-header-title { - margin-bottom: 20px; + margin-bottom: 15px; } .page-header-meta { @@ -1053,8 +1082,8 @@ ol.tabs li { opacity: .39; } - .inactive.left.arrow.icon, - .inactive.right.arrow.icon { + .disabled.left.arrow.icon, + .disabled.right.arrow.icon { opacity: .23; } @@ -1066,6 +1095,22 @@ ol.tabs li { background-position: -8px -299px; } + .checkbox.icon { + min-height: 0; /* overwriting bootstrap */ + margin: 0; /* overwriting bootstrap */ + width: 10px; + height: 10px; + background-position: -16px -299px; + } + + .white.checkbox.icon { + background-color: white; + } + + :checked + .checkbox.icon { + background-position: -26px -299px; + } + /* * removed margin of forms to not break the layout with submit buttons within
area e. g. for modal dialogs