| OLD | NEW |
| 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 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * A lookup helper function to find the first node that has an id (starting | 9 * A lookup helper function to find the first node that has an id (starting |
| 10 * at |node| and going up the parent chain). | 10 * at |node| and going up the parent chain). |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // Then the optional Visit Website link. | 232 // Then the optional Visit Website link. |
| 233 if (extension.homepageUrl) { | 233 if (extension.homepageUrl) { |
| 234 var link = this.ownerDocument.createElement('a'); | 234 var link = this.ownerDocument.createElement('a'); |
| 235 link.classList.add('extension-links-trailing'); | 235 link.classList.add('extension-links-trailing'); |
| 236 link.textContent = | 236 link.textContent = |
| 237 localStrings.getString('extensionSettingsVisitWebsite'); | 237 localStrings.getString('extensionSettingsVisitWebsite'); |
| 238 link.href = extension.homepageUrl; | 238 link.href = extension.homepageUrl; |
| 239 vbox.appendChild(link); | 239 vbox.appendChild(link); |
| 240 } | 240 } |
| 241 | 241 |
| 242 if (extension.warnings.length > 0) { |
| 243 var warningsDiv = this.ownerDocument.createElement('div'); |
| 244 warningsDiv.classList.add('extension-warnings'); |
| 245 |
| 246 var warningsHeader = this.ownerDocument.createElement('span'); |
| 247 warningsHeader.classList.add('extension-warnings-title'); |
| 248 warningsHeader.textContent = |
| 249 localStrings.getString('extensionSettingsWarningsTitle'); |
| 250 warningsDiv.appendChild(warningsHeader); |
| 251 |
| 252 var warningList = this.ownerDocument.createElement('ul'); |
| 253 for (var j = 0; j < extension.warnings.length; ++j) { |
| 254 var warningEntry = this.ownerDocument.createElement('li'); |
| 255 warningEntry.textContent = extension.warnings[j]; |
| 256 warningList.appendChild(warningEntry); |
| 257 } |
| 258 warningsDiv.appendChild(warningList); |
| 259 |
| 260 vbox.appendChild(warningsDiv); |
| 261 } |
| 262 |
| 242 // And now the details section that is normally hidden. | 263 // And now the details section that is normally hidden. |
| 243 var details = this.ownerDocument.createElement('div'); | 264 var details = this.ownerDocument.createElement('div'); |
| 244 details.classList.add('vbox'); | 265 details.classList.add('vbox'); |
| 245 vbox.appendChild(details); | 266 vbox.appendChild(details); |
| 246 | 267 |
| 247 this.decorateDetailsSection_(details, extension, expanded, butterbar); | 268 this.decorateDetailsSection_(details, extension, expanded, butterbar); |
| 248 | 269 |
| 249 // And on the right of the details we have the Enable/Enabled checkbox. | 270 // And on the right of the details we have the Enable/Enabled checkbox. |
| 250 div = this.ownerDocument.createElement('div'); | 271 div = this.ownerDocument.createElement('div'); |
| 251 hbox.appendChild(div); | 272 hbox.appendChild(div); |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 704 String(extension.views[i].renderViewId) | 725 String(extension.views[i].renderViewId) |
| 705 ]); | 726 ]); |
| 706 } | 727 } |
| 707 } | 728 } |
| 708 }, | 729 }, |
| 709 }; | 730 }; |
| 710 | 731 |
| 711 return { | 732 return { |
| 712 ExtensionsList: ExtensionsList | 733 ExtensionsList: ExtensionsList |
| 713 }; | 734 }; |
| 714 }); | 735 }); |
| OLD | NEW |