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

Side by Side Diff: chrome/browser/resources/options/advanced_options.js

Issue 6541027: Small: Cloud print UI options fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 // 9 //
10 // AdvancedOptions class 10 // AdvancedOptions class
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 chrome.send('useTLS1CheckboxAction', 121 chrome.send('useTLS1CheckboxAction',
122 [String($('sslUseTLS1').checked)]); 122 [String($('sslUseTLS1').checked)]);
123 }; 123 };
124 $('gearSettingsConfigureGearsButton').onclick = function(event) { 124 $('gearSettingsConfigureGearsButton').onclick = function(event) {
125 chrome.send('showGearsSettings'); 125 chrome.send('showGearsSettings');
126 }; 126 };
127 } 127 }
128 128
129 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on 129 // 'cloudPrintProxyEnabled' is true for Chrome branded builds on
130 // certain platforms, or could be enabled by a lab. 130 // certain platforms, or could be enabled by a lab.
131 if (!cr.isChromeOS && 131 if (!cr.isChromeOS) {
132 localStrings.getString('enable-cloud-print-proxy') == 'true') {
133 $('cloudPrintProxySetupButton').onclick = function(event) { 132 $('cloudPrintProxySetupButton').onclick = function(event) {
134 if ($('cloudPrintProxyManageButton').style.display == 'none') { 133 if ($('cloud-print-proxy-section').style.display != 'none') {
csilv 2011/02/18 19:54:28 This added check is unnecessary. The entire secti
Scott Byer 2011/02/18 20:44:05 Done.
135 // Disable the button, set it's text to the intermediate state. 134 if ($('cloudPrintProxyManageButton').style.display == 'none') {
136 $('cloudPrintProxySetupButton').textContent = 135 // Disable the button, set it's text to the intermediate state.
137 localStrings.getString('cloudPrintProxyEnablingButton'); 136 $('cloudPrintProxySetupButton').textContent =
138 $('cloudPrintProxySetupButton').disabled = true; 137 localStrings.getString('cloudPrintProxyEnablingButton');
139 chrome.send('showCloudPrintSetupDialog'); 138 $('cloudPrintProxySetupButton').disabled = true;
140 } else { 139 chrome.send('showCloudPrintSetupDialog');
141 chrome.send('disableCloudPrintProxy'); 140 } else {
141 chrome.send('disableCloudPrintProxy');
142 }
142 } 143 }
143 }; 144 };
144 $('cloudPrintProxyManageButton').onclick = function(event) { 145 $('cloudPrintProxyManageButton').onclick = function(event) {
145 chrome.send('showCloudPrintManagePage'); 146 if ($('cloud-print-proxy-section').style.display != 'none') {
csilv 2011/02/18 19:54:28 Same with this check.
Scott Byer 2011/02/18 20:44:05 Done.
147 chrome.send('showCloudPrintManagePage');
148 }
146 }; 149 };
147 } 150 }
148 151
149 if ($('remotingSetupButton')) { 152 if ($('remotingSetupButton')) {
150 $('remotingSetupButton').onclick = function(event) { 153 $('remotingSetupButton').onclick = function(event) {
151 chrome.send('showRemotingSetupDialog'); 154 chrome.send('showRemotingSetupDialog');
152 } 155 }
153 $('remotingStopButton').onclick = function(event) { 156 $('remotingStopButton').onclick = function(event) {
154 chrome.send('disableRemoting'); 157 chrome.send('disableRemoting');
155 } 158 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 if (proxySectionElm) 302 if (proxySectionElm)
300 proxySectionElm.parentNode.removeChild(proxySectionElm); 303 proxySectionElm.parentNode.removeChild(proxySectionElm);
301 }; 304 };
302 305
303 // Export 306 // Export
304 return { 307 return {
305 AdvancedOptions: AdvancedOptions 308 AdvancedOptions: AdvancedOptions
306 }; 309 };
307 310
308 }); 311 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698