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

Unified Diff: chrome/browser/resources/chromeos/login/offline_gaia.js

Issue 1113553002: ChromeOS Gaia: Fixed slide-from-right transitions for rtl languages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/login/offline_gaia.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/offline_gaia.js
diff --git a/chrome/browser/resources/chromeos/login/offline_gaia.js b/chrome/browser/resources/chromeos/login/offline_gaia.js
index d072dfe7beff4b84b2b26a9ac5a0962396ff1dd0..2da030507bb89a64d99915b0d36a1d55a438a0b1 100644
--- a/chrome/browser/resources/chromeos/login/offline_gaia.js
+++ b/chrome/browser/resources/chromeos/login/offline_gaia.js
@@ -12,7 +12,7 @@ Polymer('offline-gaia', (function() {
},
focus: function() {
- if (this.$.animatedPages.selected == 0)
+ if (this.$.animatedPages.selected == 'emailSection')
this.$.emailInput.focus();
else
this.$.passwordInput.focus();
@@ -61,6 +61,11 @@ Polymer('offline-gaia', (function() {
},
setEmail: function(email) {
+ // Reorder elements for proper animation for rtl languages.
+ if (document.querySelector('html[dir=rtl]')) {
+ this.$.emailSection.parentNode.insertBefore(this.$.passwordSection,
+ this.$.emailSection);
+ }
if (email) {
if (this.emailDomain)
email = email.replace(this.emailDomain, '');
@@ -81,7 +86,7 @@ Polymer('offline-gaia', (function() {
this.$.passwordInput.setValid(true);
this.$.emailInput.setValid(true);
this.$.backButton.hidden = true;
- this.$.animatedPages.selected = 0;
+ this.$.animatedPages.selected = 'emailSection';
},
switchToPasswordCard(email) {
@@ -94,7 +99,7 @@ Polymer('offline-gaia', (function() {
}
this.$.passwordHeader.email = email;
this.$.backButton.hidden = false;
- this.$.animatedPages.selected = 1;
+ this.$.animatedPages.selected = 'passwordSection';
}
};
})());
« no previous file with comments | « chrome/browser/resources/chromeos/login/offline_gaia.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698