Add image name edition
This commit is contained in:
parent
c5e909da1b
commit
19d62a8cbf
3 changed files with 25 additions and 13 deletions
|
@ -63,11 +63,15 @@ mainApp.factory('Image', ['$http', 'Identity', function ($http, Identity) {
|
|||
* @returns {undefined}
|
||||
*/
|
||||
var updateImage = function (image, callback) {
|
||||
console.log(image)
|
||||
|
||||
|
||||
var result = $http.post('../server/index.php',
|
||||
$.param({"token": Identity.getToken(), "task": "image", 'action': 'updateImage', 'id': image.id, 'opt': image}));
|
||||
$.param({"token": Identity.getToken(), "task": "image", 'action': 'updateImage', 'id': image.id, 'opt': {'name': image.name}}));
|
||||
|
||||
// Wait and handle the response
|
||||
result.then(function (response) {
|
||||
console.log(response.data.Images)
|
||||
callback();
|
||||
}, function (response) {
|
||||
alert(response);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue