From b506c758074396300172de41234d108671d7c4f6 Mon Sep 17 00:00:00 2001 From: Shane Tomlinson <stomlinson@mozilla.com> Date: Wed, 1 Feb 2012 12:18:46 +0000 Subject: [PATCH] Changing the style of the cancel buttons so they are not so prominent. * Add the .submit > a style. * Generalize the id of the cancel button to be cancel. * Update controllers for new button ids. close #1020 --- resources/static/css/common.css | 19 +++++++++++++++++++ .../static/dialog/controllers/add_email.js | 2 +- .../dialog/controllers/forgot_password.js | 2 +- resources/static/dialog/css/popup.css | 9 --------- resources/static/dialog/views/add_email.ejs | 2 +- .../static/dialog/views/confirm_email.ejs | 2 +- .../static/dialog/views/forgot_password.ejs | 2 +- .../static/dialog/views/required_email.ejs | 2 +- .../dialog/views/verify_primary_user.ejs | 2 +- 9 files changed, 26 insertions(+), 16 deletions(-) diff --git a/resources/static/css/common.css b/resources/static/css/common.css index 0a8a061ec..589210345 100644 --- a/resources/static/css/common.css +++ b/resources/static/css/common.css @@ -205,6 +205,25 @@ button[disabled], .submit_disabled button, .submit_disabled .button, opacity: .5; } +#cancel, #back { + background-color: transparent; + color: #549FDC; + font-size: 1em; + font-weight: normal; + text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5); + padding: 0; +} + + +.submit > a { + float: right; + margin-right: 15px; +} + +a.secondary[disabled], .submit_disabled a.secondary, .submit_disabled a.secondary:focus, .submit_disabled a.secondary:active { + color: #999; +} + hr { height: 1px; border: none; diff --git a/resources/static/dialog/controllers/add_email.js b/resources/static/dialog/controllers/add_email.js index 9568b8fe9..1ef8d01fb 100644 --- a/resources/static/dialog/controllers/add_email.js +++ b/resources/static/dialog/controllers/add_email.js @@ -37,7 +37,7 @@ BrowserID.Modules.AddEmail = (function() { self.renderDialog("add_email", options); - self.bind("#cancelNewEmail", "click", cancelEvent(cancelAddEmail)); + self.bind("#cancel", "click", cancelEvent(cancelAddEmail)); Module.sc.start.call(self, options); }, submit: addEmail diff --git a/resources/static/dialog/controllers/forgot_password.js b/resources/static/dialog/controllers/forgot_password.js index b2b3a7f12..69ae248a5 100644 --- a/resources/static/dialog/controllers/forgot_password.js +++ b/resources/static/dialog/controllers/forgot_password.js @@ -31,7 +31,7 @@ BrowserID.Modules.ForgotPassword = (function() { requiredEmail: options.requiredEmail }); - self.bind("#cancel_forgot_password", "click", cancelEvent(cancelResetPassword)); + self.bind("#cancel", "click", cancelEvent(cancelResetPassword)); Module.sc.start.call(self, options); }, diff --git a/resources/static/dialog/css/popup.css b/resources/static/dialog/css/popup.css index a5eb76fda..ae4e84ebd 100644 --- a/resources/static/dialog/css/popup.css +++ b/resources/static/dialog/css/popup.css @@ -383,15 +383,6 @@ a.emphasize { line-height: 18px; } -#back.cancelVerify { - background-color: transparent; - color: #549FDC; - font-size: 1em; - font-weight: normal; - text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5); - padding: 0; -} - .submit > button { margin: 0 5px 0 0; } diff --git a/resources/static/dialog/views/add_email.ejs b/resources/static/dialog/views/add_email.ejs index e5c2b4e00..3c951706d 100644 --- a/resources/static/dialog/views/add_email.ejs +++ b/resources/static/dialog/views/add_email.ejs @@ -31,7 +31,7 @@ <div class="submit cf"> <button id="addNewEmail"><%= gettext('add') %></button> - <button id="cancelNewEmail"><%= gettext('cancel') %></button> + <a href="#" id="cancel"><%= gettext('cancel') %></a> </div> </div> diff --git a/resources/static/dialog/views/confirm_email.ejs b/resources/static/dialog/views/confirm_email.ejs index 04576d703..39e17c36f 100644 --- a/resources/static/dialog/views/confirm_email.ejs +++ b/resources/static/dialog/views/confirm_email.ejs @@ -5,4 +5,4 @@ <h2><%= gettext('Check your email!') %></h2> <p><%= format(gettext('We sent a confirmation email to <strong>%s</strong>'), [email]) %></p> <p><%= gettext('To finish signing in just click the verify link we sent to your email address.') %></p><br /> - <p><%= gettext('If this is a mistake, just ignore the sent email and <a href="#" class="cancelVerify" id="back">use another email address</a>.') %></p> + <p><%= gettext('If this is a mistake, just ignore the sent email and <a href="#" id="back">use another email address</a>.') %></p> diff --git a/resources/static/dialog/views/forgot_password.ejs b/resources/static/dialog/views/forgot_password.ejs index ef7a7145e..68b0d5749 100644 --- a/resources/static/dialog/views/forgot_password.ejs +++ b/resources/static/dialog/views/forgot_password.ejs @@ -25,6 +25,6 @@ <div class="submit cf"> <button tabindex="1"><%= gettext('Reset Password') %></button> - <button id="cancel_forgot_password" tabindex="2"><%= gettext('Cancel') %></button> + <a href="#" id="cancel" tabindex="2"><%= gettext('Cancel') %></a> </div> </div> diff --git a/resources/static/dialog/views/required_email.ejs b/resources/static/dialog/views/required_email.ejs index 4254dc123..d38ed5281 100644 --- a/resources/static/dialog/views/required_email.ejs +++ b/resources/static/dialog/views/required_email.ejs @@ -60,7 +60,7 @@ <% } %> <% if (secondary_auth) { %> - <button id="cancel" tabindex="4"><%= gettext("cancel") %></button> + <a href="#" id="cancel" tabindex="4"><%= gettext("cancel") %></a> <% } %> </div> </div> diff --git a/resources/static/dialog/views/verify_primary_user.ejs b/resources/static/dialog/views/verify_primary_user.ejs index ed5a10517..6a7183bcb 100644 --- a/resources/static/dialog/views/verify_primary_user.ejs +++ b/resources/static/dialog/views/verify_primary_user.ejs @@ -41,7 +41,7 @@ <div class="submit cf"> <button id="verifyWithPrimary"><%= gettext("Verify") %></button> - <button id="cancel"><%= gettext("Cancel") %></button> + <a href="#" id="cancel"><%= gettext("Cancel") %></a> </div> </div> -- GitLab