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

Unified Diff: chrome/browser/resources/options2/chromeos/internet_detail.js

Issue 9702011: Migrate proxy-settings.html to options2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright notices. Created 8 years, 9 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
Index: chrome/browser/resources/options2/chromeos/internet_detail.js
diff --git a/chrome/browser/resources/options2/chromeos/internet_detail.js b/chrome/browser/resources/options2/chromeos/internet_detail.js
index 0a64bcd26b89a4079f659192dd4d3b8ffe40078b..f0bdabcacef27a4fde81ee9a2422d2f192bdef8b 100644
--- a/chrome/browser/resources/options2/chromeos/internet_detail.js
+++ b/chrome/browser/resources/options2/chromeos/internet_detail.js
@@ -61,9 +61,14 @@ cr.define('options.internet', function() {
*/
initializePage: function() {
OptionsPage.prototype.initializePage.call(this);
-
options.internet.CellularPlanElement.decorate($('planList'));
+ this.initializePageContents_();
+ },
+ /**
+ * Initializes the contents of the page.
+ */
+ initializePageContents_: function() {
$('detailsInternetDismiss').addEventListener('click', function(event) {
InternetOptions.setDetails();
});
@@ -305,7 +310,7 @@ cr.define('options.internet', function() {
var bannerDiv = $('info-banner');
// Show banner and determine its message if necessary.
var controlledBy = $('directProxy').controlledBy;
- if (controlledBy == '') {
+ if (!controlledBy || controlledBy == '') {
bannerDiv.hidden = true;
} else {
bannerDiv.hidden = false;
@@ -382,6 +387,35 @@ cr.define('options.internet', function() {
},
};
+ /**
+ * Performs minimal initialization of the InternetDetails dialog in
+ * preparation for showing proxy-setttings.
+ */
+ DetailsInternetPage.initializeProxySettings = function() {
+ var detailsPage = DetailsInternetPage.getInstance();
+ detailsPage.initializePageContents_();
+ };
+
+ /**
+ * Displays the InternetDetails dialog with only the proxy settings visible.
+ */
+ DetailsInternetPage.showProxySettings = function() {
+ var detailsPage = DetailsInternetPage.getInstance();
+ $('network-details-header').hidden = true;
+ $('buyplanDetails').hidden = true;
+ $('activateDetails').hidden = true;
+ $('viewAccountDetails').hidden = true;
+ detailsPage.cellular = false;
+ detailsPage.wireless = false;
+ detailsPage.vpn = false;
+ detailsPage.showProxy = true;
+ updateHidden('#internetTab', true);
+ updateHidden('#details-tab-strip', true);
+ updateHidden('#detailsInternetPage .action-area', true);
+ detailsPage.updateControls();
+ detailsPage.visible = true;
+ };
+
return {
DetailsInternetPage: DetailsInternetPage
};
« no previous file with comments | « chrome/browser/resources/chromeos/proxy_settings.js ('k') | chrome/browser/ui/webui/options2/chromeos/proxy_handler2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698