OLD | NEW |
1 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 1 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
| 2 <link rel="import" href="chrome://resources/html/util.html"> |
2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/image-icons.
html"> | 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/image-icons.
html"> |
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h
tml"> | 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h
tml"> |
4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele
ctor.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele
ctor.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> |
7 <link rel="import" href="chrome://md-settings/people_page/camera.html"> | 8 <link rel="import" href="chrome://md-settings/people_page/camera.html"> |
8 <link rel="import" href="chrome://md-settings/people_page/change_picture_private
_api.html"> | 9 <link rel="import" href="chrome://md-settings/people_page/change_picture_private
_api.html"> |
9 | 10 |
10 <dom-module id="settings-change-picture"> | 11 <dom-module id="settings-change-picture"> |
11 <link rel="import" type="css" | 12 <link rel="import" type="css" |
12 href="chrome://md-settings/settings_shared.css"> | 13 href="chrome://md-settings/settings_shared.css"> |
13 <link rel="import" type="css" href="change_picture.css"> | 14 <link rel="import" type="css" href="change_picture.css"> |
14 <template> | 15 <template> |
15 <div id="container" class="settings-box"> | 16 <div id="container" class="settings-box"> |
16 <div id="availableIcons" class="start"> | 17 <div id="availableIcons" class="start"> |
17 <iron-selector id="selector" on-iron-activate="onImageActivate_" | 18 <iron-selector id="selector" on-iron-activate="onImageActivate_" |
18 selected-item="{{selectedItem_}}"> | 19 selected-item="{{selectedItem_}}"> |
19 <iron-icon id="cameraImage" data-type="camera" icon="image:camera-alt" | 20 <iron-icon id="cameraImage" data-type="camera" icon="image:camera-alt" |
20 alt="[[i18n('takePhoto')]]" hidden="[[!cameraPresent_]]"> | 21 i18n-values="alt:takePhoto" hidden="[[!cameraPresent_]]"> |
21 </iron-icon> | 22 </iron-icon> |
22 <iron-icon data-type="file" icon="folder" | 23 <iron-icon data-type="file" icon="folder" |
23 alt="[[i18n('chooseFile')]]"> | 24 i18n-values="alt:chooseFile"> |
24 </iron-icon> | 25 </iron-icon> |
25 <img id="profileImage" data-type="profile" | 26 <img id="profileImage" data-type="profile" |
26 src="[[profileImageUrl_]]" | 27 src="[[profileImageUrl_]]" i18n-values="alt:profilePhotoLoading"> |
27 alt="[[i18n('profilePhotoLoading')]]"> | |
28 <img id="oldImage" data-type="old" | 28 <img id="oldImage" data-type="old" |
29 src="[[oldImageUrl_]]" hidden="[[!oldImageUrl_]]"> | 29 src="[[oldImageUrl_]]" hidden="[[!oldImageUrl_]]"> |
30 <template is="dom-repeat" items="[[defaultImages_]]"> | 30 <template is="dom-repeat" items="[[defaultImages_]]"> |
31 <img data-type="default" data-default-image-index$="[[index]]" | 31 <img data-type="default" data-default-image-index$="[[index]]" |
32 src="[[item.url]]" alt="[[item.title]]"> | 32 src="[[item.url]]" alt="[[item.title]]"> |
33 </template> | 33 </template> |
34 </iron-selector> | 34 </iron-selector> |
35 <template is="dom-if" if="[[isAuthorCreditShown_(selectedItem_)]]"> | 35 <template is="dom-if" if="[[isAuthorCreditShown_(selectedItem_)]]"> |
36 <div id="authorCredit"> | 36 <div id="authorCredit"> |
37 [[i18n('authorCredit')]] | 37 [[i18n('authorCredit')]] |
38 [[getAuthorName_(selectedItem_, defaultImages_)]] | 38 [[getAuthorName_(selectedItem_, defaultImages_)]] |
39 <a href="[[getAuthorWebsite_(selectedItem_, defaultImages_)]]" | 39 <a href="[[getAuthorWebsite_(selectedItem_, defaultImages_)]]" |
40 target="_blank"> | 40 target="_blank"> |
41 [[getAuthorWebsite_(selectedItem_, defaultImages_)]] | 41 [[getAuthorWebsite_(selectedItem_, defaultImages_)]] |
42 </a> | 42 </a> |
43 </div> | 43 </div> |
44 </template> | 44 </template> |
45 </div> | 45 </div> |
46 <div id="previewPane"> | 46 <div id="previewPane"> |
47 <img i18n-values="alt:previewAltText" src="[[selectedItem_.src]]" | 47 <img i18n-values="alt:previewAltText" src="[[selectedItem_.src]]" |
48 hidden="[[isCameraActive_(cameraPresent_, selectedItem_)]]"> | 48 hidden="[[isPreviewImageHidden_(selectedItem_)]]"> |
49 <div id="discardControlBar" hidden="[[isDiscardHidden_(selectedItem_)]]"
> | 49 <div id="discardControlBar" hidden="[[isDiscardHidden_(selectedItem_)]]"
> |
50 <paper-icon-button id="discardOldImage" tabindex="2" icon="delete" | 50 <paper-icon-button id="discardOldImage" tabindex="0" icon="delete" |
51 i18n-values="title:discardPhoto" on-tap="onTapDiscardOldImage_"> | 51 i18n-values="title:discardPhoto" on-tap="onTapDiscardOldImage_"> |
52 </paper-icon-button> | 52 </paper-icon-button> |
53 </div> | 53 </div> |
54 <settings-camera | 54 <settings-camera |
55 camera-active="[[isCameraActive_(cameraPresent_, selectedItem_)]]" | 55 camera-active="[[isCameraActive_(cameraPresent_, selectedItem_)]]" |
56 on-phototaken="onPhotoTaken_"> | 56 on-phototaken="onPhotoTaken_"> |
57 </div> | 57 </div> |
58 </div> | 58 </div> |
59 </template> | 59 </template> |
60 <script src="change_picture.js"></script> | 60 <script src="change_picture.js"></script> |
61 </dom-module> | 61 </dom-module> |
OLD | NEW |