summaryrefslogtreecommitdiff
path: root/client/js/controllers/image
diff options
context:
space:
mode:
authorLoic GUEGAN <loic@Manzerbredes.home>2016-04-20 09:10:02 +0200
committerLoic GUEGAN <loic@Manzerbredes.home>2016-04-20 09:10:02 +0200
commit7a587387aab354e8101dc04ee54c78ab4b036617 (patch)
tree3edaa3f4da03ad0999d258402ab4d4813c2494ce /client/js/controllers/image
parent5b5f526aa0cce998657c0c4569686ba356ddb77d (diff)
Debug
Diffstat (limited to 'client/js/controllers/image')
-rw-r--r--client/js/controllers/image/edit.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/client/js/controllers/image/edit.js b/client/js/controllers/image/edit.js
index bab4064..14c1949 100644
--- a/client/js/controllers/image/edit.js
+++ b/client/js/controllers/image/edit.js
@@ -5,10 +5,20 @@
*/
mainApp.controller('editImageCtrl', ['$scope', 'Image', 'Loading', 'Identity', 'upload', function ($scope, Image, Loading, Identity, upload)
{
- $scope.$on('editImageEvent', function (eventName, image,axioms) {
+ $scope.$on('editImageEvent', function (eventName, image, axioms) {
$scope.image = image;
- $scope.axioms=axioms;
+ $scope.axioms = axioms;
$('#editImageModal').modal('show');
console.log(image)
});
+ $scope.data = {};
+ $scope.data.visibility = "public";
+ $scope.data.protected = false;
+
+ $scope.updateImage = function (image) {
+ image.visibility = $scope.data.visibility;
+ image.protected = $scope.data.protected;
+ Image.updateImage(image, function(){});
+
+ };
}]);