OLD | NEW |
1 <link rel="import" href="chrome://md-user-manager/profile_browser_proxy.html"> | |
2 <link rel="import" href="chrome://md-user-manager/shared_styles.html"> | 1 <link rel="import" href="chrome://md-user-manager/shared_styles.html"> |
3 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 2 <link rel="import" href="chrome://md-user-manager/user_manager_dialog.html"> |
4 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 3 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
5 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <link rel="import" href="chrome://resources/html/polymer.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | |
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> |
10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-lis
tbox.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-listbox/paper-lis
tbox.html"> |
11 | 9 |
12 <dom-module id="import-supervised-user"> | 10 <dom-module id="import-supervised-user"> |
13 <template> | 11 <template> |
14 <style include="shared-styles"> | 12 <style include="shared-styles"> |
15 :host { | 13 :host { |
16 --item-height: 52px; | 14 --item-height: 52px; |
17 --items-container-max-height: calc(var(--item-height) * 4); | 15 --items-container-max-height: calc(var(--item-height) * 4); |
18 } | 16 } |
19 | 17 |
20 #backdrop { | |
21 align-items: center; | |
22 background: rgba(255, 255, 255, 0.6); | |
23 bottom: 0; | |
24 display: flex; | |
25 justify-content: center; | |
26 left: 0; | |
27 position: absolute; | |
28 right: 0; | |
29 top: 0; | |
30 } | |
31 | |
32 #dialog { | |
33 background: white; | |
34 border-radius: 2px; | |
35 box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), | |
36 0 6px 30px 5px rgba(0, 0, 0, 0.12), | |
37 0 8px 10px -5px rgba(0, 0, 0, 0.4); | |
38 color: var(--primary-text-color); | |
39 width: 512px; | |
40 } | |
41 | |
42 #title-bar { | |
43 -webkit-padding-end: 6px; | |
44 -webkit-padding-start: 16px; | |
45 align-items: center; | |
46 border-bottom: 1px solid rgba(0, 0, 0, .12); | |
47 font-size: 16px; | |
48 padding-bottom: 6px; | |
49 padding-top: 6px; | |
50 } | |
51 | |
52 #title-bar paper-icon-button { | |
53 --paper-icon-button: { | |
54 padding: 10px; | |
55 }; | |
56 } | |
57 | |
58 #message { | 18 #message { |
59 padding: 20px 16px 16px; | 19 margin-bottom: 16px; |
| 20 margin-top: 20px; |
60 white-space: pre-wrap; | 21 white-space: pre-wrap; |
61 word-wrap: break-word; | 22 word-wrap: break-word; |
62 } | 23 } |
63 | 24 |
64 paper-listbox { | 25 paper-listbox { |
65 max-height: var(--items-container-max-height); | 26 max-height: var(--items-container-max-height); |
66 overflow: auto; | 27 overflow: auto; |
67 } | 28 } |
68 | 29 |
69 paper-listbox paper-item { | 30 paper-listbox paper-item { |
(...skipping 26 matching lines...) Expand all Loading... |
96 -webkit-margin-start: 10px; | 57 -webkit-margin-start: 10px; |
97 overflow: hidden; | 58 overflow: hidden; |
98 text-overflow: ellipsis; | 59 text-overflow: ellipsis; |
99 white-space: nowrap; | 60 white-space: nowrap; |
100 } | 61 } |
101 | 62 |
102 paper-listbox paper-item .on-device { | 63 paper-listbox paper-item .on-device { |
103 -webkit-margin-start: 10px; | 64 -webkit-margin-start: 10px; |
104 flex-shrink: 0; | 65 flex-shrink: 0; |
105 } | 66 } |
106 | |
107 #actions { | |
108 margin-top: 20px; | |
109 padding: 16px; | |
110 } | |
111 </style> | 67 </style> |
112 <template is="dom-if" if="[[!popupHidden_]]"> | 68 <user-manager-dialog id="dialog"> |
113 <div id="backdrop"> | 69 <div class="title">$i18n{supervisedUserImportTitle}</div> |
114 <div id="dialog"> | 70 <div class="body"> |
115 <div id="title-bar" class="horizontal justified layout"> | 71 <div id="message">[[getMessage_(supervisedUsers_)]]</div> |
116 <span id="title">$i18n{supervisedUserImportTitle}</span> | 72 <paper-listbox class="no-padding" selected="{{supervisedUserIndex_}}"> |
117 <paper-icon-button icon="cr:close" on-tap="onCancelTap_"> | 73 <template is="dom-repeat" items="[[supervisedUsers_]]"> |
118 </paper-icon-button> | 74 <paper-item disabled="[[item.onCurrentDevice]]"> |
119 </div> | 75 <img class="profile-img" src="[[item.iconURL]]"></img> |
120 <div id="message">[[getMessage_(supervisedUsers_)]]</div> | 76 <div class="profile-name">[[item.name]]</div> |
121 <paper-listbox selected="{{supervisedUserIndex_}}"> | 77 <div class="on-device" hidden="[[!item.onCurrentDevice]]"> |
122 <template is="dom-repeat" items="[[supervisedUsers_]]"> | 78 $i18n{supervisedUserAlreadyOnThisDevice} |
123 <paper-item disabled="[[item.onCurrentDevice]]"> | 79 </div> |
124 <img class="profile-img" src="[[item.iconURL]]"></img> | 80 </paper-item> |
125 <div class="profile-name">[[item.name]]</div> | 81 </template> |
126 <div class="on-device" hidden="[[!item.onCurrentDevice]]"> | 82 </paper-listbox> |
127 $i18n{supervisedUserAlreadyOnThisDevice} | |
128 </div> | |
129 </paper-item> | |
130 </template> | |
131 </paper-listbox> | |
132 <div id="actions" class="horizontal end-justified layout"> | |
133 <paper-button id="cancel" class="action secondary" | |
134 on-tap="onCancelTap_"> | |
135 $i18n{cancel} | |
136 </paper-button> | |
137 <paper-button id="import" class="action primary" | |
138 on-tap="onImportTap_" | |
139 disabled="[[isImportDisabled_(supervisedUserIndex_)]]"> | |
140 $i18n{supervisedUserImportOk} | |
141 </paper-button> | |
142 </div> | |
143 </div> | |
144 </div> | 83 </div> |
145 </template> | 84 <div class="footer horizontal end-justified layout"> |
| 85 <paper-button id="cancel" class="action secondary" dialog-dismiss> |
| 86 $i18n{cancel} |
| 87 </paper-button> |
| 88 <paper-button id="import" class="action primary" |
| 89 on-tap="onImportTap_" |
| 90 disabled="[[isImportDisabled_(supervisedUserIndex_)]]"> |
| 91 $i18n{supervisedUserImportOk} |
| 92 </paper-button> |
| 93 </div> |
| 94 </user-manager-dialog> |
146 </template> | 95 </template> |
147 <script src="chrome://md-user-manager/import_supervised_user.js"></script> | 96 <script src="chrome://md-user-manager/import_supervised_user.js"></script> |
148 </dom-module> | 97 </dom-module> |
OLD | NEW |