Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/html/polymer.html"> | 1 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action _menu.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action _menu.html"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 3 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html"> | 4 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_pref_in dicator.html"> |
| 5 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> | 5 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button.html"> |
| 8 <link rel="import" href="../i18n_setup.html"> | 8 <link rel="import" href="../i18n_setup.html"> |
| 9 <link rel="import" href="../icons.html"> | 9 <link rel="import" href="../icons.html"> |
| 10 <link rel="import" href="../route.html"> | 10 <link rel="import" href="../route.html"> |
| 11 <link rel="import" href="../settings_shared_css.html"> | 11 <link rel="import" href="../settings_shared_css.html"> |
| 12 <link rel="import" href="add_site_dialog.html"> | 12 <link rel="import" href="add_site_dialog.html"> |
| 13 <link rel="import" href="constants.html"> | 13 <link rel="import" href="constants.html"> |
| 14 <link rel="import" href="edit_exception_dialog.html"> | 14 <link rel="import" href="edit_exception_dialog.html"> |
| 15 <link rel="import" href="site_settings_behavior.html"> | 15 <link rel="import" href="site_settings_behavior.html"> |
| 16 <link rel="import" href="site_settings_prefs_browser_proxy.html"> | 16 <link rel="import" href="site_settings_prefs_browser_proxy.html"> |
| 17 | 17 |
| 18 <dom-module id="site-list"> | 18 <dom-module id="site-list"> |
| 19 <template> | 19 <template> |
| 20 <style include="settings-shared"> | 20 <style include="settings-shared"> |
| 21 paper-icon-button { | |
| 22 left: 8px; | |
| 23 right: 8px; | |
| 24 } | |
| 25 | |
| 26 .selectable { | 21 .selectable { |
| 27 -webkit-user-select: text; | 22 -webkit-user-select: text; |
| 28 } | 23 } |
| 29 </style> | 24 </style> |
| 30 <div id="category"> | 25 <div id="category"> |
| 31 <div class="settings-box first" hidden$="[[allSites]]"> | 26 <div class="settings-box first" hidden$="[[allSites]]"> |
| 32 <h2 class="start">[[categoryHeader]]</h2> | 27 <h2 class="start">[[categoryHeader]]</h2> |
| 33 <paper-button id="addSite" | 28 <paper-button id="addSite" |
| 34 class="secondary-button header-aligned-button" | 29 class="secondary-button header-aligned-button" |
| 35 hidden="[[readOnlyList]]" on-tap="onAddSiteTap_"> | 30 hidden="[[readOnlyList]]" on-tap="onAddSiteTap_"> |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 59 on-tap="onResetTap_"> | 54 on-tap="onResetTap_"> |
| 60 $i18n{siteSettingsActionReset} | 55 $i18n{siteSettingsActionReset} |
| 61 </button> | 56 </button> |
| 62 </dialog> | 57 </dialog> |
| 63 | 58 |
| 64 <div class="list-frame" hidden$="[[hasSites_(sites)]]"> | 59 <div class="list-frame" hidden$="[[hasSites_(sites)]]"> |
| 65 <div class="list-item secondary">$i18n{noSitesAdded}</div> | 60 <div class="list-item secondary">$i18n{noSitesAdded}</div> |
| 66 </div> | 61 </div> |
| 67 <div class="list-frame menu-content vertical-list" id="listContainer"> | 62 <div class="list-frame menu-content vertical-list" id="listContainer"> |
| 68 <template is="dom-repeat" items="[[sites]]"> | 63 <template is="dom-repeat" items="[[sites]]"> |
| 69 <div class="list-item" actionable$="[[enableSiteSettings_]]" | 64 <div class="list-item"> |
| 70 on-tap="onOriginTap_"> | 65 <div class="layout horizontal center flex" |
| 71 <div class="favicon-image" | 66 actionable$="[[enableSiteSettings_]]" on-tap="onOriginTap_"> |
| 72 style$="[[computeSiteIcon(item.origin)]]"> | 67 <div class="favicon-image" |
| 73 </div> | 68 style$="[[computeSiteIcon(item.origin)]]"> |
| 74 <div class="middle no-min-width"> | 69 </div> |
| 75 <div class="selectable text-elide">[[item.displayName]]</div> | 70 <div class="middle no-min-width"> |
| 71 <div class="selectable text-elide">[[item.displayName]]</div> | |
| 76 | 72 |
| 77 <!-- This div must not contain extra whitespace. --> | 73 <!-- This div must not contain extra whitespace. --> |
| 78 <div class="selectable secondary text-elide" id="siteDescription" | 74 <div class="selectable secondary text-elide" |
| 79 >[[computeSiteDescription_(item)]]</div> | 75 id="siteDescription">[[computeSiteDescription_(item)]]</div> |
| 76 </div> | |
| 77 <template is="dom-if" if="[[enableSiteSettings_]]"> | |
| 78 <div on-tap="onOriginTap_" actionable> | |
| 79 <button class="subpage-arrow" is="paper-icon-button-light" | |
| 80 aria-label$="[[item.displayName]]" | |
| 81 aria-describedby="siteDescription"></button> | |
| 82 </div> | |
| 83 <div class="secondary-action"></div> | |
|
tommycli
2017/04/24 21:40:55
Add comment to explain for future readers.
| |
| 84 </template> | |
| 80 </div> | 85 </div> |
| 81 <template is="dom-if" if="[[item.controlledBy]]"> | 86 <template is="dom-if" if="[[item.controlledBy]]"> |
| 82 <cr-policy-pref-indicator pref="[[item]]" | 87 <cr-policy-pref-indicator pref="[[item]]" |
| 83 icon-aria-label="[[label]]"> | 88 icon-aria-label="[[label]]"> |
| 84 </cr-policy-pref-indicator> | 89 </cr-policy-pref-indicator> |
| 85 </template> | 90 </template> |
| 86 | 91 |
| 87 <paper-icon-button id="resetSite" icon="cr:delete" | 92 <paper-icon-button id="resetSite" icon="cr:delete" |
| 88 hidden="[[isResetButtonHidden_( | 93 hidden="[[isResetButtonHidden_( |
| 89 item.enforcement, readOnlyList)]]" | 94 item.enforcement, readOnlyList)]]" |
| 90 on-tap="onResetButtonTap_" alt="$i18n{siteSettingsActionReset}"> | 95 on-tap="onResetButtonTap_" |
| 96 alt="$i18n{siteSettingsActionReset}"> | |
| 91 </paper-icon-button> | 97 </paper-icon-button> |
| 92 <paper-icon-button id="actionMenuButton" icon="cr:more-vert" | 98 <paper-icon-button id="actionMenuButton" icon="cr:more-vert" |
| 93 hidden="[[isActionMenuHidden_(item.enforcement, readOnlyList)]]" | 99 hidden= |
| 100 "[[isActionMenuHidden_(item.enforcement, readOnlyList)]]" | |
| 94 on-tap="onShowActionMenuTap_" title="$i18n{moreActions}"> | 101 on-tap="onShowActionMenuTap_" title="$i18n{moreActions}"> |
| 95 </paper-icon-button> | 102 </paper-icon-button> |
| 96 <template is="dom-if" if="[[enableSiteSettings_]]"> | |
| 97 <div on-tap="onOriginTap_" actionable> | |
| 98 <button class="subpage-arrow" is="paper-icon-button-light" | |
| 99 aria-label$="[[item.displayName]]" | |
| 100 aria-describedby="siteDescription"></button> | |
| 101 </div> | |
| 102 </template> | |
| 103 </div> | 103 </div> |
| 104 </template> | 104 </template> |
| 105 </div> | 105 </div> |
| 106 </div> | 106 </div> |
| 107 <template is="dom-if" if="[[showEditExceptionDialog_]]" restamp> | 107 <template is="dom-if" if="[[showEditExceptionDialog_]]" restamp> |
| 108 <settings-edit-exception-dialog model="[[actionMenuSite_]]" | 108 <settings-edit-exception-dialog model="[[actionMenuSite_]]" |
| 109 on-close="onEditExceptionDialogClosed_"> | 109 on-close="onEditExceptionDialogClosed_"> |
| 110 </settings-edit-exception-dialog> | 110 </settings-edit-exception-dialog> |
| 111 </template> | 111 </template> |
| 112 </template> | 112 </template> |
| 113 <script src="site_list.js"></script> | 113 <script src="site_list.js"></script> |
| 114 </dom-module> | 114 </dom-module> |
| OLD | NEW |