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

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

Issue 2878012: Revert 50902 - New HTML Sync Setup UI.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/450/src/
Patch Set: Created 10 years, 5 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 <html i18n-values="dir:textdirection;"> 1 <html i18n-values="dir:textdirection;">
2 <head> 2 <head>
3 <style type="text/css"> 3 <style type="text/css"><!--
4 body,td,div,p,a,font,span {font-family: arial,sans-serif;} 4 body,td,div,p,a,font,span {font-family: arial,sans-serif;}
5 body { background-color:#ffffff } 5 body { background-color:#ffffff }
6 A:link {color:#0000cc; } 6 A:link {color:#0000cc; }
7 A:visited { color:#551a8b; } 7 A:visited { color:#551a8b; }
8 A:active { color:#ff0000; } 8 A:active { color:#ff0000; }
9 .form-noindent {background-color: #ffffff; border: #C3D9FF 1px solid} 9 .form-noindent {background-color: #ffffff; border: #C3D9FF 1px solid}
10 .body { margin-left: 3em; 10 --></style>
11 margin-right: 5em; 11 <style type="text/css"><!--
12 font-family: arial,sans-serif; } 12 .body { margin-left: 3em;
13 .endaligned { 13 margin-right: 5em;
14 text-align: right; 14 font-family: arial,sans-serif; }
15 } 15 .endaligned {
16 html[dir='rtl'] .endaligned { 16 text-align: right;
17 text-align: left; 17 }
18 } 18 html[dir='rtl'] .endaligned {
19 #gaia_account_text { font-weight: bold; } 19 text-align: left;
20 div.errorbox-good {} 20 }
21 div.errorbox-bad {} 21 #gaia_account_text { font-weight: bold; }
22 div.errormsg { color: red; font-size: smaller; 22 div.errorbox-good {}
23 font-family: arial,sans-serif; 23 div.errorbox-bad {}
24 display: none;} 24 div.errormsg { color: red; font-size: smaller;
25 font.errormsg { color: red; font-size: smaller; 25 font-family: arial,sans-serif;
26 font-family: arial,sans-serif;} 26 display: none;}
27 div.errormsgspacer { min-height: 1em;} 27 font.errormsg { color: red; font-size: smaller;
28 font.errormsgspacer { font-size: smaller; 28 font-family: arial,sans-serif;}
29 font-family: arial,sans-serif;} 29 div.errormsgspacer { min-height: 1em;}
30 font.errormsgspacer { font-size: smaller;
31 font-family: arial,sans-serif;}
30 32
31 hr { 33 hr {
32 border: 0; 34 border: 0;
33 background-color:#DDDDDD; 35 background-color:#DDDDDD;
34 height: 1px; 36 height: 1px;
35 width: 100%; 37 width: 100%;
36 text-align: left; 38 text-align: left;
37 margin: 5px; 39 margin: 5px;
38 } 40 }
39 #gaia_loginform { 41 #gaia_loginform {
40 margin-bottom: 0; 42 margin-bottom: 0;
41 } 43 }
42 44
43 #captcha_wrapper { 45 #captcha_wrapper {
44 background-size: 200px 70px; 46 background-size: 200px 70px;
45 background: no-repeat; 47 background: no-repeat;
46 background-position: center; 48 background-position: center;
47 background-color: #e8eefa; 49 background-color: #e8eefa;
48 display: block; 50 display: block;
49 } 51 }
50 .captcha_image { 52 .captcha_image {
51 display: block; 53 display: block;
52 width: 200px; 54 width: 200px;
53 height: 70px; 55 height: 70px;
54 } 56 }
55 .toppageverticalspace { 57 .toppageverticalspace {
56 height: 15px; 58 height: 15px;
57 } 59 }
58 .bottompaddedcell { 60 .bottompaddedcell {
59 padding-bottom: 3px; 61 padding-bottom: 3px;
60 } 62 }
61 .noverticalpadding { 63 .noverticalpadding {
62 padding-top: 0; 64 padding-top: 0;
63 padding-bottom: 0; 65 padding-bottom: 0;
64 } 66 }
65 .cancelspacenocaptcha { 67 .cancelspacenocaptcha {
66 height: 22px; 68 height: 22px;
67 } 69 }
68 .cancelspaceforcaptcha { 70 .cancelspaceforcaptcha {
69 height: 5px; 71 height: 5px;
70 } 72 }
71 #top_blurb { 73 #top_blurb {
72 text-align: justify; 74 text-align: justify;
73 } 75 }
74 input[type='button'] { 76 -->
75 min-width: 87px; 77 </style>
76 min-height: 26px; 78 </head>
77 } 79 <body bgcolor="#ffffff" vlink="#666666"
78 input[type='submit'] { 80 i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"
79 min-width: 87px; 81 style="margin-bottom: 6px; margin-top: 6px;" onload="initForm();">
80 min-height: 26px;
81 }
82 </style>
83 </head>
84 <body bgcolor="#ffffff" vlink="#666666"
85 i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"
86 style="margin-bottom: 6px; margin-top: 6px;" onload="initGaiaLoginForm();" >
87 <table width="100%" height="100%" align="center" cellpadding="1" cellspacing=" 1"> 82 <table width="100%" height="100%" align="center" cellpadding="1" cellspacing=" 1">
88 <tr> 83 <tr>
89 <td valign="top"> <!-- LOGIN BOX --> 84 <td valign="top"> <!-- LOGIN BOX -->
90 <script> 85 <script>
91 // Variable to track if a captcha challenge was issued. If this gets set to 86 // Variable to track if a captcha challenge was issued. If this gets set to
92 // true, it stays that way until we are told about successful login from 87 // true, it stays that way until we are told about successful login from
93 // the browser. This means subsequent errors (like invalid password) are 88 // the browser. This means subsequent errors (like invalid password) are
94 // rendered in the captcha state, which is basically identical except we 89 // rendered in the captcha state, which is basically identical except we
95 // don't show the top error blurb "Error Signing in" or the "Create 90 // don't show the top error blurb "Error Signing in" or the "Create
96 // account" link. 91 // account" link.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 142 }
148 if (3 == args.error) { 143 if (3 == args.error) {
149 setElementDisplay("errormsg_0_Connection", 'table-row'); 144 setElementDisplay("errormsg_0_Connection", 'table-row');
150 setBlurbError(); 145 setBlurbError();
151 } 146 }
152 if (4 == args.error) { 147 if (4 == args.error) {
153 showCaptcha(args); 148 showCaptcha(args);
154 } 149 }
155 document.getElementById("signIn").disabled = false; 150 document.getElementById("signIn").disabled = false;
156 document.getElementById("signIn").value = templateData['signin']; 151 document.getElementById("signIn").value = templateData['signin'];
152 if (args.showCustomize) {
153 document.getElementById("customize").disabled = false;
154 document.getElementById("customize").style.visibility = "visible";
155 }
157 gaia_setFocus(); 156 gaia_setFocus();
158 } 157 }
159 158
160 function showCaptcha(args) { 159 function showCaptcha(args) {
161 g_is_captcha_challenge_active = true; 160 g_is_captcha_challenge_active = true;
162 161
163 // The captcha takes up lots of space, so make room. 162 // The captcha takes up lots of space, so make room.
164 setElementDisplay("top_blurb", "none"); 163 setElementDisplay("top_blurb", "none");
165 setElementDisplay("top_blurb_error", "none"); 164 setElementDisplay("top_blurb_error", "none");
166 setElementDisplay("createaccountdiv", "none"); 165 setElementDisplay("createaccountdiv", "none");
167 setElementDisplay("topspacer", "none"); 166 setElementDisplay("topspacer", "none");
168 var gaiaTable = document.getElementById('gaia_table'); 167 var gaiaTable = document.getElementById('gaia_table');
169 gaiaTable.cellPadding = 0; 168 gaiaTable.cellPadding = 0;
170 gaiaTable.cellSpacing = 1; 169 gaiaTable.cellSpacing = 1;
171 document.getElementById('cancelspacer').className = 170 document.getElementById('cancelspacer').className =
172 "cancelspaceforcaptcha"; 171 "cancelspaceforcaptcha";
173 document.getElementById('createaccountcell').height = 0; 172 document.getElementById('createaccountcell').height = 0;
174 173
175 // It's showtime for the captcha now. 174 // It's showtime for the captcha now.
176 setElementDisplay("captchadiv", "block"); 175 setElementDisplay("captchadiv", "block");
177 document.getElementById('Email').disabled = true; 176 document.getElementById('Email').disabled = true;
178 document.getElementById('Passwd').disabled = false; 177 document.getElementById('Passwd').disabled = false;
179 document.getElementById('CaptchaValue').disabled = false; 178 document.getElementById('CaptchaValue').disabled = false;
180 document.getElementById('captcha_wrapper').style.backgroundImage = 179 document.getElementById('captcha_wrapper').style.backgroundImage =
181 url(args.captchaUrl); 180 url(args.captchaUrl);
182 } 181 }
183 182
184 function CloseDialog() { 183 function CloseDialog() {
184 chrome.send("ClickCustomizeCancel", [""]);
185 chrome.send("DialogClose", [""]); 185 chrome.send("DialogClose", [""]);
186 } 186 }
187 187
188 function showCustomize() {
189 chrome.send("ShowCustomize", [""]);
190 }
191
188 function showGaiaSuccessAndClose() { 192 function showGaiaSuccessAndClose() {
189 document.getElementById("signIn").value = templateData['success']; 193 document.getElementById("signIn").value = templateData['success'];
190 setTimeout(CloseDialog, 1600); 194 setTimeout(CloseDialog, 1600);
191 } 195 }
192 196
193 function showGaiaSuccessAndSettingUp() { 197 function showGaiaSuccessAndSettingUp() {
194 document.getElementById("signIn").value = templateData['settingup']; 198 document.getElementById("signIn").value = templateData['settingup'];
195 } 199 }
196 200
197 // Called once, when this html/js is loaded. 201 function initForm() {
198 function initGaiaLoginForm() {
199 var acct_text = document.getElementById("gaia_account_text"); 202 var acct_text = document.getElementById("gaia_account_text");
200 var translated_text = acct_text.textContent; 203 var translated_text = acct_text.textContent;
201 var posGoogle = translated_text.indexOf('Google'); 204 var posGoogle = translated_text.indexOf('Google');
202 if (posGoogle != -1) { 205 if (posGoogle != -1) {
203 var ltr = templateData['textdirection'] == 'ltr'; 206 var ltr = templateData['textdirection'] == 'ltr';
204 var googleIsAtEndOfSentence = posGoogle != 0; 207 var googleIsAtEndOfSentence = posGoogle != 0;
205 if (googleIsAtEndOfSentence == ltr) { 208 if (googleIsAtEndOfSentence == ltr) {
206 // We're in ltr and in the translation the word 'Google' is AFTER the 209 // We're in ltr and in the translation the word 'Google' is AFTER the
207 // word 'Account' OR we're in rtl and 'Google' is BEFORE 'Account'. 210 // word 'Account' OR we're in rtl and 'Google' is BEFORE 'Account'.
208 var logo_td = document.getElementById('gaia_logo'); 211 var logo_td = document.getElementById('gaia_logo');
209 logo_td.parentNode.appendChild(logo_td); 212 logo_td.parentNode.appendChild(logo_td);
210 } 213 }
211 acct_text.textContent = translated_text.replace('Google',''); 214 acct_text.textContent = translated_text.replace('Google','');
212 } 215 }
213 setInterval(advanceThrobber, 30); 216 setInterval(advanceThrobber, 30);
214 var args = JSON.parse(chrome.dialogArguments); 217 var args = JSON.parse(chrome.dialogArguments);
215 showGaiaLogin(args); 218 showGaiaLogin(args);
216 } 219 }
217 220
218 function sendCredentialsAndClose() { 221 function sendCredentialsAndClose() {
219 222
223 chrome.send("ClickCustomizeOk", [""]);
220 if (!setErrorVisibility()) 224 if (!setErrorVisibility())
221 return false; 225 return false;
222 226
223 document.getElementById('Email').disabled = true; 227 document.getElementById('Email').disabled = true;
224 document.getElementById('Passwd').disabled = true; 228 document.getElementById('Passwd').disabled = true;
225 document.getElementById('CaptchaValue').disabled = true; 229 document.getElementById('CaptchaValue').disabled = true;
226 230 if (document.getElementById('customize')) {
231 document.getElementById('customize').disabled = true;
232 }
227 var throbber = document.getElementById('throbber_container'); 233 var throbber = document.getElementById('throbber_container');
228 throbber.style.display = "inline"; 234 throbber.style.display = "inline";
229 var f = document.getElementById("gaia_loginform"); 235 var f = document.getElementById("gaia_loginform");
230 var result = JSON.stringify({"user" : f.Email.value, 236 var result = JSON.stringify({"user" : f.Email.value,
231 "pass" : f.Passwd.value, 237 "pass" : f.Passwd.value,
232 "captcha" : f.CaptchaValue.value}); 238 "captcha" : f.CaptchaValue.value});
233 document.getElementById("signIn").disabled = true; 239 document.getElementById("signIn").disabled = true;
234 chrome.send("SubmitAuth", [result]); 240 chrome.send("SubmitAuth", [result]);
235 } 241 }
236 242
(...skipping 28 matching lines...) Expand all
265 return false; 271 return false;
266 } 272 }
267 if (null == f.Passwd.value || "" == f.Passwd.value) { 273 if (null == f.Passwd.value || "" == f.Passwd.value) {
268 setElementDisplay("errormsg_0_Password", 'table-row'); 274 setElementDisplay("errormsg_0_Password", 'table-row');
269 setBlurbError(); 275 setBlurbError();
270 return false; 276 return false;
271 } 277 }
272 return true; 278 return true;
273 } 279 }
274 </script> 280 </script>
275 <style type="text/css"> 281 <style type="text/css"><!--
276 div.errormsg { color: red; font-size: smaller; font-family:arial,sans-serif; } 282 div.errormsg { color: red; font-size: smaller; font-family:arial,sans-serif; }
277 font.errormsg { color: red; font-size: smaller; font-family:arial,sans-serif ;} 283 font.errormsg { color: red; font-size: smaller; font-family:arial,sans-serif;}
278 </style> 284 --></style>
279 <style type="text/css"> 285 <style type="text/css"><!--
280 .gaia.le.lbl { font-family: Arial, Helvetica, sans-serif; font-size: smaller ; } 286 .gaia.le.lbl { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
281 .gaia.le.fpwd { font-family: Arial, Helvetica, sans-serif; font-size: 70%; } 287 .gaia.le.fpwd { font-family: Arial, Helvetica, sans-serif; font-size: 70%; }
282 .gaia.le.chusr { font-family: Arial, Helvetica, sans-serif; font-size: 70%; } 288 .gaia.le.chusr { font-family: Arial, Helvetica, sans-serif; font-size: 70%; }
283 .gaia.le.val { font-family: Arial, Helvetica, sans-serif; font-size: smaller ; } 289 .gaia.le.val { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
284 .gaia.le.button { font-family: Arial, Helvetica, sans-serif; } 290 .gaia.le.button { font-family: Arial, Helvetica, sans-serif; }
285 .gaia.le.rem { font-family: Arial, Helvetica, sans-serif; font-size: smaller ; } 291 .gaia.le.rem { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
286 .gaia.captchahtml.desc { font-family: arial, sans-serif; font-size: smaller; } 292 .gaia.captchahtml.desc { font-family: arial, sans-serif; font-size: smaller; }
287 .gaia.captchahtml.cmt { font-family: arial, sans-serif; font-size: smaller; 293 .gaia.captchahtml.cmt { font-family: arial, sans-serif; font-size: smaller;
288 font-style: italic; } 294 font-style: italic; }
289 </style> 295 --></style>
290 <div id="top_blurb"> 296 <div id="top_blurb">
291 <p><font size="-1"><span i18n-content="introduction"></span></font></p> 297 <p><font size="-1"><span i18n-content="introduction"></span></font></p>
292 </div> 298 </div>
293 <div id="top_blurb_error" style="display:none"> 299 <div id="top_blurb_error" style="display:none">
294 <p><font size="-1"> 300 <p><font size="-1">
295 <span i18n-content="settingupsync"></span><br/><br/> 301 <span i18n-content="settingupsync"></span><br/><br/>
296 <b><span i18n-content="errorsigningin"></span></b> 302 <b><span i18n-content="errorsigningin"></span></b>
297 </font></p> 303 </font></p>
298 </div> 304 </div>
299 <form id="gaia_loginform" onsubmit="sendCredentialsAndClose(); return false;"> 305 <form id="gaia_loginform" onsubmit="sendCredentialsAndClose(); return false;">
300 <div id="gaia_loginbox"> 306 <div id="gaia_loginbox">
301 <table id="content_table" class="form-noindent" cellspacing="0" cellpadding="5" 307 <table id="content_table" class="form-noindent" cellspacing="0" cellpadding="5"
302 width="75%" border="0" align="center"> 308 width="75%" border="0" align="center">
303 <tr> 309 <tr>
304 <td valign="top" style="text-align:center" nowrap="nowrap" 310 <td valign="top" style="text-align:center" nowrap="nowrap"
305 bgcolor="#e8eefa"> 311 bgcolor="#e8eefa">
306 <div> 312 <div>
307 <table id="gaia_table" align="center" border="0" cellpadding="1" 313 <table id="gaia_table" align="center" border="0" cellpadding="1"
308 cellspacing="0"> 314 cellspacing="0">
309 <tr> 315 <tr>
310 <td id="topspacer" class="toppageverticalspace" colspan="2"></td> 316 <td id="topspacer" class="toppageverticalspace" colspan="2"></td>
311 </tr> 317 </tr>
312 <tr> 318 <tr>
313 <td colspan="2" align="center"> 319 <td colspan="2" align="center">
314 <table> 320 <table>
315 <tr> 321 <tr>
316 <td valign="top" id="gaia_logo"> 322 <td valign="top" id="gaia_logo">
317 <img src="google_transparent.png" alt="Google"> 323 <img src="google_transparent.png" alt="Google">
318 </td> 324 </td>
319 <td valign="middle"> 325 <td valign="middle">
320 <font size="+0"> 326 <font size="+0">
321 <span id="gaia_account_text" i18n-content="signinsuffix">< /span> 327 <span id="gaia_account_text" i18n-content="signinsuffix">< /span>
322 </font> 328 </font>
323 </td> 329 </td>
324 </tr> 330 </tr>
325 </table> 331 </table>
326 </td> 332 </td>
327 </tr> 333 </tr>
328 <script type="text/javascript"> 334 <script type="text/javascript"><!--
329 function onPreCreateAccount() { 335 function onPreCreateAccount() {
330 return true; 336 return true;
331 } 337 }
332 function onPreLogin() { 338 function onPreLogin() {
333 if (window["onlogin"] != null) { 339 if (window["onlogin"] != null) {
334 return onlogin(); 340 return onlogin();
335 } else { 341 } else {
336 return true; 342 return true;
337 } 343 }
338 } 344 }
339 </script> 345 --></script>
340 <tr> 346 <tr>
341 <td colspan="2" align="center"> </td> 347 <td colspan="2" align="center"> </td>
342 </tr> 348 </tr>
343 <tr> 349 <tr>
344 <td nowrap="nowrap"> 350 <td nowrap="nowrap">
345 <div class="endaligned"> 351 <div class="endaligned">
346 <span class="gaia le lbl" i18n-content="emaillabel"> 352 <span class="gaia le lbl" i18n-content="emaillabel">
347 </span> 353 </span>
348 </div> 354 </div>
349 </td> 355 </td>
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 </div> 484 </div>
479 </form> 485 </form>
480 </td> 486 </td>
481 </tr> 487 </tr>
482 <tr> 488 <tr>
483 <td class="cancelspacenocaptcha" id="cancelspacer" colspan="2"> 489 <td class="cancelspacenocaptcha" id="cancelspacer" colspan="2">
484 </td> 490 </td>
485 </tr> 491 </tr>
486 <tr> 492 <tr>
487 <td class="endaligned noverticalpadding" colspan="2" style="vertical-align: bo ttom"> 493 <td class="endaligned noverticalpadding" colspan="2" style="vertical-align: bo ttom">
494 <input id="customize" type="button" name="customize"
495 i18n-values="value:customize" onclick="showCustomize();"
496 style="visibility:hidden" disabled="disabled">
488 <input type="button" name="cancel" i18n-values="value:cancel" 497 <input type="button" name="cancel" i18n-values="value:cancel"
489 onclick="CloseDialog();" style="width:85"> 498 onclick="CloseDialog();" style="width:85">
490 </td> 499 </td>
491 </tr> 500 </tr>
492 </table> 501 </table>
493 </body> 502 </body>
494 </html> 503 </html>
OLDNEW
« no previous file with comments | « chrome/browser/sync/resources/choose_datatypes.html ('k') | chrome/browser/sync/resources/setup_flow.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698