| <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/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> |
| <paper-button id="addSite" |
| class="secondary-button header-aligned-button" |
| hidden="[[readOnlyList]]" on-click="onAddSiteTap_"> |
| $i18n{add} |
| </paper-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 menu-content vertical-list" id="listContainer"> |
| <iron-list items="[[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> |