From 4f593276a749572f58c28df8e120cf8a0e6f055b Mon Sep 17 00:00:00 2001
From: Shane Tomlinson <stomlinson@mozilla.com>
Date: Fri, 7 Oct 2011 14:22:12 +0100
Subject: [PATCH] Baby steps.  Do not remove the "waiting" class until
 everything is shown.

The goal is to fade in the new screen over top of the old screen, and then remove the old screen.
---
 browserid/static/dialog/controllers/page_controller.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/browserid/static/dialog/controllers/page_controller.js b/browserid/static/dialog/controllers/page_controller.js
index 9532c18fa..724f37e5c 100644
--- a/browserid/static/dialog/controllers/page_controller.js
+++ b/browserid/static/dialog/controllers/page_controller.js
@@ -72,12 +72,12 @@
     },
 
     renderTemplates: function(body, body_vars) {
-      $("body").removeClass("waiting");
 
       if (body) {
         var bodyHtml = $.View("//dialog/views/" + body, body_vars);
         var form = $("#formWrap > form");
         form.html(bodyHtml).hide().fadeIn(ANIMATION_TIME, function() {
+          $("body").removeClass("waiting");
           form.find("input").eq(0).focus(); 
         });
       }
@@ -121,7 +121,7 @@
      * two fields, message, description.
      */
     errorDialog: function(info) {
-      $("#dialog").hide();
+      $("form").hide();
 
       $("#error_dialog .title").text(info.message);
       $("#error_dialog .content").text(info.description);
-- 
GitLab