[ARVADOS] updated: b5971601148a7ede860c029ae3931e88d6466abe

git at public.curoverse.com git at public.curoverse.com
Wed Apr 2 08:01:44 EDT 2014


Summary of changes:
 .../assets/stylesheets/bootstrap-modal.css.scss    |  228 ++++++++++++++++++++
 apps/workbench/app/controllers/users_controller.rb |    4 +-
 .../app/views/users/_setup_popup.html.erb          |   40 +++--
 3 files changed, 256 insertions(+), 16 deletions(-)
 create mode 100644 apps/workbench/app/assets/stylesheets/bootstrap-modal.css.scss

       via  b5971601148a7ede860c029ae3931e88d6466abe (commit)
       via  365e7728ad294b7926cd2388fa56241bfa8edb92 (commit)
      from  c7bc953ccbd42113c18d4a8bc5e8403ba364b81d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b5971601148a7ede860c029ae3931e88d6466abe
Author: radhika chippada <radhika at radhika.curoverse>
Date:   Wed Apr 2 00:04:16 2014 -0400

    Disable submit button until all input fields are filled in.

diff --git a/apps/workbench/app/controllers/users_controller.rb b/apps/workbench/app/controllers/users_controller.rb
index 0fc083e..dbd084d 100644
--- a/apps/workbench/app/controllers/users_controller.rb
+++ b/apps/workbench/app/controllers/users_controller.rb
@@ -201,8 +201,8 @@ class UsersController < ApplicationController
                                    name: 'can_login')
 
     if oid_login_perms.any?
-      identiry_url_prefix = oid_login_perms.first.identity_url_prefix
-      current_selections[:identiry_url_prefix] = identiry_url_prefix
+      prefix_properties = oid_login_perms.first.properties
+      current_selections[:identity_url_prefix] = prefix_properties[:identity_url_prefix]
     end
 
     # repo perm
diff --git a/apps/workbench/app/views/users/_setup_popup.html.erb b/apps/workbench/app/views/users/_setup_popup.html.erb
index f27b474..8d44e90 100644
--- a/apps/workbench/app/views/users/_setup_popup.html.erb
+++ b/apps/workbench/app/views/users/_setup_popup.html.erb
@@ -1,15 +1,11 @@
-  <div class="modal-header">
-    <h3 id="myModalLabel">Information you had already provided is prefilled for you. You may change it as needed.</h3>
-  </div>
-
   <div class="modal-body">
     <% uuid = @object.uuid %>
-    <% disable_email = @object.uuid? %>
-    <% identity_url_prefix = @current_selections[:identiry_url_prefix] %>
+    <% disable_email =  @object.uuid? %>
+    <% identity_url_prefix = @current_selections[:identity_url_prefix] %>
     <% selected_repo = @current_selections[:repo_name] %>
     <% selected_vm = @current_selections[:vm_uuid] %>
-
-    <%= form_tag setup_user_url(id: uuid), method: 'get', remote: true, class: 'form-search' do %>    
+    
+    <%= form_tag setup_user_url(id: uuid), {id: 'setup_form', name: 'setup_form', method: 'get', class: 'form-search', remote: true, onSubmit: "validate(); return false;"} do %>    
       <div>
         <table><tbody>
           <tr>
@@ -27,7 +23,7 @@
               <td> <input id="openid_prefix" maxlength="250" name="openid_prefix" type="text" value="<%=identity_url_prefix%>" disabled=<%=disable_email%> > </td>
             <% else %>
               <td> Openid Prefix </td>
-              <td> <input id="openid_prefix" maxlength="250" name="openid_prefix" type="text"> </td>
+              <td> <input id="openid_prefix" maxlength="250" name="openid_prefix" type="text" value="https://www.google.com/accounts/o8/id"> </td>
             <% end %>
           </tr>
           <tr>
@@ -51,8 +47,24 @@
         </tbody></table>
       </div>
       <div align="left">
-        <button type="submit" class="btn btn-primary" autofocus>Submit</button>
+        <button type="submit" id="register" class="btn btn-primary" autofocus>Submit</button>
         <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Cancel</button>
       </div>
     <% end %>
   </div>
+
+<script>
+  var $input = $('input:text'),
+  $register = $('#register');    
+  $register.attr('disabled', true);
+
+  $input.keyup(function() {
+    var trigger = false;
+    $input.each(function() {
+        if (!$(this).val()) {
+            trigger = true;
+        }
+    });
+    trigger ? $register.attr('disabled', true) : $register.removeAttr('disabled');
+  });
+</script>

commit 365e7728ad294b7926cd2388fa56241bfa8edb92
Author: radhika chippada <radhika at radhika.curoverse>
Date:   Tue Apr 1 17:21:12 2014 -0400

    Added bootstrap css

diff --git a/apps/workbench/app/assets/stylesheets/bootstrap-modal.css.scss b/apps/workbench/app/assets/stylesheets/bootstrap-modal.css.scss
new file mode 100644
index 0000000..417ca74
--- /dev/null
+++ b/apps/workbench/app/assets/stylesheets/bootstrap-modal.css.scss
@@ -0,0 +1,228 @@
+/*!
+* Bootstrap Modal
+*
+* Copyright Jordan Schroter
+* Licensed under the Apache License v2.0
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+*/
+
+body.modal-open,
+.modal-open .navbar-fixed-top,
+.modal-open .navbar-fixed-bottom {
+  margin-right: 0;
+}
+
+.modal {
+  left: 50%;
+  bottom: auto;
+  right: auto;
+  padding: 0;
+  width: 500px;
+  margin-left: -250px;
+  background-color: #ffffff;
+  border: 1px solid #999999;
+  border: 1px solid rgba(0, 0, 0, 0.2);
+  border-radius: 6px;
+  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
+  background-clip: padding-box;
+}
+
+.modal.container {
+  max-width: none;
+}
+
+
+.modal-open {
+overflow: hidden;
+}
+
+
+/* add a scroll bar to stop page from jerking around */
+.modal-open.page-overflow .page-container,
+.modal-open.page-overflow .page-container .navbar-fixed-top,
+.modal-open.page-overflow .page-container .navbar-fixed-bottom,
+.modal-open.page-overflow .modal-scrollable {
+overflow-y: scroll;
+}
+
+ at media (max-width: 979px) {
+.modal-open.page-overflow .page-container .navbar-fixed-top,
+.modal-open.page-overflow .page-container .navbar-fixed-bottom {
+overflow-y: visible;
+}
+}
+
+
+.modal-scrollable {
+position: fixed;
+top: 0;
+bottom: 0;
+left: 0;
+right: 0;
+overflow: auto;
+}
+
+.modal.fade {
+top: -100%;
+-webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; 
+-moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
+-o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
+transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out;
+}
+
+.modal.fade.in {
+top: 50%;
+}
+
+.modal-body {
+max-height: none;
+overflow: visible;
+}
+
+.modal.modal-absolute {
+position: absolute;
+z-index: 950;
+}
+
+.modal .loading-mask {
+position: absolute;
+top: 0;
+bottom: 0;
+left: 0;
+right: 0;
+background: #fff;
+border-radius: 6px;
+}
+
+.modal-backdrop.modal-absolute{
+position: absolute;
+z-index: 940;
+}
+
+.modal-backdrop,
+.modal-backdrop.fade.in{
+opacity: 0.7;
+filter: alpha(opacity=70);
+background: #fff;
+}
+
+/* Modal Overflow */
+
+.modal-overflow.modal {
+top: 1%;
+}
+
+.modal-overflow.modal.fade {
+top: -100%;
+}
+
+.modal-overflow.modal.fade.in {
+top: 1%;
+}
+
+.modal-overflow .modal-body {
+overflow: auto;
+-webkit-overflow-scrolling: touch;
+}
+
+/* Responsive */
+
+ at media (min-width: 1200px) {
+.modal.container {
+width: 1170px;
+margin-left: -585px;
+}
+}
+
+ at media (max-width: 979px) {
+.modal,
+.modal.container,
+.modal.modal-overflow {
+top: 1%;
+right: 1%;
+left: 1%;
+bottom: auto;
+width: auto !important;
+height: auto !important;
+margin: 0 !important;
+padding: 0 !important;
+}
+
+.modal.fade.in,
+.modal.container.fade.in,
+.modal.modal-overflow.fade.in {
+top: 1%;
+bottom: auto;
+}
+
+.modal-body,
+.modal-overflow .modal-body {
+position: static;
+margin: 0;
+height: auto !important;
+max-height: none !important;
+overflow: visible !important;
+}
+
+.modal-footer,
+.modal-overflow .modal-footer {
+position: static;
+}
+}
+
+.loading-spinner {
+position: absolute;
+top: 50%;
+left: 50%;
+margin: -12px 0 0 -12px;
+}
+
+/*
+Animate.css - http://daneden.me/animate
+Licensed under the ☺ license (http://licence.visualidiot.com/)
+
+Copyright (c) 2012 Dan Eden*/
+
+.animated {
+-webkit-animation-duration: 1s;
+-moz-animation-duration: 1s;
+-o-animation-duration: 1s;
+animation-duration: 1s;
+-webkit-animation-fill-mode: both;
+-moz-animation-fill-mode: both;
+-o-animation-fill-mode: both;
+animation-fill-mode: both;
+}
+
+ at -webkit-keyframes shake {
+0%, 100% {-webkit-transform: translateX(0);}
+10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);}
+20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);}
+}
+
+ at -moz-keyframes shake {
+0%, 100% {-moz-transform: translateX(0);}
+10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);}
+20%, 40%, 60%, 80% {-moz-transform: translateX(10px);}
+}
+
+ at -o-keyframes shake {
+0%, 100% {-o-transform: translateX(0);}
+10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);}
+20%, 40%, 60%, 80% {-o-transform: translateX(10px);}
+}
+
+ at keyframes shake {
+0%, 100% {transform: translateX(0);}
+10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);}
+20%, 40%, 60%, 80% {transform: translateX(10px);}
+}
+
+.shake {
+-webkit-animation-name: shake;
+-moz-animation-name: shake;
+-o-animation-name: shake;
+animation-name: shake;
+}
diff --git a/apps/workbench/app/views/users/_setup_popup.html.erb b/apps/workbench/app/views/users/_setup_popup.html.erb
index 0fc0110..f27b474 100644
--- a/apps/workbench/app/views/users/_setup_popup.html.erb
+++ b/apps/workbench/app/views/users/_setup_popup.html.erb
@@ -3,11 +3,11 @@
   </div>
 
   <div class="modal-body">
-    <%= uuid = @object.uuid %>
-    <%= disable_email = @object.uuid? %>
-    <%= identity_url_prefix = @current_selections[:identiry_url_prefix] %>
-    <%= selected_repo = @current_selections[:repo_name] %>
-    <%= selected_vm = @current_selections[:vm_uuid] %>
+    <% uuid = @object.uuid %>
+    <% disable_email = @object.uuid? %>
+    <% identity_url_prefix = @current_selections[:identiry_url_prefix] %>
+    <% selected_repo = @current_selections[:repo_name] %>
+    <% selected_vm = @current_selections[:vm_uuid] %>
 
     <%= form_tag setup_user_url(id: uuid), method: 'get', remote: true, class: 'form-search' do %>    
       <div>
@@ -51,8 +51,8 @@
         </tbody></table>
       </div>
       <div align="left">
-        <button type="submit" class="btn">Submit</button>
-        <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
+        <button type="submit" class="btn btn-primary" autofocus>Submit</button>
+        <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Cancel</button>
       </div>
     <% end %>
   </div>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list