| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 2 <link rel="import" href="chrome://resources/html/assert.html"> | 2 <link rel="import" href="chrome://resources/html/assert.html"> |
| 3 <link rel="import" href="chrome://resources/html/polymer.html"> | 3 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll
apse.html"> |
| 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm
l"> |
| 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.h
tml"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele
ctor.html"> |
| 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-submen
u.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-ripple/paper-ripp
le.html"> | |
| 8 <link rel="import" href="../icons.html"> | 8 <link rel="import" href="../icons.html"> |
| 9 <link rel="import" href="../route.html"> | 9 <link rel="import" href="../route.html"> |
| 10 <link rel="import" href="../settings_shared_css.html"> | 10 <link rel="import" href="../settings_shared_css.html"> |
| 11 | 11 |
| 12 <dom-module id="settings-menu"> | 12 <dom-module id="settings-menu"> |
| 13 <template> | 13 <template> |
| 14 <style include="settings-shared"> | 14 <style include="settings-shared"> |
| 15 #about-menu[about-selected] { | 15 :host { |
| 16 display: block; |
| 17 margin-top: 8px; |
| 18 } |
| 19 |
| 20 a[href], |
| 21 #advancedButton { |
| 22 --cr-selectable-focus: { |
| 23 outline: auto 5px -webkit-focus-ring-color; |
| 24 }; |
| 25 -webkit-margin-end: 2px; /* Margin so selected outline is visible. */ |
| 26 -webkit-margin-start: 1px; |
| 27 -webkit-padding-start: 23px; /* 24px - 1px from margin for outline. */ |
| 28 color: var(--settings-nav-grey); |
| 29 display: flex; |
| 30 font-weight: 500; |
| 31 min-height: 20px; |
| 32 padding-bottom: 10px; |
| 33 padding-top: 10px; |
| 34 word-break: break-word; |
| 35 } |
| 36 |
| 37 a[href].iron-selected { |
| 16 color: var(--google-blue-700); | 38 color: var(--google-blue-700); |
| 17 } | 39 } |
| 18 | 40 |
| 19 iron-icon { | 41 iron-icon { |
| 20 --iron-icon-fill-color: var(--settings-nav-grey); | 42 --iron-icon-fill-color: var(--settings-nav-grey); |
| 21 -webkit-margin-end: 24px; | 43 -webkit-margin-end: 24px; |
| 44 vertical-align: top; |
| 22 } | 45 } |
| 23 | 46 |
| 24 .iron-selected:not(.menu-trigger) > iron-icon { | 47 .iron-selected > iron-icon { |
| 25 fill: var(--google-blue-700); | 48 fill: var(--google-blue-700); |
| 26 } | 49 } |
| 27 | 50 |
| 28 .menu-trigger span { | 51 #advancedButton { |
| 29 -webkit-margin-end: 16px; | 52 -webkit-padding-end: 0; |
| 53 background-color: unset; |
| 54 height: unset; |
| 55 margin-top: 8px; |
| 56 text-transform: none; |
| 57 } |
| 58 |
| 59 #advancedButton:focus { |
| 60 outline: none; |
| 61 } |
| 62 |
| 63 #advancedButton.keyboard-focus:focus { |
| 64 outline: auto 5px -webkit-focus-ring-color; |
| 65 } |
| 66 |
| 67 #advancedButton > span { |
| 30 flex: 1; | 68 flex: 1; |
| 31 } | 69 } |
| 32 | 70 |
| 33 paper-menu { | 71 #advancedButton > iron-icon { |
| 34 --paper-menu-selected-item: { | 72 -webkit-margin-end: 22px; /* 24px - 2px from margin for outline. */ |
| 35 font-weight: 500; | |
| 36 }; | |
| 37 --paper-menu-focused-item-after: { | |
| 38 background: none; | |
| 39 }; | |
| 40 color: var(--settings-nav-grey); | |
| 41 font-size: 100%; | |
| 42 padding: 0; | |
| 43 } | |
| 44 | |
| 45 div[data-path] { | |
| 46 @apply(--settings-actionable); | |
| 47 } | |
| 48 | |
| 49 #basicPage { | |
| 50 margin-top: 8px; | |
| 51 } | |
| 52 | |
| 53 .page-menu > div { | |
| 54 margin-top: 8px; | |
| 55 } | |
| 56 | |
| 57 .page-menu { | |
| 58 --paper-menu-selected-item: { | |
| 59 font-weight: 500; | |
| 60 }; | |
| 61 } | |
| 62 | |
| 63 paper-menu div { | |
| 64 position: relative; /* Needed for paper-ripple. */ | |
| 65 } | |
| 66 | |
| 67 paper-ripple { | |
| 68 color: var(--google-blue-700); | |
| 69 opacity: .5; | |
| 70 } | |
| 71 | |
| 72 .page-menu paper-menu { | |
| 73 --paper-menu-selected-item: { | |
| 74 color: var(--google-blue-700); | |
| 75 font-weight: 500; | |
| 76 }; | |
| 77 } | |
| 78 | |
| 79 .page-menu div { | |
| 80 -webkit-padding-start: 24px; | |
| 81 align-items: center; | |
| 82 display: flex; | |
| 83 font-size: 100%; | |
| 84 font-weight: 500; | |
| 85 min-height: 40px; | |
| 86 word-break: break-word; | |
| 87 } | |
| 88 | |
| 89 .page-menu div iron-icon { | |
| 90 flex-shrink: 0; | |
| 91 } | 73 } |
| 92 | 74 |
| 93 .separator { | 75 .separator { |
| 94 /* Per Alan@, this line is different from the other separator lines. */ | 76 /* Per Alan@, this line is different from the other separator lines. */ |
| 95 border-bottom: 1px solid rgba(0, 0, 0, 0.08); | 77 border-bottom: 1px solid rgba(0, 0, 0, 0.08); |
| 78 margin-bottom: 8px; |
| 96 margin-top: 8px; | 79 margin-top: 8px; |
| 97 } | 80 } |
| 98 </style> | 81 </style> |
| 99 <paper-menu name="root-menu"> | 82 <iron-selector id="topMenu" selectable="a" attr-for-selected="href" |
| 100 <div class="page-menu" id="basicPage"> | 83 on-iron-activate="onSelectorActivate_"> |
| 101 <paper-menu attr-for-selected="data-path" class="menu-content" | |
| 102 id="basicMenu" selected="[[currentRoute.path]]"> | |
| 103 <if expr="chromeos"> | 84 <if expr="chromeos"> |
| 104 <div data-path="/internet" on-tap="openPage_"> | 85 <a href="/internet"> |
| 105 <iron-icon icon="settings:network-wifi"></iron-icon> | 86 <iron-icon icon="settings:network-wifi"></iron-icon> |
| 106 $i18n{internetPageTitle} | 87 $i18n{internetPageTitle} |
| 107 </div> | 88 </a> |
| 108 <div data-path="/bluetooth" on-tap="openPage_"> | 89 <a href="/bluetooth"> |
| 109 <iron-icon icon="settings:bluetooth"></iron-icon> | 90 <iron-icon icon="settings:bluetooth"></iron-icon> |
| 110 $i18n{bluetoothPageTitle} | 91 $i18n{bluetoothPageTitle} |
| 111 </div> | 92 </a> |
| 112 </if> | 93 </if> |
| 113 <div id="people" data-path="/people" on-tap="openPage_" | 94 <a id="people" href="/people" hidden="[[!pageVisibility.people]]"> |
| 114 hidden="[[!pageVisibility.people]]"> | 95 <iron-icon icon="settings:people"></iron-icon> |
| 115 <iron-icon icon="settings:people"></iron-icon> | 96 $i18n{peoplePageTitle} |
| 116 $i18n{peoplePageTitle} | 97 </a> |
| 117 </div> | 98 <a href="/appearance" hidden="[[!pageVisibility.appearance]]"> |
| 118 <div data-path="/appearance" on-tap="openPage_" | 99 <iron-icon icon="settings:palette"></iron-icon> |
| 119 hidden="[[!pageVisibility.appearance]]"> | 100 $i18n{appearancePageTitle} |
| 120 <iron-icon icon="settings:palette"></iron-icon> | 101 </a> |
| 121 $i18n{appearancePageTitle} | |
| 122 </div> | |
| 123 <if expr="chromeos"> | 102 <if expr="chromeos"> |
| 124 <div data-path="/device" on-tap="openPage_"> | 103 <a href="/device"> |
| 125 <iron-icon icon="settings:laptop-chromebook"></iron-icon> | 104 <iron-icon icon="settings:laptop-chromebook"></iron-icon> |
| 126 $i18n{devicePageTitle} | 105 $i18n{devicePageTitle} |
| 127 </div> | 106 </a> |
| 128 </if> | 107 </if> |
| 129 <div data-path="/search" on-tap="openPage_"> | 108 <a href="/search"> |
| 130 <iron-icon icon="cr:search"></iron-icon> | 109 <iron-icon icon="cr:search"></iron-icon> |
| 131 $i18n{searchPageTitle} | 110 $i18n{searchPageTitle} |
| 132 </div> | 111 </a> |
| 133 <if expr="chromeos"> | 112 <if expr="chromeos"> |
| 134 <div data-path="/androidApps" on-tap="openPage_" | 113 <a href="/androidApps" hidden="[[!showAndroidApps]]"> |
| 135 hidden="[[!showAndroidApps]]"> | 114 <iron-icon icon="settings:android"></iron-icon> |
| 136 <iron-icon icon="settings:android"></iron-icon> | 115 $i18n{androidAppsPageTitle} |
| 137 $i18n{androidAppsPageTitle} | 116 </a> |
| 138 </div> | |
| 139 </if> | 117 </if> |
| 140 <if expr="not chromeos"> | 118 <if expr="not chromeos"> |
| 141 <div data-path="/defaultBrowser" on-tap="openPage_" | 119 <a href="/defaultBrowser" hidden="[[!pageVisibility.defaultBrowser]]"> |
| 142 hidden="[[!pageVisibility.defaultBrowser]]"> | 120 <iron-icon icon="settings:web"></iron-icon> |
| 143 <iron-icon icon="settings:web"></iron-icon> | 121 $i18n{defaultBrowser} |
| 144 $i18n{defaultBrowser} | 122 </a> |
| 145 </div> | |
| 146 </if> | 123 </if> |
| 147 <div data-path="/onStartup" on-tap="openPage_" | 124 <a href="/onStartup" hidden="[[!pageVisibility.onStartup]]"> |
| 148 hidden="[[!pageVisibility.onStartup]]"> | 125 <iron-icon icon="settings:power-settings-new"></iron-icon> |
| 149 <iron-icon icon="settings:power-settings-new"></iron-icon> | 126 $i18n{onStartup} |
| 150 $i18n{onStartup} | 127 </a> |
| 151 </div> | 128 <paper-button toggles id="advancedButton" |
| 152 </paper-menu> | 129 aria-active-attribute="aria-expanded" active="{{advancedOpened}}"> |
| 153 </div> | 130 <span>$i18n{advancedPageTitle}</span> |
| 154 <paper-submenu class="page-menu" id="advancedSubmenu" actionable | 131 <iron-icon icon="[[arrowState_(advancedOpened)]]"> |
| 155 opened="{{advancedOpened}}" | 132 </iron-icon></paper-button> |
| 156 hidden="[[!pageVisibility.advancedSettings]]"> | 133 <iron-collapse id="advancedSubmenu" opened="[[advancedOpened]]"> |
| 157 <div class="menu-trigger"> | 134 <iron-selector id="subMenu" selectable="a" attr-for-selected="href" |
| 158 <span>$i18n{advancedPageTitle}</span> | 135 on-iron-activate="onSelectorActivate_"> |
| 159 <iron-icon icon="[[arrowState_(advancedOpened)]]"></iron-icon> | |
| 160 <paper-ripple></paper-ripple> | |
| 161 </div> | |
| 162 <paper-menu attr-for-selected="data-path" class="menu-content" | |
| 163 id="advancedMenu" selected="[[currentRoute.path]]"> | |
| 164 <if expr="chromeos"> | 136 <if expr="chromeos"> |
| 165 <div data-path="/dateTime" on-tap="openPage_"> | 137 <a href="/dateTime"> |
| 166 <iron-icon icon="settings:access-time"></iron-icon> | 138 <iron-icon icon="settings:access-time"></iron-icon> |
| 167 $i18n{dateTimePageTitle} | 139 $i18n{dateTimePageTitle} |
| 168 </div> | 140 </a> |
| 169 </if> | 141 </if> |
| 170 <div data-path="/privacy" on-tap="openPage_"> | 142 <a href="/privacy"> |
| 171 <iron-icon icon="settings:security"></iron-icon> | 143 <iron-icon icon="settings:security"></iron-icon> |
| 172 $i18n{privacyPageTitle} | 144 $i18n{privacyPageTitle} |
| 173 </div> | 145 </a> |
| 174 <div data-path="/passwordsAndForms" on-tap="openPage_" | 146 <a href="/passwordsAndForms" |
| 175 hidden="[[!pageVisibility.passwordsAndForms]]"> | 147 hidden="[[!pageVisibility.passwordsAndForms]]"> |
| 176 <iron-icon icon="settings:assignment"></iron-icon> | 148 <iron-icon icon="settings:assignment"></iron-icon> |
| 177 $i18n{passwordsAndAutofillPageTitle} | 149 $i18n{passwordsAndAutofillPageTitle} |
| 178 </div> | 150 </a> |
| 179 <div data-path="/languages" on-tap="openPage_"> | 151 <a href="/languages"> |
| 180 <iron-icon icon="settings:language"></iron-icon> | 152 <iron-icon icon="settings:language"></iron-icon> |
| 181 $i18n{languagesPageTitle} | 153 $i18n{languagesPageTitle} |
| 182 </div> | 154 </a> |
| 183 <div data-path="/downloads" on-tap="openPage_"> | 155 <a href="/downloads"> |
| 184 <iron-icon icon="cr:file-download"></iron-icon> | 156 <iron-icon icon="cr:file-download"></iron-icon> |
| 185 $i18n{downloadsPageTitle} | 157 $i18n{downloadsPageTitle} |
| 186 </div> | 158 </a> |
| 187 <div data-path="/printing" on-tap="openPage_"> | 159 <a href="/printing"> |
| 188 <iron-icon icon="cr:print"></iron-icon> | 160 <iron-icon icon="cr:print"></iron-icon> |
| 189 $i18n{printingPageTitle} | 161 $i18n{printingPageTitle} |
| 190 </div> | 162 </a> |
| 191 <div data-path="/accessibility" on-tap="openPage_"> | 163 <a href="/accessibility"> |
| 192 <iron-icon icon="settings:accessibility"></iron-icon> | 164 <iron-icon icon="settings:accessibility"></iron-icon> |
| 193 $i18n{a11yPageTitle} | 165 $i18n{a11yPageTitle} |
| 194 </div> | 166 </a> |
| 195 <if expr="not chromeos"> | 167 <if expr="not chromeos"> |
| 196 <div data-path="/system" on-tap="openPage_"> | 168 <a href="/system"> |
| 197 <iron-icon icon="settings:build"></iron-icon> | 169 <iron-icon icon="settings:build"></iron-icon> |
| 198 $i18n{systemPageTitle} | 170 $i18n{systemPageTitle} |
| 199 </div> | 171 </a> |
| 200 </if> | 172 </if> |
| 201 <div data-path="/reset" on-tap="openPage_" | 173 <a href="/reset" hidden="[[!pageVisibility.reset]]"> |
| 202 hidden="[[!pageVisibility.reset]]"> | |
| 203 <iron-icon icon="settings:restore"></iron-icon> | 174 <iron-icon icon="settings:restore"></iron-icon> |
| 204 $i18n{resetPageTitle} | 175 $i18n{resetPageTitle} |
| 205 </div> | 176 </a> |
| 206 </paper-menu> | 177 </iron-selector> |
| 207 </paper-submenu> | 178 </iron-collapse> |
| 208 <div class="separator"></div> | 179 <div class="separator"></div> |
| 209 <paper-submenu class="page-menu"> | 180 <a id="about-menu" href="/help">$i18n{aboutPageTitle}</a> |
| 210 <div about-selected$="[[aboutSelected_]]" class="menu-trigger" | 181 </iron-selector> |
| 211 id="about-menu" on-tap="openPage_" data-path="/help"> | |
| 212 $i18n{aboutPageTitle} | |
| 213 </div> | |
| 214 </paper-submenu> | |
| 215 </paper-menu> | |
| 216 </template> | 182 </template> |
| 217 <script src="settings_menu.js"></script> | 183 <script src="settings_menu.js"></script> |
| 218 </dom-module> | 184 </dom-module> |
| OLD | NEW |