4 changed files with 67 additions and 2 deletions
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
/* |
||||
* Spreed WebRTC. |
||||
* Copyright (C) 2013-2014 struktur AG |
||||
* |
||||
* This file is part of Spreed WebRTC. |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as published by |
||||
* the Free Software Foundation, either version 3 of the License, or |
||||
* (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* |
||||
*/ |
||||
define(['jquery', 'underscore', 'text!partials/buddypictureupload.html'], function($, _, template) { |
||||
|
||||
// buddyPictureUpload
|
||||
return ["$compile", function($compile) { |
||||
|
||||
var controller = ['$scope', 'safeApply', '$timeout', '$q', function($scope, safeApply, $timeout, $q) { |
||||
|
||||
$scope.showUploadPicture = false; |
||||
|
||||
}]; |
||||
|
||||
var link = function($scope, $element) { |
||||
|
||||
$scope.canvasUpload = $element.find("canvas.uploadPrev").get(0); |
||||
$($scope.canvasUpload).attr($scope.captureSize); |
||||
|
||||
}; |
||||
|
||||
return { |
||||
restrict: 'E', |
||||
transclude: true, |
||||
replace: true, |
||||
template: template, |
||||
controller: controller, |
||||
link: link |
||||
}; |
||||
|
||||
}]; |
||||
|
||||
}); |
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
<div class="collapse" collapse="!showUploadPicture"> |
||||
<div class="buddyPictureUpload"> |
||||
<canvas class="uploadPrev hidden"></canvas> |
||||
<img class="preview" ng-class="{previewUpload: previewUpload}" ng-show="previewUpload" ng-src="{{previewUpload}}" /> |
||||
<p>Please choose a picture to upload</p> |
||||
<div><input type="file"></div> |
||||
<br> |
||||
</div> |
||||
<a class="btn btn-small btn-default" ng-click="showUploadPicture = false"> {{_('Cancel')}}</a> |
||||
<a class="btn btn-small btn-primary" ng-click="setAsProfilePicture()"> {{_('Set as Profile Picture')}}</a> |
||||
</div> |
Loading…
Reference in new issue