| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 this._currentCategoriesCount += event.target.checked ? 1 : -1; | 202 this._currentCategoriesCount += event.target.checked ? 1 : -1; |
| 203 this._selectAllCheckboxElement.checked = this._currentCategoriesCount === th
is._sortedCategories.length; | 203 this._selectAllCheckboxElement.checked = this._currentCategoriesCount === th
is._sortedCategories.length; |
| 204 this._selectedCategoriesUpdated(true); | 204 this._selectedCategoriesUpdated(true); |
| 205 } | 205 } |
| 206 | 206 |
| 207 /** | 207 /** |
| 208 * @param {string} title | 208 * @param {string} title |
| 209 * @param {string=} id | 209 * @param {string=} id |
| 210 */ | 210 */ |
| 211 _createCategoryElement(title, id) { | 211 _createCategoryElement(title, id) { |
| 212 var labelElement = UI.createCheckboxLabel(title); | 212 var labelElement = UI.CheckboxLabel.create(title); |
| 213 if (id) { | 213 if (id) { |
| 214 labelElement.id = this._categoryIdPrefix + id; | 214 labelElement.id = this._categoryIdPrefix + id; |
| 215 labelElement.checkboxElement.addEventListener('click', this._boundCategory
ClickListener, false); | 215 labelElement.checkboxElement.addEventListener('click', this._boundCategory
ClickListener, false); |
| 216 } | 216 } |
| 217 labelElement.__displayName = title; | 217 /** @type {!Object} */ (labelElement).__displayName = title; |
| 218 | |
| 219 return labelElement; | 218 return labelElement; |
| 220 } | 219 } |
| 221 | 220 |
| 222 _createLauncherUI() { | 221 _createLauncherUI() { |
| 223 this._headerElement = createElement('h1'); | 222 this._headerElement = createElement('h1'); |
| 224 this._headerElement.textContent = Common.UIString('Select audits to run'); | 223 this._headerElement.textContent = Common.UIString('Select audits to run'); |
| 225 | 224 |
| 226 this._contentElement.removeChildren(); | 225 this._contentElement.removeChildren(); |
| 227 this._contentElement.appendChild(this._headerElement); | 226 this._contentElement.appendChild(this._headerElement); |
| 228 | 227 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 this._updateButton(); | 287 this._updateButton(); |
| 289 } | 288 } |
| 290 | 289 |
| 291 _updateButton() { | 290 _updateButton() { |
| 292 this._launchButton.textContent = this._auditRunning ? Common.UIString('Stop'
) : Common.UIString('Run'); | 291 this._launchButton.textContent = this._auditRunning ? Common.UIString('Stop'
) : Common.UIString('Run'); |
| 293 this._launchButton.disabled = !this._currentCategoriesCount; | 292 this._launchButton.disabled = !this._currentCategoriesCount; |
| 294 } | 293 } |
| 295 }; | 294 }; |
| 296 | 295 |
| 297 Audits.AuditLauncherView.AllCategoriesKey = '__AllCategories'; | 296 Audits.AuditLauncherView.AllCategoriesKey = '__AllCategories'; |
| OLD | NEW |