From 8f750e73832be3cccba8e53548e5ce7ffde2014b Mon Sep 17 00:00:00 2001 From: mr Date: Mon, 11 Jul 2011 12:03:21 +0200 Subject: do not refresh when an error occurs --- public/javascripts/toxcreate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js index d9946c4..1769623 100755 --- a/public/javascripts/toxcreate.js +++ b/public/javascripts/toxcreate.js @@ -50,7 +50,7 @@ $(function() { if( status_before != status_after) { $("span#model_" + id + "_status").html(data); loadModel(id, 'model'); - if (status_after == "Completed") id = -1; + if (status_after == "Completed" || status_after == "Error") id = -1; } }, error: function(data) { -- cgit v1.2.3 From 425cbf28a4686e59e9e46b9987f1e3d8348f39a1 Mon Sep 17 00:00:00 2001 From: mr Date: Tue, 12 Jul 2011 11:45:36 +0200 Subject: fix broken prediction details https://github.com/opentox/toxcreate/issues/49 --- helper.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helper.rb b/helper.rb index 2bbab30..b3be149 100644 --- a/helper.rb +++ b/helper.rb @@ -53,7 +53,13 @@ helpers do def sort(descriptors) features = {:activating => [], :deactivating => []} - descriptors.each { |d| features[d[OT.effect].to_sym] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]} } + descriptors.each do |d| + if d[OT.effect] =~ TRUE_REGEXP + features[:activating] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]} + elsif d[OT.effect] =~ FALSE_REGEXP + features[:deactivating] << {:smarts => d[OT.smarts],:p_value => d[OT.pValue]} + end + end features end -- cgit v1.2.3 From feccf0995ef995a4d32119fb5582b9a37b7f9dd0 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 13 Jul 2011 16:07:52 +0200 Subject: fix invalid HTML --- public/javascripts/toxcreate.js | 4 ++-- views/model.haml | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js index 1769623..68cd769 100755 --- a/public/javascripts/toxcreate.js +++ b/public/javascripts/toxcreate.js @@ -4,10 +4,10 @@ $(function() { var id = id; this.bind("click", function() { if($("a#show_model_" + id + "_warnings").html()=="show") { - $("dd#model_" + id + "_warnings").slideDown("slow"); + $("div#model_" + id + "_warnings").slideDown("slow"); $("a#show_model_" + id + "_warnings").html("hide"); }else{ - $("dd#model_" + id + "_warnings").slideUp("slow"); + $("div#model_" + id + "_warnings").slideUp("slow"); $("a#show_model_" + id + "_warnings").html("show"); } return false; diff --git a/views/model.haml b/views/model.haml index c64d81e..e9d3b95 100644 --- a/views/model.haml +++ b/views/model.haml @@ -45,8 +45,10 @@ %dd= model.error_messages - if model.warnings %dt Warnings: - %a{:href => "#", :id => "show_model_#{model.id}_warnings"} show - %dd{:id => "model_#{model.id}_warnings", :style => "display: none;"}= model.warnings + + %dd + %a{:href => "#", :id => "show_model_#{model.id}_warnings"} show + %div{:id => "model_#{model.id}_warnings", :style => "display: none;"}= model.warnings %dt Algorithm: %dd= toggle_link("#lazar_description","lazar") - if model.type -- cgit v1.2.3 From 065a42d25e5bbace7af0e521d6fab0bb2bb030d6 Mon Sep 17 00:00:00 2001 From: mr Date: Wed, 3 Aug 2011 12:57:22 +0200 Subject: remove alt tag from progressbar --- public/javascripts/toxcreate.js | 3 +-- views/model.haml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js index a5dc44c..91789f8 100755 --- a/public/javascripts/toxcreate.js +++ b/public/javascripts/toxcreate.js @@ -77,8 +77,7 @@ $(function() { if (progress == "100") return -1; $("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) + "%"); + $("div#model_" + id + "_progress").attr({title: parseInt(progress) + "%"}); }, error: function(data) { id = -1; diff --git a/views/model.haml b/views/model.haml index fe43a1f..f646dec 100644 --- a/views/model.haml +++ b/views/model.haml @@ -24,7 +24,7 @@ #{js} }); - %div{:id => "model_#{model.id}_progress", :class => "model_progress", :title => "#{percentage_completed}%", :alt => "#{percentage_completed}%"} + %div{:id => "model_#{model.id}_progress", :class => "model_progress", :title => "#{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_link'} -- cgit v1.2.3 From 004696cca244acd8ff0e078ee33ac09e3ebc03b0 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 4 Aug 2011 12:45:02 +0200 Subject: id for tasklinks (to fix doubled javascript) --- views/model.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/model.haml b/views/model.haml index f646dec..e688ae9 100644 --- a/views/model.haml +++ b/views/model.haml @@ -46,7 +46,7 @@ - if CONFIG[:logger]=="debug" %dt Task: %dd - %a{:href => "#{model.task_uri}", :rel => "external"} + %a{:href => "#{model.task_uri}", :id => "model_#{model.id}_task_link", :rel => "external"} = model.task_uri - if model.warnings %dt Warnings: -- cgit v1.2.3 From aa588fc87f1a892f3de903f5d60df68d4eaa6b52 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 4 Aug 2011 17:49:29 +0200 Subject: ul in p --- views/help.haml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/views/help.haml b/views/help.haml index 2b39d6c..f602dff 100644 --- a/views/help.haml +++ b/views/help.haml @@ -87,13 +87,13 @@ %p Excel examples for download: - %ul - %li - = link_to "hamster_carcinogenicity.xls", "/hamster_carcinogenicity.xls" - (classification) - %li - = link_to "EPAFHM.xls", "/EPAFHM.xls" - (regression) +%ul + %li + = link_to "hamster_carcinogenicity.xls", "/hamster_carcinogenicity.xls" + (classification) + %li + = link_to "EPAFHM.xls", "/EPAFHM.xls" + (regression) %h3 CSV example @@ -113,13 +113,13 @@ %p CSV examples for download: - %ul - %li - = link_to "hamster_carcinogenicity.csv", "/hamster_carcinogenicity.csv" - (classification) - %li - = link_to "EPAFHM.csv", "/EPAFHM.csv" - (regression) +%ul + %li + = link_to "hamster_carcinogenicity.csv", "/hamster_carcinogenicity.csv" + (classification) + %li + = link_to "EPAFHM.csv", "/EPAFHM.csv" + (regression) %p You can create CSV files in Excel: Create a sheet with two columns and export them as CSV file with the "Save As" option from the menu, selecting the CSV (comma delimited) format. -- cgit v1.2.3