diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2018-04-12 13:56:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-12 13:56:49 +0200 |
commit | 69fd37d80b4f89c66bdb673fc7c0d5ad065a71c8 (patch) | |
tree | 858378b04dd915e5ea683f044b45631a47d871dc | |
parent | a88e2cb690a57b7875c4c2b177bbe7314e4d62da (diff) | |
parent | c150e09bd4c796631c430e5aaac3336165e13dc8 (diff) |
Merge pull request #541 from nextcloud/fix-issue-183
Fix issue 183
-rw-r--r-- | js/components/avatar/avatar_controller.js | 7 | ||||
-rw-r--r-- | templates/avatar.html | 11 |
2 files changed, 14 insertions, 4 deletions
diff --git a/js/components/avatar/avatar_controller.js b/js/components/avatar/avatar_controller.js index e8142534..04e4bf04 100644 --- a/js/components/avatar/avatar_controller.js +++ b/js/components/avatar/avatar_controller.js @@ -43,6 +43,13 @@ angular.module('contactsApp') $('avatar').toggleClass('maximized'); }; + ctrl.t = { + uploadNewPhoto : t('contacts', 'Upload new image'), + deletePhoto : t('contacts', 'Delete'), + closePhoto : t('contacts', 'Close'), + downloadPhoto : t('contacts', 'Download') + }; + // Quit avatar preview $('avatar').click(function() { $('avatar').removeClass('maximized'); diff --git a/templates/avatar.html b/templates/avatar.html index c09024ca..fd226c61 100644 --- a/templates/avatar.html +++ b/templates/avatar.html @@ -2,8 +2,11 @@ <img ng-show="contact.photo()!==undefined" class="contactdetails__logo avatar" id="contact-avatar" data-ng-src="{{contact.photo()}}" ng-click="ctrl.openPhoto()" /> <div class="avatar-options"> <input type="file" id="avatar-upload" class="hidden" accept="image/*" /> - <label for="avatar-upload" class="icon-upload-white"></label> - <div class="icon-delete-white" ng-show="contact.photo()!==undefined" ng-click="ctrl.removePhoto()"></div> - <div class="icon-fullscreen-white" ng-show="contact.photo()!==undefined" ng-click="ctrl.openPhoto()"></div> - <div class="icon-download-white" ng-show="contact.photo()!==undefined" ng-click="ctrl.downloadPhoto()"></div> + <label for="avatar-upload" class="icon-upload-white" tooltip-placement="top" uib-tooltip="{{ctrl.t.uploadNewPhoto}}" tooltip-append-to-body="true"></label> + <div class="icon-delete-white" ng-show="contact.photo()!==undefined" ng-click="ctrl.removePhoto()" + tooltip-placement="top" uib-tooltip="{{ctrl.t.deletePhoto}}" tooltip-append-to-body="true"></div> + <div class="icon-fullscreen-white" ng-show="contact.photo()!==undefined" ng-click="ctrl.openPhoto()" + tooltip-placement="top" uib-tooltip="{{ctrl.t.closePhoto}}" tooltip-append-to-body="true"></div> + <div class="icon-download-white" ng-show="contact.photo()!==undefined" ng-click="ctrl.downloadPhoto()" + tooltip-placement="top" uib-tooltip="{{ctrl.t.downloadPhoto}}" tooltip-append-to-body="true"></div> </div> |