From 4838c4ede8f41e89d26c742921a424c35e7d92c8 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Tue, 3 Jul 2012 01:45:21 +0100 Subject: [PATCH] Replace the progress bars with a copied jQuery version. Fixes #1056 --- app/helpers/application_helper.rb | 10 +++--- public/stylesheets/application.css | 58 ++++++++++-------------------- 2 files changed, 23 insertions(+), 45 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3cfb3898..4e419df5 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -868,12 +868,10 @@ module ApplicationHelper pcts << (100 - pcts[1] - pcts[0]) width = options[:width] || '100px;' legend = options[:legend] || '' - content_tag('table', - content_tag('tr', - (pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed') : '') + - (pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done') : '') + - (pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo') : '') - ), :class => 'progress', :style => "width: #{width};") + + content_tag('div', + content_tag('div', '', :style => "width: #{pcts[0]}%;", :class => 'closed ui-progressbar-value ui-widget-header ui-corner-left') + + content_tag('div', '', :style => "width: #{pcts[1]}%;", :class => 'done ui-progressbar-value ui-widget-header'), + :class => 'progress ui-progressbar ui-widget ui-widget-content ui-corner-all', :style => "width: #{width};") + content_tag('p', legend, :class => 'pourcent') end diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index f17d5693..58368832 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -350,11 +350,6 @@ tr.issue td.subject { text-align: left; } -tr.issue td.done_ratio table.progress { - margin-left: auto; - margin-right: auto; -} - #content tr.issue.idnt td.subject a { background: url(../images/bullet_arrow_right.png) no-repeat 0 50%; padding-left: 16px; @@ -1721,32 +1716,6 @@ div.tooltip:hover span.tip { } /***** Progress bar *****/ -#content table.progress { - border: 1px solid #D7D7D7; - border-collapse: collapse; - border-spacing: 0pt; - empty-cells: show; - text-align: center; - float: left; - margin: 1px 6px 1px 0px; -} - -#content table.progress td { - height: 0.9em; -} - -#content table.progress td.closed { - background: #BAE0BA none repeat scroll 0%; -} - -#content table.progress td.done { - background: #DEF0DE none repeat scroll 0%; -} - -#content table.progress td.open { - background: #FFF none repeat scroll 0%; -} - #content p.pourcent { font-size: 80%; } @@ -4074,14 +4043,6 @@ fieldset#filters div.add-filter { border-top: none; } -#content .meta table.progress { - border: 1px solid #bbb; - border-collapse: separate; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; -} - .nosidebar fieldset ul { margin-left: 0; } @@ -4378,3 +4339,22 @@ Additional wiki styles margin: 0 0 0 4px; vertical-align: middle; } + +div.progress { + height: 0.9em; + float: left; + margin: 0 6px 0 0; +} + +div.progress .closed, +div.progress .done { + float: left; + background: #BAE0BA; + border-left: 0; + border-right: 0; + margin: -1px 0; +} + +div.progress .done { + background: #DEF0DE; +}