Commits

Sean Wilkinson committed f1f2f4f

Created a toggle-able "Login" button

Comments (0)

Files changed (3)

src/browser-client/index.html

           </ul>
           <ul class="nav pull-right">
             <li class="pull-right">
-              <a href="#">Login</a>
+              <a href="#" id="login-button">Login</a>
             </li>
           </ul>
         </div>

src/browser-client/main.js

 //      https://bugzilla.mozilla.org/show_bug.cgi?id=756028
 //
 //                                                      ~~ (c) SRW, 23 May 2012
-//                                                  ~~ last updated 19 Apr 2013
+//                                                  ~~ last updated 18 Jun 2013
 
 (function () {
     'use strict';
 
     /*properties Q, QM, activeElement, alert, ajax, avar, blur, box, cache,
         call, clearTimeout, console, dataType, document, error, exit, focus,
-        getItem, hasOwnProperty, id, is, join, jQuery, key, localStorage, log,
-        on, preventDefault, prototype, ready, revive, setItem, setTimeout,
+        getItem, hasOwnProperty, html, id, is, join, jQuery, key, localStorage,
+        log, on, preventDefault, prototype, ready, revive, setItem, setTimeout,
         success, stay, url, val, value, vol_timer, volunteer, which
     */
 
                     }
                 }
                 $(window).on('blur focus', QM.revive);
+                $('#login-button').on('click', function (evt) {
+                 // This function will trigger the consent process.
+                    evt.preventDefault();
+                    if ($(this).html() === 'Login') {
+                        $(this).html('Logout');
+                    } else {
+                        $(this).html('Login');
+                    }
+                    return;
+                });
                 $('#QM-box-input').on('blur', function () {
                  // This function doesn't work well in web workers due to the
                  // `alert`, but they aren't a priority right now. The idea

src/browser-client/qmachine.js

 
 //- qmachine.js ~~
 //                                                      ~~ (c) SRW, 15 Nov 2012
-//                                                  ~~ last updated 04 May 2013
+//                                                  ~~ last updated 18 Jun 2013
 
 (function (global, sandbox) {
     'use strict';