diff options
-rw-r--r-- | application.rb | 4 | ||||
-rw-r--r-- | model.rb | 7 | ||||
-rw-r--r-- | public/progressbar/progressbar.css | 23 | ||||
-rw-r--r-- | views/model.haml | 4 |
4 files changed, 16 insertions, 22 deletions
diff --git a/application.rb b/application.rb index 1ab6576..243333c 100644 --- a/application.rb +++ b/application.rb @@ -70,7 +70,7 @@ get '/login' do end get '/models/?' do - @models = ToxCreateModel.all#.to_a.reverse + @models = ToxCreateModel.all.sort.reverse subjectstring = session[:subjectid] ? "?subjectid=#{CGI.escape(session[:subjectid])}" : "" haml :models, :locals=>{:models=>@models, :subjectstring => subjectstring} end @@ -192,7 +192,7 @@ post '/models' do # create a new model task = OpenTox::Task.create("Uploading dataset and creating lazar model",url_for("/models",:full)) do |task| task.progress(5) - @model.update :task_uri => task.uri, :status => "Uploading and saving dataset" + @model.update :status => "Uploading and saving dataset", :task_uri => task.uri begin @dataset = OpenTox::Dataset.create(nil, subjectid) # check format by extension - not all browsers provide correct content-type]) @@ -1,4 +1,5 @@ require 'ohm' +require 'ohm/contrib' #require 'redis/objects' #@@redis = Redis.new(:thread_safe=>true)#(:host => '127.0.0.1', :port => 6379) @@ -7,12 +8,16 @@ class ToxCreateModel < Ohm::Model #include Redis::Objects #include DataMapper::Resource #attribute :id + include Ohm::Callbacks + include Ohm::Typecast + include Ohm::Timestamping + attribute :name attribute :warnings attribute :error_messages attribute :type attribute :status - attribute :created_at + attribute :created_at, Date attribute :task_uri attribute :uri diff --git a/public/progressbar/progressbar.css b/public/progressbar/progressbar.css index 92e3f82..962abbc 100644 --- a/public/progressbar/progressbar.css +++ b/public/progressbar/progressbar.css @@ -11,7 +11,7 @@ /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); clip: rect(1px,1px,1px,1px); } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .ui-helper-clearfix { display: inline-block; } @@ -19,7 +19,7 @@ * html .ui-helper-clearfix { height:1%; } .ui-helper-clearfix { display:block; } /* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; } /* Interaction Cues @@ -82,8 +82,8 @@ .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { background-image: none; } /* Icons ----------------------------------*/ @@ -279,20 +279,9 @@ /* Misc visuals ----------------------------------*/ -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; } -.ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; } -.ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } -.ui-corner-top { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } -.ui-corner-right { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; } -.ui-corner-left { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; } -.ui-corner-all { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } - /* Overlays */ -.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } -.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* +.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; } +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;}/* * jQuery UI Progressbar 1.8.9 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) diff --git a/views/model.haml b/views/model.haml index 76a2f31..5ecc86b 100644 --- a/views/model.haml +++ b/views/model.haml @@ -35,8 +35,8 @@ %span %br - -#%dt Started: - -#%dd= model.created_at.strftime("%m/%d/%Y - %I:%M:%S%p") + %dt Started: + %dd= Time.parse(model.created_at.to_s).strftime("%m/%d/%Y - %I:%M:%S%p") if model.created_at - if model.nr_compounds %dt Training compounds: %dd= model.nr_compounds |