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

Unified Diff: chrome/browser/resources/mobile_setup.js

Issue 5329007: UI polish changes on cellular plan activation page.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/mobile_setup.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/mobile_setup.js
===================================================================
--- chrome/browser/resources/mobile_setup.js (revision 67622)
+++ chrome/browser/resources/mobile_setup.js (working copy)
@@ -18,6 +18,9 @@
MobileSetup.PLAN_ACTIVATION_DONE = 4;
MobileSetup.PLAN_ACTIVATION_ERROR = 5;
+ MobileSetup.ACTIVATION_PAGE_URL =
+ 'file:///usr/share/chromeos-assets/mobile/activation.html';
+
MobileSetup.localStrings_ = new LocalStrings();
MobileSetup.prototype = {
@@ -35,7 +38,7 @@
STATE_ACTIVATING_: "activating",
STATE_CONNECTED_: "connected",
- initialize: function(frame_name) {
+ initialize: function(frame_name, carrierPage) {
if (this.initialized_) {
console.log('calling initialize() again?');
return;
@@ -49,15 +52,19 @@
$('closeButton').addEventListener('click', function(e) {
$('finalMessage').classList.add('hidden');
});
+ $('carrierPage').contentWindow.location.href =
+ carrierPage;
$(frame_name).addEventListener('load', function(e) {
// Flip the visibility of the payment page only after the frame is
// fully loaded.
if (self.state_ == MobileSetup.PLAN_ACTIVATION_SHOWING_PAYMENT) {
$('statusHeader').textContent = '';
+ $('auxHeader').textContent = '';
$('finalMessage').classList.add('hidden');
$('errorMessage').classList.add('hidden');
$('systemStatus').classList.add('hidden');
$('canvas').classList.add('hidden');
+ $('carrierPage').classList.add('hidden');
$('paymentForm').classList.remove('hidden');
}
});
@@ -103,26 +110,33 @@
case MobileSetup.PLAN_ACTIVATION_RECONNECTING:
$('statusHeader').textContent =
MobileSetup.localStrings_.getString('connecting_header');
+ $('auxHeader').textContent =
+ MobileSetup.localStrings_.getString('please_wait');
$('errorMessage').textContent = '';
$('paymentForm').classList.add('hidden');
$('finalMessage').classList.add('hidden');
$('errorMessage').classList.add('hidden');
$('systemStatus').classList.remove('hidden');
$('canvas').classList.remove('hidden');
+ $('carrierPage').classList.remove('hidden');
break;
case MobileSetup.PLAN_ACTIVATION_INITIATING_ACTIVATION:
$('statusHeader').textContent =
MobileSetup.localStrings_.getString('activating_header');
+ $('auxHeader').textContent =
+ MobileSetup.localStrings_.getString('please_wait');
$('errorMessage').textContent = '';
$('paymentForm').classList.add('hidden');
$('finalMessage').classList.add('hidden');
$('errorMessage').classList.add('hidden');
$('systemStatus').classList.remove('hidden');
$('canvas').classList.remove('hidden');
+ $('carrierPage').classList.remove('hidden');
break;
case MobileSetup.PLAN_ACTIVATION_SHOWING_PAYMENT:
$('statusHeader').textContent =
MobileSetup.localStrings_.getString('connecting_header');
+ $('auxHeader').textContent = '';
$('paymentForm').classList.add('hidden');
$('finalMessage').classList.add('hidden');
$('errorMessage').classList.add('hidden');
@@ -132,18 +146,22 @@
break;
case MobileSetup.PLAN_ACTIVATION_DONE:
$('statusHeader').textContent = '';
+ $('auxHeader').textContent = '';
$('errorMessage').classList.add('hidden');
$('systemStatus').classList.add('hidden');
$('canvas').classList.add('hidden');
+ $('carrierPage').classList.add('hidden');
$('paymentForm').classList.remove('hidden');
$('finalMessage').classList.remove('hidden');
break;
case MobileSetup.PLAN_ACTIVATION_ERROR:
$('statusHeader').textContent =
MobileSetup.localStrings_.getString('error_header');
+ $('auxHeader').textContent = '';
$('errorMessage').textContent = deviceInfo.error;
$('paymentForm').classList.add('hidden');
$('finalMessage').classList.add('hidden');
+ $('carrierPage').classList.add('hidden');
$('canvas').classList.add('hidden');
$('errorMessage').classList.remove('hidden');
$('systemStatus').classList.remove('hidden');
@@ -216,7 +234,8 @@
};
MobileSetup.loadPage = function() {
- mobile.MobileSetup.getInstance().initialize('paymentForm');
+ mobile.MobileSetup.getInstance().initialize('paymentForm',
+ mobile.MobileSetup.ACTIVATION_PAGE_URL);
};
// Export
« no previous file with comments | « chrome/browser/resources/mobile_setup.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698