Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: chrome/browser/sync/resources/gaia_login.js

Issue 6865030: Sync: Refresh the UI to match Alex's mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Variable to track if a captcha challenge was issued. If this gets set to 5 // Variable to track if a captcha challenge was issued. If this gets set to
6 // true, it stays that way until we are told about successful login from 6 // true, it stays that way until we are told about successful login from
7 // the browser. This means subsequent errors (like invalid password) are 7 // the browser. This means subsequent errors (like invalid password) are
8 // rendered in the captcha state, which is basically identical except we 8 // rendered in the captcha state, which is basically identical except we
9 // don't show the top error blurb "Error Signing in" or the "Create 9 // don't show the top error blurb "Error Signing in" or the "Create
10 // account" link. 10 // account" link.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 function load() { 134 function load() {
135 var acct_text = document.getElementById("gaia-account-text"); 135 var acct_text = document.getElementById("gaia-account-text");
136 var translated_text = acct_text.textContent; 136 var translated_text = acct_text.textContent;
137 var posGoogle = translated_text.indexOf('Google'); 137 var posGoogle = translated_text.indexOf('Google');
138 if (posGoogle != -1) { 138 if (posGoogle != -1) {
139 var ltr = templateData['textdirection'] == 'ltr'; 139 var ltr = templateData['textdirection'] == 'ltr';
140 var googleIsAtEndOfSentence = posGoogle != 0; 140 var googleIsAtEndOfSentence = posGoogle != 0;
141 if (googleIsAtEndOfSentence == ltr) { 141 if (googleIsAtEndOfSentence == ltr) {
142 // We're in ltr and in the translation the word 'Google' is AFTER the 142 // We're in ltr and in the translation the word 'Google' is AFTER the
143 // word 'Account' OR we're in rtl and 'Google' is BEFORE 'Account'. 143 // word 'Account' OR we're in rtl and 'Google' is BEFORE 'Account'.
144 var logo_td = document.getElementById('gaia-logo'); 144 var logo_div = document.getElementById('gaia-logo');
145 logo_td.parentNode.appendChild(logo_td); 145 logo_div.parentNode.appendChild(logo_div);
146 } 146 }
147 acct_text.textContent = translated_text.replace('Google',''); 147 acct_text.textContent = translated_text.replace('Google','');
148 } 148 }
149 149
150 var loginForm = document.getElementById("gaia-login-form"); 150 var loginForm = document.getElementById("gaia-login-form");
151 loginForm.onsubmit = function() { 151 loginForm.onsubmit = function() {
152 sendCredentialsAndClose(); 152 sendCredentialsAndClose();
153 return false; 153 return false;
154 }; 154 };
155 155
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 function onPreLogin() { 244 function onPreLogin() {
245 if (window["onlogin"] != null) { 245 if (window["onlogin"] != null) {
246 return onlogin(); 246 return onlogin();
247 } else { 247 } else {
248 return true; 248 return true;
249 } 249 }
250 } 250 }
251 251
252 document.addEventListener('DOMContentLoaded', load); 252 document.addEventListener('DOMContentLoaded', load);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698