[ARVADOS] created: 7a71d74c538c37437e65f5d22205c224d0fe9207

git at public.curoverse.com git at public.curoverse.com
Sat Feb 7 21:51:48 EST 2015


        at  7a71d74c538c37437e65f5d22205c224d0fe9207 (commit)


commit 7a71d74c538c37437e65f5d22205c224d0fe9207
Author: Tom Clegg <tom at curoverse.com>
Date:   Sat Feb 7 17:21:14 2015 -0500

    4958: Avoid squishing dax's aspect ratio when window is narrow.

diff --git a/apps/workbench/app/views/users/welcome.html.erb b/apps/workbench/app/views/users/welcome.html.erb
index a810a8d..f23daa7 100644
--- a/apps/workbench/app/views/users/welcome.html.erb
+++ b/apps/workbench/app/views/users/welcome.html.erb
@@ -3,9 +3,9 @@
 <div class="row">
   <div class="col-sm-8 col-sm-push-4" style="margin-top: 1em">
     <div class="well clearfix">
-      <%= image_tag "dax.png", style: "width: 147px; height: 197px; max-width: 25%; margin-right: 2em", class: 'pull-left' %>
+      <%= image_tag "dax.png", style: "width: 112px; height: 150px; margin-right: 2em", class: 'pull-left' %>
 
-      <h3>Please log in.</h3>
+      <h3 style="margin-top:0">Please log in.</h3>
 
       <p>
 

commit ff49b1144f5b9f9f7624f3741f5af791073de03c
Author: Tom Clegg <tom at curoverse.com>
Date:   Sat Feb 7 17:19:50 2015 -0500

    4958: Detect old browsers and recommend upgrading.
    
    We use a plain .js file in /public instead of the asset pipeline, and
    don't rely on any JS libraries. This gives the error alert a much
    better chance of working in a browser that can't even parse our
    compiled/minified application.js.

diff --git a/apps/workbench/app/views/application/_browser_unsupported.html b/apps/workbench/app/views/application/_browser_unsupported.html
new file mode 100644
index 0000000..7f180f4
--- /dev/null
+++ b/apps/workbench/app/views/application/_browser_unsupported.html
@@ -0,0 +1,16 @@
+<!-- googleoff: all -->
+<div id="browser-unsupported" class="hidden">
+  <div class="alert alert-danger">
+    <p>
+      <b>Hey!</b> Your web browser is missing some of the features we
+      rely on.  Usually this means you're running an old version.
+      Updating your system, or switching to a current version
+      of <a class="alert-link"
+      href="//google.com/search?q=download+Mozilla+Firefox">Firefox</a>
+      or <a class="alert-link"
+      href="//google.com/search?q=download+Google+Chrome">Chrome</a>,
+      should fix this.
+    </p>
+  </div>
+</div>
+<!-- googleon: all -->
diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index fb28efe..67eba94 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -185,6 +185,8 @@
       </nav>
     <% end %>
 
+    <%= render partial: 'browser_unsupported' %><%# requires JS support below %>
+
     <div id="page-wrapper">
       <%= yield %>
     </div>
@@ -194,3 +196,4 @@
 
 <div class="modal-container"></div>
 <div id="report-issue-modal-window"></div>
+<script src="/browser_unsupported.js"></script>
diff --git a/apps/workbench/public/browser_unsupported.js b/apps/workbench/public/browser_unsupported.js
new file mode 100644
index 0000000..77d641c
--- /dev/null
+++ b/apps/workbench/public/browser_unsupported.js
@@ -0,0 +1,13 @@
+(function() {
+    var ok = false;
+    try {
+        if (window.Blob &&
+            window.File &&
+            window.FileReader) {
+            ok = true;
+        }
+    } catch(err) {}
+    if (!ok) {
+        document.getElementById('browser-unsupported').className='';
+    }
+})();

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list