OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'site-list' shows a list of Allowed and Blocked sites for a given | 7 * 'site-list' shows a list of Allowed and Blocked sites for a given |
8 * category. | 8 * category. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 | 395 |
396 /** | 396 /** |
397 * A handler for selecting a site (by clicking on the origin). | 397 * A handler for selecting a site (by clicking on the origin). |
398 * @private | 398 * @private |
399 */ | 399 */ |
400 onOriginTap_: function(event) { | 400 onOriginTap_: function(event) { |
401 this.selectedSite = event.model.item; | 401 this.selectedSite = event.model.item; |
402 if (this.isPolicyControlled_(this.selectedSite.source)) | 402 if (this.isPolicyControlled_(this.selectedSite.source)) |
403 return; | 403 return; |
404 | 404 |
405 if (this.allSites) | 405 settings.navigateTo(settings.Route.SITE_SETTINGS_SITE_DETAILS); |
406 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL_DETAILS); | |
407 else | |
408 settings.navigateTo(this.computeCategoryDetailsRoute(this.category)); | |
409 }, | 406 }, |
410 | 407 |
411 /** | 408 /** |
412 * A handler for activating one of the menu action items. | 409 * A handler for activating one of the menu action items. |
413 * @param {!{model: !{item: !{origin: string}}, | 410 * @param {!{model: !{item: !{origin: string}}, |
414 * detail: !{selected: string}}} event | 411 * detail: !{selected: string}}} event |
415 * @private | 412 * @private |
416 */ | 413 */ |
417 onActionMenuIronActivate_: function(event) { | 414 onActionMenuIronActivate_: function(event) { |
418 var origin = event.model.item.origin; | 415 var origin = event.model.item.origin; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 // is redundant to also list all the sites that are blocked. | 476 // is redundant to also list all the sites that are blocked. |
480 if (this.isAllowList_()) | 477 if (this.isAllowList_()) |
481 return true; | 478 return true; |
482 | 479 |
483 if (this.isSessionOnlyList_()) | 480 if (this.isSessionOnlyList_()) |
484 return siteList.length > 0; | 481 return siteList.length > 0; |
485 | 482 |
486 return toggleState; | 483 return toggleState; |
487 }, | 484 }, |
488 }); | 485 }); |
OLD | NEW |