summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-02-09 09:50:18 +0100
committermr <mr@mrautenberg.de>2011-02-09 09:50:18 +0100
commitb40e9a00a1a779b11da4d5ab5078c76207a3456a (patch)
tree18a96cec538c4e317dee1a5bcbbea35bba9cb09b
parentce68f6a763ce8de8957f84af4f52dbe1d74cd232 (diff)
refining thhe progressbar
-rwxr-xr-xpublic/javascripts/toxcreate.js4
-rw-r--r--public/progressbar/images/ui-bg_flat_0_aaaaaa_40x100.pngbin225 -> 2062 bytes
-rw-r--r--public/progressbar/images/ui-bg_highlight-hard_15_888888_1x100.pngbin150 -> 214 bytes
-rw-r--r--views/model.haml12
-rw-r--r--views/style.sass13
5 files changed, 17 insertions, 12 deletions
diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js
index 949b9ea..de5e73d 100755
--- a/public/javascripts/toxcreate.js
+++ b/public/javascripts/toxcreate.js
@@ -75,7 +75,9 @@ $(function() {
var progress = data.trim();
if (progress == "100") return -1;
- $("div#model_" + id + "_progress").progressbar("value", parseInt(progress));
+ $("div#model_" + id + "_progress").progressbar("value", parseInt(progress));
+ $("div#model_" + id + "_progress").attr({title: parseInt(progress) + "%", alt: parseInt(progress) + "%"});
+ //$("div#model_" + id + "_progress").attr("alt", parseInt(progress) + "%");
},
error: function(data) {
id = -1;
diff --git a/public/progressbar/images/ui-bg_flat_0_aaaaaa_40x100.png b/public/progressbar/images/ui-bg_flat_0_aaaaaa_40x100.png
index e3dcd29..f4b49ad 100644
--- a/public/progressbar/images/ui-bg_flat_0_aaaaaa_40x100.png
+++ b/public/progressbar/images/ui-bg_flat_0_aaaaaa_40x100.png
Binary files differ
diff --git a/public/progressbar/images/ui-bg_highlight-hard_15_888888_1x100.png b/public/progressbar/images/ui-bg_highlight-hard_15_888888_1x100.png
index da27188..7a61a4d 100644
--- a/public/progressbar/images/ui-bg_highlight-hard_15_888888_1x100.png
+++ b/public/progressbar/images/ui-bg_highlight-hard_15_888888_1x100.png
Binary files differ
diff --git a/views/model.haml b/views/model.haml
index 52d143c..d218fea 100644
--- a/views/model.haml
+++ b/views/model.haml
@@ -16,23 +16,21 @@
= haml :model_status, :locals=>{:model=>model}, :layout => false
- if model.task_uri && model.status != "Completed"
- if (task = OpenTox::Task.exist?(model.task_uri))
- - percentage_completed = task.metadata[OT.percentageCompleted]
+ - percentage_completed = task.metadata[OT.percentageCompleted].to_i
- js = "$('#model_#{model.id}_progress').progressbar({ value: #{percentage_completed} })";
:javascript
$(function() {
#{js}
});
- %div{:id => "model_#{model.id}_progress", :class => "model_progress"}
+ %div{:id => "model_#{model.id}_progress", :class => "model_progress", :title => "#{percentage_completed}%", :alt => "#{percentage_completed}%"}
//= haml :model_progress, :locals=>{:percentage_completed=>percentage_completed}, :layout => false
- if is_authorized(model.web_uri, "DELETE")
- (
- %a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete'}
+ %a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete_link'}
- if model.status == "Completed"
- delete
+ (delete)
- else
- stop
- )
+ (stop)
%dt Started:
%dd= model.created_at.strftime("%m/%d/%Y - %I:%M:%S%p")
diff --git a/views/style.sass b/views/style.sass
index a2b8191..db1f1bf 100644
--- a/views/style.sass
+++ b/views/style.sass
@@ -250,8 +250,13 @@ dl
.edit_button
font-size: 0.5em
-
+
+.model_status
+ float: left
+
.model_progress
- width: 240px
- height: 20px
- float: right \ No newline at end of file
+ width: 200px
+ height: 16px
+ margin-left: 16px
+ margin-right: 16px
+ float: left