summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormr <mr@mrautenberg.de>2011-03-24 13:57:07 +0100
committermr <mr@mrautenberg.de>2011-03-24 13:57:07 +0100
commit592f509ec22dd3f742ee530c7b1692b1af05e528 (patch)
tree0322f9332db56a696282cf54c165663de7a3e1b1
parent0ed50191f815fce11816044864a045a31194d8b4 (diff)
external links with rel='external' for w3c compliance
-rwxr-xr-xpublic/javascripts/toxcreate.js12
-rw-r--r--views/create.haml2
-rw-r--r--views/feature_table.haml4
-rw-r--r--views/help.haml8
-rw-r--r--views/layout.haml6
-rw-r--r--views/lazar.haml10
-rw-r--r--views/lazar_algorithm.haml4
-rw-r--r--views/lazar_description.haml4
-rw-r--r--views/login.haml12
-rw-r--r--views/model.haml2
-rw-r--r--views/regression_validation.haml6
-rw-r--r--views/significant_fragments.haml2
-rw-r--r--views/unit.haml2
13 files changed, 43 insertions, 31 deletions
diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js
index 3f243fe..d9946c4 100755
--- a/public/javascripts/toxcreate.js
+++ b/public/javascripts/toxcreate.js
@@ -226,3 +226,15 @@ jQuery.fn.deleteModel = function(type, options) {
return false;
});
};
+
+$(document).ready(function() {
+ $('A[rel="external"]').each(function() {
+ $(this).attr('alt', 'Link opens in new window.');
+ $(this).attr('title', 'Link opens in new window.');
+ });
+ $('A[rel="external"]').click(function() {
+ window.open($(this).attr('href'));
+ return false;
+ });
+});
+
diff --git a/views/create.haml b/views/create.haml
index 82f48d0..2149f3d 100644
--- a/views/create.haml
+++ b/views/create.haml
@@ -45,5 +45,5 @@
and your models can be modified or deleted by other guests. Please
= link_to "log in", "/login"
with your
- %a{:href => "www.opentox.org"} OpenTox
+ %a{:href => "http://www.opentox.org", :rel => "external"} OpenTox
account to control your model permissions.
diff --git a/views/feature_table.haml b/views/feature_table.haml
index 4fa927c..a8a153f 100644
--- a/views/feature_table.haml
+++ b/views/feature_table.haml
@@ -4,7 +4,7 @@
%th
activating
(
- %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html"} SMARTS
+ %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS
)
%th p value
- if features[:activating]
@@ -17,7 +17,7 @@
%th
deactivating
(
- %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html"} SMARTS
+ %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS
)
%th p value
- if features[:deactivating]
diff --git a/views/help.haml b/views/help.haml
index da6495e..3d39641 100644
--- a/views/help.haml
+++ b/views/help.haml
@@ -1,7 +1,7 @@
= link_to "Back to model creation", '/create'
%p
Input files have two columns. Enter in the first column the chemical structure in
- %a{:href => "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification"} SMILES
+ %a{:href => "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification", :rel => "external"} SMILES
format, in the second column the toxic activity. The first line contains a description of the columns and is ignored.
%dl
%dt Classification datasets
@@ -12,15 +12,15 @@
%ul
%li
use
- %a{:href => "http://en.wikipedia.org/wiki/Molar_(concentration)"} molar
+ %a{:href => "http://en.wikipedia.org/wiki/Molar_(concentration)", :rel => "external"} molar
units
%li enter non-logarithmic values (logarithms are taken internally)
%li avoid 0 activities (will be ignored)
%p
Input files are accepted in
- %a{:href => "http://en.wikipedia.org/wiki/Microsoft_Excel"} Excel
+ %a{:href => "http://en.wikipedia.org/wiki/Microsoft_Excel", :rel => "external"} Excel
and
- %a{:href => "http://en.wikipedia.org/wiki/Comma-separated_values"} CSV
+ %a{:href => "http://en.wikipedia.org/wiki/Comma-separated_values", :rel => "external"} CSV
formats.
%h3 Excel example
diff --git a/views/layout.haml b/views/layout.haml
index d9d7783..2a96636 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -37,7 +37,7 @@
- if `hostname`.match(/ot-test/)
.notice
This service is for testing purposes only - once a week all models will be deleted. Please send bug reports and feature requests to our
- %a{:href => 'http://github.com/opentox/opentox-toxmodel/issues'} issue tracker.
+ %a{:href => 'http://github.com/opentox/toxcreate/issues', :rel => "external"} issue tracker.
- if flash[:notice]
%p
@@ -48,6 +48,6 @@
.footer
&copy;
- %a{:href => 'http://www.in-silico.ch'} in silico toxicology
+ %a{:href => 'http://www.in-silico.ch', :rel => "external"} in silico toxicology
2009-2010, powered by
- %a{:href => 'http://www.opentox.org'} <span style="color:#5D308A;font-family:arial,sans-serif,helvetica;letter-spacing:-1px;">Open</span><span style="color:#000;font-family:arial,sans-serif,helvetica;font-weight:bold;letter-spacing:-1px;position:relative;">Tox</span>
+ %a{:href => 'http://www.opentox.org', :rel => "external"} <span style="color:#5D308A;font-family:arial,sans-serif,helvetica;letter-spacing:-1px;">Open</span><span style="color:#000;font-family:arial,sans-serif,helvetica;font-weight:bold;letter-spacing:-1px;position:relative;">Tox</span>
diff --git a/views/lazar.haml b/views/lazar.haml
index 3de7400..d52a645 100644
--- a/views/lazar.haml
+++ b/views/lazar.haml
@@ -36,13 +36,13 @@
%li= toggle_link("#fragments","Significant fragments")
-# This does not work, ask nina/vedrin
-# %li
- %a{:href => "http://ambit.uni-plovdiv.bg:8080/ambit2/query/structure/?search=#{@compound.smiles}"} Ambit data
+ %a{:href => "http://ambit.uni-plovdiv.bg:8080/ambit2/query/structure/?search=#{@compound.smiles}", :rel => "external"} Ambit data
-# %li
- %a{:href => "http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=PureSearch&db=pccompound&term=#{URI.encode('"'+@compound.inchi+'"[InChI]')}"} PubChem data
- (external)
+ %a{:href => "http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=PureSearch&db=pccompound&term=#{URI.encode('"'+@compound.inchi+'"[InChI]')}", :rel => "external"} PubChem data
+ (external)
-# %li
- %a{:href => "http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&inchi=#{URI.encode @compound.inchi}"} ToxNet data
- -#http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&regno=000143157
+ %a{:href => "http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&inchi=#{URI.encode @compound.inchi}", :rel => "external"} ToxNet data
+ -#http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&regno=000143157
%tr#names{ :style => "display: none;" }
%td{:colspan => '4'}
diff --git a/views/lazar_algorithm.haml b/views/lazar_algorithm.haml
index b83de6b..85823b5 100644
--- a/views/lazar_algorithm.haml
+++ b/views/lazar_algorithm.haml
@@ -20,13 +20,13 @@
a majority vote (weighted by compound similarity) for
%em classification
(
- %a{:href => "http://www.in-silico.de/articles/modi020905.pdf"} original publication
+ %a{:href => "http://www.in-silico.de/articles/modi020905.pdf", :rel => "external"} original publication
)
%li
a local QSAR model based on neighbors for
%em regression
(
- %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf"} original publication
+ %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf", :rel => "external"} original publication
)
%p
diff --git a/views/lazar_description.haml b/views/lazar_description.haml
index d8e995d..3eee850 100644
--- a/views/lazar_description.haml
+++ b/views/lazar_description.haml
@@ -18,11 +18,11 @@
a majority vote (weighted by compound similarity) for
%em= toggle_link("#classification","classification")
(
- %a{:href => "http://www.in-silico.de/articles/modi020905.pdf"} original publication
+ %a{:href => "http://www.in-silico.de/articles/modi020905.pdf", :rel => "external"} original publication
)
%li
a local QSAR model based on neighbors for
%em= toggle_link("#regression","regression")
(
- %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf"} original publication
+ %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf", :rel => "external"} original publication
)
diff --git a/views/login.haml b/views/login.haml
index 6d15bb7..1a74f12 100644
--- a/views/login.haml
+++ b/views/login.haml
@@ -7,15 +7,15 @@
and your models can be modified or deleted by other guests.
To control models permissions you can
log in with your
- %a{:href => "http://www.opentox.org"} OpenTox
- username/password below. If have no
- %a{:href => "http://www.opentox.org"} OpenTox
- account yet you can
- %a{:href => "http://www.opentox.org/join_form"} register here.
+ %a{:href => "http://www.opentox.org", :rel => "external"} OpenTox
+ username/password below. If you don't have an
+ %a{:href => "http://www.opentox.org", :rel => "external"} OpenTox
+ account yet you could
+ %a{:href => "http://www.opentox.org/join_form", :rel => "external"} register here.
- else
%p
Change
- %a{:href => "http://www.opentox.org"} OpenTox
+ %a{:href => "http://www.opentox.org", :rel => "external"} OpenTox
account:
-# if !logged_in()
diff --git a/views/model.haml b/views/model.haml
index 7b63975..cd87757 100644
--- a/views/model.haml
+++ b/views/model.haml
@@ -54,7 +54,7 @@
%dd= toggle_link("##{model.type}","#{model.type}")
%dt Descriptors:
%dd
- %a{:href => 'http://www.maunz.de/libfminer2-bbrc-doc/'} Fminer backbone refinement classes
+ %a{:href => 'http://www.maunz.de/libfminer2-bbrc-doc/', :rel => "external"} Fminer backbone refinement classes
- if model.training_dataset
%dt Training dataset:
%dd
diff --git a/views/regression_validation.haml b/views/regression_validation.haml
index 00267a9..4dd4f6d 100644
--- a/views/regression_validation.haml
+++ b/views/regression_validation.haml
@@ -1,9 +1,9 @@
%dt
- %a{:href => "http://en.wikipedia.org/wiki/R-squared"} R-squared
+ %a{:href => "http://en.wikipedia.org/wiki/R-squared", :rel => "external"} R-squared
%dd= sprintf '%.03g', model.r_square
%dt
- %a{:href => "http://en.wikipedia.org/wiki/Root_mean_square_deviation"} Root Mean Square Error
+ %a{:href => "http://en.wikipedia.org/wiki/Root_mean_square_deviation", :rel => "external"} Root Mean Square Error
%dd= sprintf '%.03g', model.root_mean_squared_error
%dt
- %a{:href => "http://en.wikipedia.org/wiki/Mean_absolute_error"} Mean Absolute Error
+ %a{:href => "http://en.wikipedia.org/wiki/Mean_absolute_error", :rel => "external"} Mean Absolute Error
%dd= sprintf '%.03g', model.mean_absolute_error
diff --git a/views/significant_fragments.haml b/views/significant_fragments.haml
index 87cb113..bd39826 100644
--- a/views/significant_fragments.haml
+++ b/views/significant_fragments.haml
@@ -6,5 +6,5 @@
)
%dd
Substructures that occur (statistically significant) more frequently in active or inactive compounds. Substuctures can take any shape (without cycles) and are determined with the
- %a{:href => "http://www.maunz.de/libfminer2-bbrc-doc/"} fminer
+ %a{:href => "http://www.maunz.de/libfminer2-bbrc-doc/", :rel => "external"} fminer
algorithm.
diff --git a/views/unit.haml b/views/unit.haml
index a352599..88433b5 100644
--- a/views/unit.haml
+++ b/views/unit.haml
@@ -6,5 +6,5 @@
)
%dd
Unit of measurement, e.g. mmol or mmol/kg-bodyweight. For optimal performance you should use
- %a{:href => "http://en.wikipedia.org/wiki/Molar_(concentration)"} molar
+ %a{:href => "http://en.wikipedia.org/wiki/Molar_(concentration)", :rel => "external"} molar
units.