| OLD | NEW |
| 1 <link rel="import" href="chrome://resources/cr_elements/cr_expand_button/cr_expa
nd_button.html"> | |
| 2 <link rel="import" href="chrome://resources/cr_elements/network/cr_network_list.
html"> | 1 <link rel="import" href="chrome://resources/cr_elements/network/cr_network_list.
html"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/network/cr_network_list_
item.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/network/cr_network_list_
item.html"> |
| 4 <link rel="import" href="chrome://resources/html/action_link.html"> | |
| 5 <link rel="import" href="chrome://resources/html/action_link_css.html"> | |
| 6 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 3 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
| 7 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys-behavior
/iron-a11y-keys-behavior.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-keys-behavior
/iron-a11y-keys-behavior.html"> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll
apse.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll
apse.html"> |
| 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | |
| 11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button-light.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button-light.html"> |
| 12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spi
nner.html"> | |
| 13 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap
er-toggle-button.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-toggle-button/pap
er-toggle-button.html"> |
| 9 <link rel="import" href="../settings_page/settings_subpage.html"> |
| 14 <link rel="import" href="../settings_shared_css.html"> | 10 <link rel="import" href="../settings_shared_css.html"> |
| 15 <link rel="import" href="network_siminfo.html"> | 11 <link rel="import" href="network_siminfo.html"> |
| 16 | 12 |
| 17 <dom-module id="network-summary-item"> | 13 <dom-module id="network-summary-item"> |
| 18 <template> | 14 <template> |
| 19 <style include="settings-shared action-link"> | 15 <style include="settings-shared"> |
| 20 paper-spinner { | |
| 21 @apply(--cr-icon-height-width); | |
| 22 margin: 0 var(--settings-box-row-padding); | |
| 23 } | |
| 24 | |
| 25 network-siminfo { | 16 network-siminfo { |
| 26 padding: 0 var(--settings-box-row-padding); | 17 padding: 0 var(--settings-box-row-padding); |
| 27 } | 18 } |
| 28 | 19 |
| 29 .padded { | 20 .padded { |
| 30 @apply(--settings-list-frame-padding); | 21 @apply(--settings-list-frame-padding); |
| 31 } | 22 } |
| 32 | 23 |
| 33 #buttons { | |
| 34 align-items: center; | |
| 35 } | |
| 36 | |
| 37 #details { | 24 #details { |
| 38 align-items: center; | 25 align-items: center; |
| 39 display: flex; | 26 display: flex; |
| 40 flex: auto; | 27 flex: auto; |
| 41 } | 28 } |
| 42 | 29 |
| 43 #details[no-flex] { | 30 #details[no-flex] { |
| 44 flex: none; | 31 flex: none; |
| 45 } | 32 } |
| 46 | 33 |
| 47 #deviceEnabledButton { | |
| 48 -webkit-margin-start: 10px; | |
| 49 } | |
| 50 | |
| 51 #networkList { | 34 #networkList { |
| 52 margin: 5px 0 10px; | 35 margin: 5px 0 10px; |
| 53 max-height: 200px; | 36 max-height: 200px; |
| 54 min-height: 50px; | 37 min-height: 50px; |
| 55 } | 38 } |
| 56 </style> | 39 </style> |
| 57 <div class="settings-box two-line" actionable on-tap="onDetailsTap_"> | 40 <div actionable class="settings-box two-line" on-tap="onShowDetailsTap_"> |
| 58 <div id="details" | 41 <div id="details" |
| 59 no-flex$="[[showSimInfo_(deviceState)]]"> | 42 no-flex$="[[showSimInfo_(deviceState)]]"> |
| 60 <cr-network-list-item item="[[activeNetworkState]]" class="flex"> | 43 <cr-network-list-item item="[[activeNetworkState]]" class="flex"> |
| 61 </cr-network-list-item> | 44 </cr-network-list-item> |
| 62 <paper-spinner active="[[scanningIsActive_(deviceState, expanded_)]]" | |
| 63 hidden$="[[!scanningIsVisible_(deviceState)]]"> | |
| 64 </paper-spinner> | |
| 65 </div> | 45 </div> |
| 66 | 46 |
| 67 <template is="dom-if" if="[[showSimInfo_(deviceState)]]"> | 47 <template is="dom-if" if="[[showSimInfo_(deviceState)]]"> |
| 68 <network-siminfo editable class="flex" | 48 <network-siminfo editable class="flex" |
| 69 network-properties="[[getCellularState_(deviceState)]]" | 49 network-properties="[[getCellularState_(deviceState)]]" |
| 70 networking-private="[[networkingPrivate]]"> | 50 networking-private="[[networkingPrivate]]"> |
| 71 </network-siminfo> | 51 </network-siminfo> |
| 72 </template> | 52 </template> |
| 73 | 53 |
| 74 <div id="buttons" class="layout horizontal"> | 54 <template is="dom-if" if="[[showDetailsIsVisible_(deviceState)]]"> |
| 75 <template is="dom-if" | 55 <button class="subpage-arrow" is="paper-icon-button-light" |
| 76 if="[[expandIsVisible_(deviceState, networkStateList)]]"> | 56 aria-label="[[getDetailsA11yString_(activeNetworkState, |
| 77 <cr-expand-button id="expandListButton" expanded="{{expanded_}}"> | 57 deviceSate)]]"> |
| 78 </cr-expand-button> | 58 </button> |
| 79 </template> | 59 </template> |
| 80 <template is="dom-if" | |
| 81 if="[[showDetailsIsVisible_(deviceState, networkStateList)]]"> | |
| 82 <!-- TODO(dbeam): this needs an aria-label. Maybe | |
| 83 [[activeNetworkState.name]]? --> | |
| 84 <button class="subpage-arrow" is="paper-icon-button-light" | |
| 85 on-tap="onShowDetailsTap_"> | |
| 86 </button> | |
| 87 </template> | |
| 88 </div> | |
| 89 | 60 |
| 90 <template is="dom-if" if="[[enableToggleIsVisible_(deviceState)]]"> | 61 <template is="dom-if" if="[[enableToggleIsVisible_(deviceState)]]"> |
| 91 <div class="secondary-action"> | 62 <div class="secondary-action"> |
| 92 <paper-toggle-button id="deviceEnabledButton" | 63 <paper-toggle-button id="deviceEnabledButton" |
| 93 aria-label$="[[getToggleA11yString_(deviceState)]]" | 64 aria-label="[[getToggleA11yString_(deviceState)]]" |
| 94 checked="[[deviceIsEnabled_(deviceState)]]" | 65 checked="[[deviceIsEnabled_(deviceState)]]" |
| 95 enabled="[[enableToggleIsEnabled_(deviceState)]]" | 66 enabled="[[enableToggleIsEnabled_(deviceState)]]" |
| 96 on-tap="onDeviceEnabledTap_"> | 67 on-tap="onDeviceEnabledTap_"> |
| 97 </paper-toggle-button> | 68 </paper-toggle-button> |
| 98 </div> | 69 </div> |
| 99 </template> | 70 </template> |
| 100 | |
| 101 </div> | 71 </div> |
| 102 <template is="dom-if" | |
| 103 if="[[networksDomIfIsTrue_(expanded_, wasExpanded_)]]"> | |
| 104 <iron-collapse | |
| 105 opened="[[networksIronCollapseIsOpened_(expanded_, wasExpanded_)]]"> | |
| 106 <div class="layout vertical padded"> | |
| 107 <cr-network-list id="networkList" networks="[[networkStateList]]" | |
| 108 show-buttons> | |
| 109 </cr-network-list> | |
| 110 <template is="dom-if" | |
| 111 if="[[knownNetworksIsVisible_(activeNetworkState)]]"> | |
| 112 <div class="list-item"> | |
| 113 <a is="action-link" class="list-button" | |
| 114 on-tap="onKnownNetworksTap_"> | |
| 115 $i18n{knownNetworksButton} | |
| 116 </a> | |
| 117 </div> | |
| 118 </template> | |
| 119 </div> | |
| 120 </iron-collapse> | |
| 121 </template> | |
| 122 </template> | 72 </template> |
| 123 <script src="network_summary_item.js"></script> | 73 <script src="network_summary_item.js"></script> |
| 124 </dom-module> | 74 </dom-module> |
| OLD | NEW |