summaryrefslogtreecommitdiff
path: root/client/js
diff options
context:
space:
mode:
authorLoic GUEGAN <loic@Manzerbredes.home>2016-05-09 12:29:33 +0200
committerLoic GUEGAN <loic@Manzerbredes.home>2016-05-09 12:29:33 +0200
commitc5f4a11b1251a7dae6ae868c6d5ff519c34eab37 (patch)
tree4e19737fff2f21fcf458a57622239608159bd1cb /client/js
parent4bac0804184f7a11eb76b420a2325ce170e24985 (diff)
Correct bug
Diffstat (limited to 'client/js')
-rw-r--r--client/js/controllers/image/edit.js7
-rw-r--r--client/js/services/Image.js2
2 files changed, 6 insertions, 3 deletions
diff --git a/client/js/controllers/image/edit.js b/client/js/controllers/image/edit.js
index 120a697..776f88f 100644
--- a/client/js/controllers/image/edit.js
+++ b/client/js/controllers/image/edit.js
@@ -9,15 +9,18 @@ mainApp.controller('editImageCtrl', ['$scope', 'Image', 'Loading', 'Identity', '
$scope.image = image;
$scope.data = {};
$scope.data.id = image.id;
+ if (image.protected) {
+ $scope.data.protected = "true";
+ } else {
+ $scope.data.protected = "false";
+ }
$scope.data.name = image.name;
$scope.data.visibility = image.visibility;
- $scope.data.protected = image.protected;
$scope.axioms = axioms;
$('#editImageModal').modal('show');
});
- $scope.data = {};
$scope.applyEdition = function (id) {
Image.updateImage($scope.data, function () {
diff --git a/client/js/services/Image.js b/client/js/services/Image.js
index 6df5ff5..4dda425 100644
--- a/client/js/services/Image.js
+++ b/client/js/services/Image.js
@@ -5,7 +5,7 @@ mainApp.factory('Image', ['$http', 'Identity', function ($http, Identity) {
var data = {};
data.images = null; // Images
data.axioms = {};
- data.axioms.protected = [true, false];
+ data.axioms.protected = ["false", "true"];
data.axioms.visibility = ["public", "private"];
/**
* Parse uploadImage anwser