diff --git a/resources/static/css/style.css b/resources/static/css/style.css index c24b8beeaa7f2c478a122a9c75afbaa64211a8fd..50d50a8d51f8bdb960fac40bd644356f7463671f 100644 --- a/resources/static/css/style.css +++ b/resources/static/css/style.css @@ -32,7 +32,7 @@ noscript { transition: opacity 750ms; } -.waiting #errorBackground, .error #errorBackground { +.waiting #errorBackground, .error #errorBackground, .delay #errorBackground { z-index: 1001; display: block; -ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000); @@ -40,7 +40,7 @@ noscript { opacity: .6; } -#error, #wait { +#error, #wait, #delay { z-index: -2; opacity: 0; -webkit-transition: opacity 750ms; @@ -64,12 +64,18 @@ noscript { opacity: 1; } -.error #error { +.delay #delay { z-index: 1003; opacity: 1; } -#error > div, #wait > div { +.error #error { + z-index: 1004; + opacity: 1; +} + + +#error > div, #wait > div, #delay > div { padding: 10px; z-index: 1001; } diff --git a/resources/static/dialog/css/popup.css b/resources/static/dialog/css/popup.css index 46d4dd0d6282f5fab94d51e2626d2c5e27071289..363b3276db8756c799e7cf0f13dc3a60d480fbef 100644 --- a/resources/static/dialog/css/popup.css +++ b/resources/static/dialog/css/popup.css @@ -52,7 +52,7 @@ section > .contents { height: 250px; } -#wait { +#wait, #error, #delay { text-align: center; background-image: url("/i/bg.png"); z-index: -1; @@ -79,38 +79,21 @@ section > .contents { transition-delay: 0.5s; } +#error { + background-color: #fff; +} + .waiting #wait { z-index: 1; opacity: 1; } -#error { - text-align: center; - z-index: -1; - background-color: #fff; - display: none; - - -webkit-transition-property: opacity; - -moz-transition-property: opacity; - -ms-transition-property: opacity; - -o-transition-property: opacity; - transition-property: opacity; - - -webkit-transition-duration: 0.25s; - -moz-transition-duration: 0.25s; - -ms-transition-duration: 0.25s; - -o-transition-duration: 0.25s; - transition-duration: 0.25s; - - -webkit-transition-delay: 0.75s; - -moz-transition-delay: 0.75s; - -ms-transition-delay: 0.75s; - -o-transition-delay: 0.75s; - transition-delay: 0.75s; +.error #error { + z-index: 3; + opacity: 1; } -.error #error { - display: block; +.delay #delay { z-index: 2; opacity: 1; } @@ -119,7 +102,7 @@ section > .contents { list-style-type: none; } -#wait strong, #error strong { +#wait strong, #error strong, #delay strong { color: #222; font-weight: bold; } diff --git a/resources/static/dialog/start.js b/resources/static/dialog/start.js index 77834cc71dc76d45883ba291c754c59d3e4e7d04..459cee2b0137f66674b70c1c00bb57b271ccb1c4 100644 --- a/resources/static/dialog/start.js +++ b/resources/static/dialog/start.js @@ -15,7 +15,7 @@ moduleManager.register("code_check", modules.CodeCheck); moduleManager.start("code_check", { - environment: "__BROWSERID_ENVIRONMENT__", + file_name_prefix: "dialog", code_ver: "__BROWSERID_CODE_VERSION__", ready: function(status) { // if status is false, that means the javascript is out of date and we diff --git a/resources/static/pages/start.js b/resources/static/pages/start.js index d64a447b60a46c19eccacc0ee43ba8a4ba624369..d06630849a589bf9b38e19346b8ed39cb3e181b9 100644 --- a/resources/static/pages/start.js +++ b/resources/static/pages/start.js @@ -14,67 +14,84 @@ $(function() { pageHelpers = bid.PageHelpers, network = bid.Network, user = bid.User, + dom = bid.DOM, token = pageHelpers.getParameterByName("token"), path = document.location.pathname, - XHRDelay = bid.Modules.XHRDelay, - XHRDisableForm = bid.Modules.XHRDisableForm; + moduleManager = bid.module, + modules = bid.Modules, + CodeCheck = modules.CodeCheck, + XHRDelay = modules.XHRDelay, + XHRDisableForm = modules.XHRDisableForm; network.init({ time_until_delay: 10 * 1000 }); - var xhrDelay = XHRDelay.create({}); - xhrDelay.start(); - var xhrDisableForm = XHRDisableForm.create({}); - xhrDisableForm.start(); - if (!path || path === "/") { - bid.index(); - } - else if (path === "/signin") { - var module = bid.signIn.create(); - module.start({}); - } - else if (path === "/signup") { - bid.signUp(); - } - else if (path === "/forgot") { - bid.forgot(); - } - else if (path === "/add_email_address") { - var module = bid.addEmailAddress.create(); - module.start({ - token: token - }); - } - else if(token && path === "/verify_email_address") { - bid.verifyEmailAddress(token); - } + moduleManager.register("code_check", CodeCheck); + $(".display_always,.display_auth,.display_nonauth").hide(); if ($('#vAlign').length) { $(window).bind('resize', function() { $('#vAlign').css({'height' : $(window).height() }); }).trigger('resize'); } - $("a.signOut").click(function(event) { - event.preventDefault(); - event.stopPropagation(); - user.logoutUser(function() { - document.location = "/"; - }, pageHelpers.getFailure(bid.Errors.logout)); - }); + moduleManager.start("code_check", { + file_name_prefix: "browserid", + code_ver: "__BROWSERID_CODE_VERSION", + ready: function(status) { + if(!status) return; - $(".display_always,.display_auth,.display_nonauth").hide(); + dom.addClass("body", "ready"); - var ANIMATION_TIME = 500; - user.checkAuthentication(function(authenticated) { - $(".display_always").fadeIn(ANIMATION_TIME); - - if (authenticated) { - $(".display_auth").fadeIn(ANIMATION_TIME); - if ($('#emailList').length) { - bid.manageAccount(); + moduleManager.register("xhr_delay", XHRDelay); + moduleManager.register("xhr_disable_form", XHRDisableForm); + if (!path || path === "/") { + bid.index(); } - } - else { - $(".display_nonauth").fadeIn(ANIMATION_TIME); + else if (path === "/signin") { + var module = bid.signIn.create(); + module.start({}); + } + else if (path === "/signup") { + bid.signUp(); + } + else if (path === "/forgot") { + bid.forgot(); + } + else if (path === "/add_email_address") { + var module = bid.addEmailAddress.create(); + module.start({ + token: token + }); + } + else if(token && path === "/verify_email_address") { + bid.verifyEmailAddress(token); + } + + $("a.signOut").click(function(event) { + event.preventDefault(); + event.stopPropagation(); + + user.logoutUser(function() { + document.location = "/"; + }, pageHelpers.getFailure(bid.Errors.logout)); + }); + + var ANIMATION_TIME = 500; + user.checkAuthentication(function(authenticated) { + $(".display_always").fadeIn(ANIMATION_TIME); + + dom.addClass("body", authenticated ? "authenticated" : "not_authenticated"); + if (authenticated) { + $(".display_auth").fadeIn(ANIMATION_TIME); + if ($('#emailList').length) { + bid.manageAccount(); + } + } + else { + $(".display_nonauth").fadeIn(ANIMATION_TIME); + } + }); + + } }); diff --git a/resources/static/dialog/controllers/code_check.js b/resources/static/shared/modules/code_check.js similarity index 73% rename from resources/static/dialog/controllers/code_check.js rename to resources/static/shared/modules/code_check.js index 4543cda71796f0623ef98d549393127a48d9a377..80856c524e9cec2f77bcdaac9b0f9b047c173b92 100644 --- a/resources/static/dialog/controllers/code_check.js +++ b/resources/static/shared/modules/code_check.js @@ -11,7 +11,8 @@ BrowserID.Modules.CodeCheck = (function() { var bid = BrowserID, dom = bid.DOM, sc, - expectedCodeVer; + expectedCodeVer, + fileNamePrefix; function getMostRecentCodeVersion(oncomplete) { bid.Network.codeVersion(oncomplete, this.getErrorDialog(bid.Errors.checkScriptVersion, oncomplete)); @@ -35,7 +36,7 @@ BrowserID.Modules.CodeCheck = (function() { function loadScript(version, oncomplete) { var script = document.createElement("script"); script.type = "text/javascript"; - script.src = "https://browserid.org/production/dialog_v" + version + ".js"; + script.src = "https://browserid.org/production/" + fileNamePrefix + "_v" + version + ".js"; document.head.appendChild(script); oncomplete(); @@ -51,22 +52,19 @@ BrowserID.Modules.CodeCheck = (function() { data = data || {}; - self.checkRequired(data, "code_ver", "environment"); + self.checkRequired(data, "code_ver", "file_name_prefix"); expectedCodeVer = data.code_ver; + fileNamePrefix = data.file_name_prefix; + + getMostRecentCodeVersion.call(self, function(version) { + if(version) { + updateCodeIfNeeded.call(self, complete, version); + } + else { + complete(true); + } + }); - if(data.environment === "PRODUCTION") { - getMostRecentCodeVersion.call(self, function(version) { - if(version) { - updateCodeIfNeeded.call(self, complete, version); - } - else { - complete(); - } - }); - } - else { - complete(true); - } sc.start.call(self, data); } }); diff --git a/resources/static/shared/modules/page_module.js b/resources/static/shared/modules/page_module.js index ecefd075190ea4e251e8e438a5e4bb1e2cd1e56a..6ad214a3f01de6975d9363b9d97792bd7ed3c4de 100644 --- a/resources/static/shared/modules/page_module.js +++ b/resources/static/shared/modules/page_module.js @@ -22,6 +22,15 @@ BrowserID.Modules.PageModule = (function() { return false; } + function showScreen(screen, template, vars, oncomplete) { + screen.show(template, vars); + oncomplete && oncomplete(); + } + + function hideScreen(screen) { + screen.hide(); + } + var Module = BrowserID.Class({ init: function(options) { options = options || {}; @@ -98,37 +107,31 @@ BrowserID.Modules.PageModule = (function() { } }, - renderDialog: function(body, body_vars) { + renderDialog: function(template, data) { var self=this; self.hideWait(); self.hideError(); + self.hideDelay(); - screens.form.show(body, body_vars); + screens.form.show(template, data); dom.focus("input:visible:not(:disabled):eq(0)"); }, - renderWait: function(body, body_vars) { - screens.wait.show(body, body_vars); - }, + renderWait: showScreen.curry(screens.wait), + hideWait: hideScreen.curry(screens.wait), - hideWait: function() { - screens.wait.hide(); - }, - - renderError: function(body, body_vars, oncomplete) { - screens.error.show(body, body_vars); + renderError: function(template, data, oncomplete) { + screens.error.show(template, data); bid.ErrorDisplay.start(); - $("#error").stop().css('opacity', 1).hide().fadeIn(ANIMATION_TIME, function() { - if(oncomplete) oncomplete(false); - }); + oncomplete && oncomplete(false); }, - hideError: function() { - screens.error.hide(); - }, + hideError: hideScreen.curry(screens.error), + renderDelay: showScreen.curry(screens.delay), + hideDelay: hideScreen.curry(screens.delay), /** * Validate the form, if returns false when called, submit will not be diff --git a/resources/static/shared/modules/xhr_delay.js b/resources/static/shared/modules/xhr_delay.js index 2e1eb6c10f7291ad5ea9da752a08307873965265..d3d3abd3e5c51f1e7bfed4b9e3fad9f1ac4d69a7 100644 --- a/resources/static/shared/modules/xhr_delay.js +++ b/resources/static/shared/modules/xhr_delay.js @@ -7,20 +7,33 @@ BrowserID.Modules.XHRDelay = (function() { var bid = BrowserID, wait = bid.Wait, + delayed, sc; + function delayStart() { + delayed = true; + this.renderDelay("wait", wait.slowXHR); + } + + function delayStop() { + if(delayed) { + delayed = false; + this.hideDelay(); + } + } + var Module = bid.Modules.PageModule.extend({ start: function(options) { var self=this; - self.subscribe("xhr_delay", this.renderWait.curry("wait", wait.slowXHR)); - self.subscribe("xhr_complete", this.hideWait); + self.subscribe("xhr_delay", delayStart); + self.subscribe("xhr_complete", delayStop); sc.start.call(self, options); }, stop: function() { - this.hideWait(); + this.hideDelay(); sc.stop.call(this); } }); diff --git a/resources/static/shared/network.js b/resources/static/shared/network.js index 47f1d9ad3807c4680713c047987f87cfa9da0aed..cf5710ce40fb0b63a72517562b98e8c887e40c8f 100644 --- a/resources/static/shared/network.js +++ b/resources/static/shared/network.js @@ -112,8 +112,7 @@ BrowserID.Network = (function() { }; domain_key_creation_time = result.domain_key_creation_time; auth_status = result.auth_level; - // XXX remove the ABC123 - code_version = result.code_version || "ABC123"; + code_version = result.code_version; // seed the PRNG // FIXME: properly abstract this out, probably by exposing a jwcrypto @@ -676,7 +675,6 @@ BrowserID.Network = (function() { codeVersion: function(onComplete, onFailure) { withContext(function() { try { - if (!code_version) throw "can't get code version!"; if (onComplete) onComplete(code_version); } catch(e) { if (onFailure) onFailure(e.toString()); diff --git a/resources/static/shared/screens.js b/resources/static/shared/screens.js index 1493fbd47f367f9cfb1fccfe831896f6cf99ddd9..0ce5cd13392214a46ad7c22c839945c284b854cd 100644 --- a/resources/static/shared/screens.js +++ b/resources/static/shared/screens.js @@ -29,6 +29,7 @@ BrowserID.Screens = (function() { return { form: new Screen("#formWrap", "form"), wait: new Screen("#wait", "waiting"), - error: new Screen("#error", "error") + error: new Screen("#error", "error"), + delay: new Screen("#delay", "delay") }; }()); diff --git a/resources/static/test/qunit/controllers/code_check_unit_test.js b/resources/static/test/qunit/shared/modules/code_check_unit_test.js similarity index 82% rename from resources/static/test/qunit/controllers/code_check_unit_test.js rename to resources/static/test/qunit/shared/modules/code_check_unit_test.js index 875ce63e9704951af6605a88575c5fbdbe5ce855..c0701039d7d8e57d1a02ef16241c9fd24807a1c8 100644 --- a/resources/static/test/qunit/controllers/code_check_unit_test.js +++ b/resources/static/test/qunit/shared/modules/code_check_unit_test.js @@ -7,22 +7,21 @@ "use strict"; var bid = BrowserID, - network = bid.Network, - xhr = bid.Mocks.xhr, + transport = bid.Mocks.xhr, helpers = bid.TestHelpers, controller; function createController(config) { var config = $.extend({ - code_ver: "ABC123", - environment: "PRODUCTION" + file_name_prefix: "dialog", + code_ver: "ABC123" }, config); controller = BrowserID.Modules.CodeCheck.create(); controller.start(config); } - module("controllers/code_check", { + module("shared/modules/code_check", { setup: function() { helpers.setup(); }, @@ -34,18 +33,29 @@ } }); - asyncTest("create controller with 'environment: DEBUG' - no code check performed", function() { + asyncTest("create controller with most recent scripts", function() { + createController({ + ready: function(mostRecent) { + equal(mostRecent, true, "scripts are the most recent"); + start(); + } + }); + }); + + asyncTest("create controller with no 'current' code_version given - do not update scripts", function() { + + transport.setContextInfo("code_version", undefined); + var scriptCount = $("head > script").length; createController({ - environment: "DEBUG", + code_ver: "ABC123", ready: function(mostRecent) { - equal(mostRecent, true, "working on the most recent version"); - + equal(mostRecent, true, "scripts are the most recent"); var scripts = $("head > script"); var scriptAdded = scripts.length !== scriptCount; - equal(scriptAdded, false, "a script was not added"); + equal(scriptAdded, false, "a script was not added to the dom"); if(scriptAdded) { // Only remove the last script if the script was actually added. @@ -56,18 +66,9 @@ } }); }); - - asyncTest("create controller with most recent scripts", function() { - createController({ - ready: function(mostRecent) { - equal(mostRecent, true, "scripts are the most recent"); - start(); - } - }); - }); - asyncTest("create controller with out of date scripts", function() { var scriptCount = $("head > script").length; + transport.setContextInfo("code_version", "ABC123"); createController({ code_ver: "ABC122", @@ -89,7 +90,7 @@ }); asyncTest("create controller with XHR error during script check", function() { - xhr.useResult("contextAjaxError"); + transport.useResult("contextAjaxError"); var scriptCount = $("head > script").length; createController({ diff --git a/resources/static/test/qunit/shared/modules/page_module_unit_test.js b/resources/static/test/qunit/shared/modules/page_module_unit_test.js index 5b52f0346e54337e52cb5409ec081dab3f13bcc2..4a00c35fb557db39a7502aa8b279b410d7067d4b 100644 --- a/resources/static/test/qunit/shared/modules/page_module_unit_test.js +++ b/resources/static/test/qunit/shared/modules/page_module_unit_test.js @@ -17,7 +17,7 @@ controller.start(); } - module("shared/page_module", { + module("shared/modules/page_module", { setup: function() { el = $("#controller_head"); bid.TestHelpers.setup(); @@ -87,57 +87,31 @@ ok(html.length, "with error template specified, error text is loaded"); }); - asyncTest("renderError renders an error message", function() { - createController({ - waitTemplate: waitTemplate, - waitVars: { - title: "Test title", - message: "Test message" - } - }); + test("renderError renders an error message", function() { + createController(); controller.renderError("wait", { title: "error title", message: "error message" - }, function() { - var html = el.find("#error .contents").html(); - // XXX underpowered test, we don't actually check the contents. - ok(html.length, "with error template specified, error text is loaded"); - start(); }); + var html = el.find("#error .contents").html(); + ok(html.length, "with error template specified, error text is loaded"); }); - asyncTest("renderError allows us to open expanded error info", function() { + test("renderDelay renders a delay", function() { createController(); - controller.renderError("error", { - action: { - title: "expanded action info", - message: "expanded message" - } - }, function() { - var html = el.find("#error .contents").html(); - - $("#moreInfo").hide(); - - $("#openMoreInfo").click(); - - setTimeout(function() { - equal($("#showMoreInfo").is(":visible"), false, "button is not visible after clicking expanded info"); - equal($("#moreInfo").is(":visible"), true, "expanded error info is visible after clicking expanded info"); - start(); - }, 1); + controller.renderDelay("wait", { + title: "delay title", + message: "delay message" }); + + var html = el.find("#delay .contents").html(); + ok(html.length, "with delay template specified, delay text is loaded"); }); asyncTest("getErrorDialog gets a function that can be used to render an error message", function() { - createController({ - waitTemplate: waitTemplate, - waitVars: { - title: "Test title", - message: "Test message" - } - }); + createController(); // This is the medium level info. var func = controller.getErrorDialog({ diff --git a/resources/static/test/qunit/shared/modules/xhr_delay_unit_test.js b/resources/static/test/qunit/shared/modules/xhr_delay_unit_test.js index e6588d1b53f517fdede6a3ffa75ed5c995486ae5..68b2d8f7c0b1a39f92e838b5a5423bca849558a4 100644 --- a/resources/static/test/qunit/shared/modules/xhr_delay_unit_test.js +++ b/resources/static/test/qunit/shared/modules/xhr_delay_unit_test.js @@ -10,6 +10,7 @@ Module = bid.Modules.XHRDelay, testHelpers = bid.TestHelpers, mediator = bid.Mediator, + screens = bid.Screens, mod; function createModule(options) { @@ -29,12 +30,20 @@ } }); - test("xhr_delay shows the wait screen, xhr_complete hides the wait screen", function() { + test("xhr_delay shows the delay screen, xhr_complete hides the delay screen", function() { mediator.publish("xhr_delay"); - ok($("#slowXHR:visible").length, "slowXHR error screen is shown"); - equal($("body").hasClass("waiting"), true, "waiting screen shown"); + ok($("#slowXHR:visible").length, "slowXHR screen is shown"); + testHelpers.testDelayVisible(); mediator.publish("xhr_complete"); - equal($("body").hasClass("waiting"), false, "waiting screen not shown"); + equal(testHelpers.delayVisible(), false, "slowXHR screen no longer visible"); + }); + + test("xhr_complete does not hide delay screen if delay screen not started by xhr_delay", function() { + + screens.delay.show("wait", {title: "test delay", message: "testing"}); + + mediator.publish("xhr_complete"); + testHelpers.testDelayVisible(); }); }()); diff --git a/resources/static/test/qunit/testHelpers/helpers.js b/resources/static/test/qunit/testHelpers/helpers.js index f7703e275999f70d6b2f5c4b5e00a5f064b2d230..688acb50a92d6f1ff53f02224d5fa560d49c6cb9 100644 --- a/resources/static/test/qunit/testHelpers/helpers.js +++ b/resources/static/test/qunit/testHelpers/helpers.js @@ -112,6 +112,22 @@ BrowserID.TestHelpers = (function() { equal(TestHelpers.errorVisible(), true, "error screen is visible"); }, + waitVisible: function() { + return screens.wait.visible; + }, + + testWaitVisible: function() { + equal(TestHelpers.waitVisible(), true, "wait screen is visible"); + }, + + delayVisible: function() { + return screens.delay.visible; + }, + + testDelayVisible: function() { + equal(TestHelpers.delayVisible(), true, "delay screen is visible"); + }, + checkNetworkError: checkNetworkError, unexpectedSuccess: function() { ok(false, "unexpected success"); diff --git a/resources/views/dialog.ejs b/resources/views/dialog.ejs index 4bf7faa1d6b8c67b3bc89eb3fb9cbecafc4705fa..7551a7b1c26192ddf3546c7178c662653b177bd0 100644 --- a/resources/views/dialog.ejs +++ b/resources/views/dialog.ejs @@ -29,10 +29,16 @@ </div> </section> - <section id="error"> <div class="table"> <div class="vertical contents"> </div> </div> </section> + + <section id="delay"> + <div class="table"> + <div class="vertical contents"> + </div> + </div> + </section> diff --git a/resources/views/dialog_layout.ejs b/resources/views/dialog_layout.ejs index fb376bf3e5558ae34610ad61b288b04b6d64cce2..4a28e5f5af0d91666ef73bb8ab7a0cd349104ca9 100644 --- a/resources/views/dialog_layout.ejs +++ b/resources/views/dialog_layout.ejs @@ -88,12 +88,12 @@ <script src="/shared/modules/page_module.js"></script> <script src="/shared/modules/xhr_delay.js"></script> <script src="/shared/modules/xhr_disable_form.js"></script> + <script src="/shared/modules/code_check.js"></script> <script src="/dialog/resources/internal_api.js"></script> <script src="/dialog/resources/helpers.js"></script> <script src="/dialog/resources/state_machine.js"></script> - <script src="/dialog/controllers/code_check.js"></script> <script src="/dialog/controllers/actions.js"></script> <script src="/dialog/controllers/dialog.js"></script> <script src="/dialog/controllers/authenticate.js"></script> diff --git a/resources/views/index.ejs b/resources/views/index.ejs index bf9e7b0f07b0eb9c14d9c8de24bef49465ad8a8e..f581bac21237a2aeb88b563fcba7e1924ea312de 100644 --- a/resources/views/index.ejs +++ b/resources/views/index.ejs @@ -1,6 +1,7 @@ <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + <div id="content" style="display:none" class="display_auth"> <div id="newuser"> New to BrowserID? <a href="/about">Learn more</a> diff --git a/resources/views/layout.ejs b/resources/views/layout.ejs index 105b33f288efed111e6b8c41ddcb307e97bf0bad..0c267d21ad08c1423d1391ceda47b868389eb673 100644 --- a/resources/views/layout.ejs +++ b/resources/views/layout.ejs @@ -28,6 +28,7 @@ <script src="/shared/javascript-extensions.js"></script> <script src="/shared/browserid.js"></script> <script src="/lib/dom-jquery.js"></script> + <script src="/lib/module.js"></script> <script src="/lib/jschannel.js"></script> <script src="/lib/winchan.js"></script> <script src="/lib/hub.js"></script> @@ -51,6 +52,7 @@ <script src="/shared/modules/page_module.js"></script> <script src="/shared/modules/xhr_delay.js"></script> <script src="/shared/modules/xhr_disable_form.js"></script> + <script src="/shared/modules/code_check.js"></script> <script src="/pages/page_helpers.js"></script> <script src="/pages/index.js"></script> @@ -84,8 +86,9 @@ </ul> </header> - <div id="error"><div class="contents"></div></div> <div id="wait"><div class="contents"></div></div> + <div id="error"><div class="contents"></div></div> + <div id="delay"><div class="contents"></div></div> <%- body %> diff --git a/resources/views/signin.ejs b/resources/views/signin.ejs index cce2e222e650044fe9fc25fdbe55327a172afcb3..192949cdb536e4ac33e9fc7b96cfd275f8f11954 100644 --- a/resources/views/signin.ejs +++ b/resources/views/signin.ejs @@ -48,13 +48,10 @@ </li> </ul> - <div class="submit cf"> - <!--div class="remember cf"> - <div class="checkAlign"> - <input id="memorize" type="checkbox" tabindex="3"> - </div> - <label for="memorize">remember me</label> - </div--> + <div class="submit cf forminputs"> + <div class="remember cf"> + <a class="signUpIn" href="/signup">New to BrowserID? Sign up today.</a> + </div> <button tabindex="5">Sign In</button> </div> @@ -71,7 +68,6 @@ </li> </ul> </form> - <a class="signUpIn space" href="/signup">New to BrowserID? Sign up today.</a> </div> </div> diff --git a/resources/views/test.ejs b/resources/views/test.ejs index 220c3ccd6d10ff37af7d93260518804486ba03b7..c21dd90fc93776805c15f9be20727a866c8c8dbf 100644 --- a/resources/views/test.ejs +++ b/resources/views/test.ejs @@ -40,6 +40,10 @@ <div id="error"> <div class="contents"></div> </div> + + <div id="delay"> + <div class="contents"></div> + </div> </div> <div id="needsTooltip">Tooltip Anchor</div> @@ -98,12 +102,12 @@ <script src="/shared/modules/page_module.js"></script> <script src="/shared/modules/xhr_delay.js"></script> <script src="/shared/modules/xhr_disable_form.js"></script> + <script src="/shared/modules/code_check.js"></script> <script src="/dialog/resources/internal_api.js"></script> <script src="/dialog/resources/helpers.js"></script> <script src="/dialog/resources/state_machine.js"></script> - <script src="/dialog/controllers/code_check.js"></script> <script src="/dialog/controllers/actions.js"></script> <script src="/dialog/controllers/pick_email.js"></script> <script src="/dialog/controllers/add_email.js"></script> @@ -143,6 +147,7 @@ <script src="qunit/shared/modules/page_module_unit_test.js"></script> <script src="qunit/shared/modules/xhr_delay_unit_test.js"></script> <script src="qunit/shared/modules/xhr_disable_form_unit_test.js"></script> + <script src="qunit/shared/modules/code_check_unit_test.js"></script> <script src="qunit/pages/browserid_unit_test.js"></script> <script src="qunit/pages/page_helpers_unit_test.js"></script> @@ -157,7 +162,6 @@ <script src="qunit/resources/helpers_unit_test.js"></script> <script src="qunit/resources/state_machine_unit_test.js"></script> - <script src="qunit/controllers/code_check_unit_test.js"></script> <script src="qunit/controllers/actions_unit_test.js"></script> <script src="qunit/controllers/pick_email_unit_test.js"></script> <script src="qunit/controllers/add_email_unit_test.js"></script> diff --git a/scripts/compress.sh b/scripts/compress.sh index f16ca016e56e515482b1e2a23f6ec68a393aa856..1acfba26006f3a543a211dbf2ec492b62ee700b1 100755 --- a/scripts/compress.sh +++ b/scripts/compress.sh @@ -60,7 +60,7 @@ cd ../.. # produce the dialog js for locale in `../../scripts/production_locales`; do mkdir -p $BUILD_PATH/$locale - cat lib/jquery-1.7.1.min.js lib/winchan.js lib/underscore-min.js lib/vepbundle.js lib/ejs.js i18n/${locale}/client.json shared/gettext.js shared/browserid.js lib/hub.js lib/dom-jquery.js lib/module.js lib/jschannel.js shared/javascript-extensions.js shared/mediator.js shared/class.js shared/storage.js $BUILD_PATH/templates.js shared/renderer.js shared/error-display.js shared/screens.js shared/tooltip.js shared/validation.js shared/provisioning.js shared/network.js shared/user.js shared/error-messages.js shared/browser-support.js shared/wait-messages.js shared/helpers.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js dialog/resources/internal_api.js dialog/resources/helpers.js dialog/resources/state_machine.js dialog/controllers/code_check.js dialog/controllers/actions.js dialog/controllers/dialog.js dialog/controllers/authenticate.js dialog/controllers/forgot_password.js dialog/controllers/check_registration.js dialog/controllers/pick_email.js dialog/controllers/add_email.js dialog/controllers/required_email.js dialog/controllers/verify_primary_user.js dialog/controllers/provision_primary_user.js dialog/controllers/primary_user_provisioned.js dialog/controllers/email_chosen.js dialog/start.js > $BUILD_PATH/$locale/dialog.uncompressed.js + cat lib/jquery-1.7.1.min.js lib/winchan.js lib/underscore-min.js lib/vepbundle.js lib/ejs.js i18n/${locale}/client.json shared/gettext.js shared/browserid.js lib/hub.js lib/dom-jquery.js lib/module.js lib/jschannel.js shared/javascript-extensions.js shared/mediator.js shared/class.js shared/storage.js $BUILD_PATH/templates.js shared/renderer.js shared/error-display.js shared/screens.js shared/tooltip.js shared/validation.js shared/provisioning.js shared/network.js shared/user.js shared/error-messages.js shared/browser-support.js shared/wait-messages.js shared/helpers.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js shared/modules/code_check.js dialog/resources/internal_api.js dialog/resources/helpers.js dialog/resources/state_machine.js dialog/controllers/actions.js dialog/controllers/dialog.js dialog/controllers/authenticate.js dialog/controllers/forgot_password.js dialog/controllers/check_registration.js dialog/controllers/pick_email.js dialog/controllers/add_email.js dialog/controllers/required_email.js dialog/controllers/verify_primary_user.js dialog/controllers/provision_primary_user.js dialog/controllers/primary_user_provisioned.js dialog/controllers/email_chosen.js dialog/start.js > $BUILD_PATH/$locale/dialog.uncompressed.js done # produce the dialog css @@ -74,7 +74,7 @@ echo '****Building BrowserID.org HTML, CSS, and JS****' echo '' #produce the main site js -cat lib/vepbundle.js lib/jquery-1.7.1.min.js lib/underscore-min.js lib/ejs.js shared/javascript-extensions.js shared/browserid.js lib/dom-jquery.js lib/jschannel.js lib/winchan.js lib/hub.js $BUILD_PATH/templates.js shared/renderer.js shared/error-display.js shared/screens.js shared/error-messages.js shared/wait-messages.js shared/mediator.js shared/storage.js shared/network.js shared/provisioning.js shared/user.js shared/tooltip.js shared/validation.js shared/helpers.js shared/class.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js pages/page_helpers.js pages/start.js pages/index.js pages/add_email_address.js pages/verify_email_address.js pages/forgot.js pages/manage_account.js pages/signin.js pages/signup.js > $BUILD_PATH/browserid.uncompressed.js +cat lib/vepbundle.js lib/jquery-1.7.1.min.js lib/underscore-min.js lib/ejs.js shared/javascript-extensions.js shared/browserid.js lib/dom-jquery.js lib/module.js lib/jschannel.js lib/winchan.js lib/hub.js $BUILD_PATH/templates.js shared/renderer.js shared/error-display.js shared/screens.js shared/error-messages.js shared/wait-messages.js shared/mediator.js shared/storage.js shared/network.js shared/provisioning.js shared/user.js shared/tooltip.js shared/validation.js shared/helpers.js shared/class.js shared/modules/page_module.js shared/modules/xhr_delay.js shared/modules/xhr_disable_form.js shared/modules/code_check.js pages/page_helpers.js pages/start.js pages/index.js pages/add_email_address.js pages/verify_email_address.js pages/forgot.js pages/manage_account.js pages/signin.js pages/signup.js > $BUILD_PATH/browserid.uncompressed.js # produce the main site css cat css/common.css css/style.css css/m.css > $BUILD_PATH/browserid.uncompressed.css