blob: de095c0574eedfb3e0f7ecb12f7bf963bbffc670 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/html/assert.html">
<link rel="import" href="chrome://resources/html/cr/ui/focus_without_ink.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/cr_elements/cr_button/cr_button.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_indicator.html">
<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/html/list_property_update_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-tooltip/paper-tooltip.html">
<link rel="import" href="../i18n_setup.html">
<link rel="import" href="../settings_shared_css.html">
<link rel="import" href="add_site_dialog.html">
<link rel="import" href="constants.html">
<link rel="import" href="edit_exception_dialog.html">
<link rel="import" href="site_list_entry.html">
<link rel="import" href="site_settings_behavior.html">
<link rel="import" href="site_settings_prefs_browser_proxy.html">
<if expr="chromeos">
<link rel="import" href="../multidevice_page/multidevice_browser_proxy.html">
</if>
<dom-module id="site-list">
<template>
<style include="settings-shared">
paper-tooltip {
--paper-tooltip: var(--cr-tooltip);
}
</style>
<div id="category">
<div class="settings-box first">
<h2 class="start">[[categoryHeader]]</h2>
<cr-button id="addSite" class="header-aligned-button"
hidden$="[[!showAddSiteButton_]]" on-click="onAddSiteTap_">
$i18n{add}
</cr-button>
</div>
<cr-action-menu>
<button class="dropdown-item" id="allow"
on-click="onAllowTap_" hidden$="[[!showAllowAction_]]">
$i18n{siteSettingsActionAllow}
</button>
<button class="dropdown-item" id="block"
on-click="onBlockTap_" hidden$="[[!showBlockAction_]]">
$i18n{siteSettingsActionBlock}
</button>
<button class="dropdown-item" id="sessionOnly"
on-click="onSessionOnlyTap_"
hidden$="[[!showSessionOnlyActionForSite_(actionMenuSite_)]]">
$i18n{siteSettingsActionSessionOnly}
</button>
<button class="dropdown-item" id="edit"
on-click="onEditTap_">
$i18n{edit}
</button>
<button class="dropdown-item" id="reset"
on-click="onResetTap_">
$i18n{siteSettingsActionReset}
</button>
</cr-action-menu>
<div class="list-frame" hidden$="[[hasSites_(sites.*)]]">
<div class="list-item secondary">$i18n{noSitesAdded}</div>
</div>
<div class="list-frame"
hidden$="[[!showNoSearchResults_(searchFilter, sites.*)]]">
<div class="list-item secondary">$i18n{searchNoResults}</div>
</div>
<div class="list-frame menu-content vertical-list" id="listContainer">
<iron-list items="[[getFilteredSites_(searchFilter, sites.*)]]"
preserve-focus risk-selection>
<template>
<site-list-entry model="[[item]]" read-only-list="[[readOnlyList]]"
on-show-action-menu="onShowActionMenu_" tabindex$="[[tabIndex]]"
first$="[[!index]]" iron-list-tab-index="[[tabIndex]]"
last-focused="{{lastFocused_}}" list-blurred="{{listBlurred_}}"
on-show-tooltip="onShowTooltip_">
</site-list-entry>
</template>
</iron-list>
</div>
</div>
<paper-tooltip id="tooltip" fit-to-visible-bounds manual-mode
position="top">
[[tooltipText_]]
</paper-tooltip>
<template is="dom-if" if="[[showEditExceptionDialog_]]" restamp>
<settings-edit-exception-dialog model="[[actionMenuSite_]]"
on-close="onEditExceptionDialogClosed_">
</settings-edit-exception-dialog>
</template>
<template is="dom-if" if="[[showAddSiteDialog_]]" restamp>
<add-site-dialog has-incognito="[[hasIncognito_]]" category="[[category]]"
content-setting="[[categorySubtype]]"
on-close="onAddSiteDialogClosed_">
</add-site-dialog>
</template>
</template>
<script src="site_list.js"></script>
</dom-module>
|