diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 03:54:37 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 03:54:37 +0000 |
commit | b0fc63172a4ee48edd90044b1d85ea84d72e7cf5 (patch) | |
tree | 2488107bbffb733a0e38b9abc8f8a914deae2d0d /chrome/browser/sync | |
parent | a19c9b67f33da94fa5116966e5730fd6efd50005 (diff) | |
download | chromium_src-b0fc63172a4ee48edd90044b1d85ea84d72e7cf5.zip chromium_src-b0fc63172a4ee48edd90044b1d85ea84d72e7cf5.tar.gz chromium_src-b0fc63172a4ee48edd90044b1d85ea84d72e7cf5.tar.bz2 |
Add Throbber control for DOMUI. Use it everywhere in options and in Sync setup UI.
BUG=69755
TEST=Throbber works properly when settings page is scaled.
Review URL: http://codereview.chromium.org/6378006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72104 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r-- | chrome/browser/sync/resources/gaia_login.html | 27 | ||||
-rw-r--r-- | chrome/browser/sync/resources/setting_up.html | 21 |
2 files changed, 10 insertions, 38 deletions
diff --git a/chrome/browser/sync/resources/gaia_login.html b/chrome/browser/sync/resources/gaia_login.html index ff0defe..2bbab51 100644 --- a/chrome/browser/sync/resources/gaia_login.html +++ b/chrome/browser/sync/resources/gaia_login.html @@ -58,11 +58,7 @@ width: 200px; height: 70px; } - #throb { - background-image: url("../../../../app/resources/throbber.png"); - width: 16px; - height: 16px; - background-position: 0px; + #logging_in_throbber { margin: 0px 10px 0px 10px; } .toppageverticalspace { @@ -120,6 +116,7 @@ text-align: center; } </style> +<link rel="stylesheet" href="chrome://resources/css/throbber.css"> </head> <body bgcolor="#ffffff" vlink="#666666" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize" @@ -168,15 +165,10 @@ } } - function advanceThrobber() { - var throbber = document.getElementById('throb'); - throbber.style.backgroundPositionX = - ((parseInt(getComputedStyle(throbber).backgroundPositionX) - 16) % - 576) + 'px'; - } function showGaiaLogin(args) { - document.getElementById('throbber_container').style.display = "none"; + document.getElementById('logging_in_throbber').style.display = "none"; + document.getElementById('Email').disabled = false; document.getElementById('Passwd').disabled = false; @@ -288,13 +280,11 @@ } acct_text.textContent = translated_text.replace('Google',''); } - setInterval(advanceThrobber, 30); var args = JSON.parse(chrome.dialogArguments); showGaiaLogin(args); } function sendCredentialsAndClose() { - if (!setErrorVisibility()) return false; @@ -303,8 +293,8 @@ document.getElementById('CaptchaValue').disabled = true; document.getElementById('AccessCode').disabled = true; - var throbber = document.getElementById('throbber_container'); - throbber.style.display = "inline"; + document.getElementById('logging_in_throbber').style.display = "block"; + var f = document.getElementById("gaia_loginform"); var result = JSON.stringify({"user" : f.Email.value, "pass" : f.Passwd.value, @@ -548,10 +538,7 @@ <table align="center" cellpadding="0" cellspacing="0"> <tr> <td> - <div id="throbber_container" style="display:none;"> - <div id="throb"> - </div> - </div> + <div id="logging_in_throbber" class="throbber"></div> </td> <td class="noverticalpadding"> <input id="signIn" type="submit" class="gaia le button" diff --git a/chrome/browser/sync/resources/setting_up.html b/chrome/browser/sync/resources/setting_up.html index 02f5bd3..fc258f3 100644 --- a/chrome/browser/sync/resources/setting_up.html +++ b/chrome/browser/sync/resources/setting_up.html @@ -36,13 +36,8 @@ html[os='mac'] input[type='button'], html[os='mac'] input[type='submit'] { font-size: 12pt; } -#throb { - background-image: url("../../../../app/resources/throbber.png"); - width: 16px; - height: 16px; - background-position: 0px; +#throbber { margin: -3px 10px; - display: inline-block; } #setting_up { margin: 100px; @@ -55,23 +50,13 @@ html[os='mac'] input[type='submit'] { } </style> +<link rel="stylesheet" href="chrome://resources/css/throbber.css"> <script src="chrome://resources/js/cr.js"></script> -<script> - function advanceThrobber() { - var throbber = document.getElementById('throb'); - throbber.style.backgroundPositionX = - ((parseInt(getComputedStyle(throbber).backgroundPositionX) - 16) % - 576) + 'px'; - } - setInterval(advanceThrobber, 30); -</script> </head> <body i18n-values=".style.fontFamily:fontfamily"> <form id="settingUpForm" onSubmit="return false;"> <div id="setting_up"> - <span id="throbber_container"> - <span id="throb"></span> - </span> + <div id="throbber" class="throbber"></div> <div id="setting_up_label" i18n-content="settingup"></div> </div> <div class="sync-footer"> |