Skip to content

Commit

Permalink
issue an error message if the browser doesn't have JavaScript
Browse files Browse the repository at this point in the history
SS requires JavaScript to be present.  If the user wants to use web-blast on a
non-JS browser, I am sure there are other alternatives out there.  If someone
wants to send a pull request to make SS work again on a non-JS browser, I am
keen to discuss the options.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
  • Loading branch information
yeban committed May 19, 2012
1 parent eb46587 commit 5cd0a6f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions public/css/custom.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ pre {
font-family: Monospace; font-family: Monospace;
} }


.nojs-error {
margin-top: 10px;
padding: 10px;
color: white;
background-color: red;
}

.offset-left { .offset-left {
margin-left: 20px; margin-left: 20px;
} }
Expand Down
2 changes: 2 additions & 0 deletions public/js/sequenceserver.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ if (!SS) {
}()); //end SS module }()); //end SS module


$(document).ready(function(){ $(document).ready(function(){
$('.nojs-error').remove();

// poll the sequence textbox for a change in user input // poll the sequence textbox for a change in user input
$('#sequence').poll(); $('#sequence').poll();


Expand Down
8 changes: 8 additions & 0 deletions views/search.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@


<body> <body>
<div class="container"> <div class="container">
<div class="nojs-error">
<h3>SequenceServer can't work without JavaScript.</h3>
<ul>
<li>Please see if you can enable JavaScript in your browser's preferences.</li>
<li>If your browser doesn't support JavaScript, please consider upgrading to the latest version or using Firefox or Chrome.</li>
</ul>
</div>

<div class="page"> <div class="page">
<div class="page-header" id="banner"> <div class="page-header" id="banner">
<h1>BLAST Sequence(s)</h1> <h1>BLAST Sequence(s)</h1>
Expand Down

0 comments on commit 5cd0a6f

Please sign in to comment.