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

Side by Side Diff: chrome/browser/resources/options2/certificate_manager.js

Issue 10808114: Merge 146920 - Fix certificate manager buttons never becoming clickable. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/resources/options2/certificate_tree.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 7
8 ///////////////////////////////////////////////////////////////////////////// 8 /////////////////////////////////////////////////////////////////////////////
9 // CertificateManagerTab class: 9 // CertificateManagerTab class:
10 10
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 CertificateManagerTab.prototype = { 109 CertificateManagerTab.prototype = {
110 110
111 /** 111 /**
112 * Update button state. 112 * Update button state.
113 * @private 113 * @private
114 * @param {!Object} data The data of the selected item. 114 * @param {!Object} data The data of the selected item.
115 */ 115 */
116 updateButtonState: function(data) { 116 updateButtonState: function(data) {
117 var isCert = !!data && data.id.substr(0, 5) == 'cert-'; 117 var isCert = !!data && data.isCert;
118 var readOnly = !!data && data.readonly; 118 var readOnly = !!data && data.readonly;
119 var extractable = !!data && data.extractable; 119 var extractable = !!data && data.extractable;
120 var hasChildren = this.tree.items.length > 0; 120 var hasChildren = this.tree.items.length > 0;
121 this.viewButton.disabled = !isCert; 121 this.viewButton.disabled = !isCert;
122 if (this.editButton !== null) 122 if (this.editButton !== null)
123 this.editButton.disabled = !isCert; 123 this.editButton.disabled = !isCert;
124 if (this.backupButton !== null) 124 if (this.backupButton !== null)
125 this.backupButton.disabled = !isCert || !extractable; 125 this.backupButton.disabled = !isCert || !extractable;
126 if (this.backupAllButton !== null) 126 if (this.backupAllButton !== null)
127 this.backupAllButton.disabled = !hasChildren; 127 this.backupAllButton.disabled = !hasChildren;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 tpmPollingTimer = window.setTimeout(checkTpmToken, 5000); 246 tpmPollingTimer = window.setTimeout(checkTpmToken, 5000);
247 } 247 }
248 }; 248 };
249 249
250 // Export 250 // Export
251 return { 251 return {
252 CertificateManagerTab: CertificateManagerTab, 252 CertificateManagerTab: CertificateManagerTab,
253 CertificateManager: CertificateManager 253 CertificateManager: CertificateManager
254 }; 254 };
255 }); 255 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options2/certificate_tree.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698