mirror of https://github.com/portainer/portainer
Merge branch 'fix-113-images-view-delete' into internal
commit
fd1496df93
|
@ -71,15 +71,17 @@ function ($scope, $state, Config, Image, Messages) {
|
||||||
if (i.Checked) {
|
if (i.Checked) {
|
||||||
counter = counter + 1;
|
counter = counter + 1;
|
||||||
Image.remove({id: i.Id}, function (d) {
|
Image.remove({id: i.Id}, function (d) {
|
||||||
angular.forEach(d, function (resource) {
|
if (d[0].message) {
|
||||||
Messages.send("Image deleted", resource.Deleted);
|
$('#loadingViewSpinner').hide();
|
||||||
});
|
Messages.error("Unable to remove image", d[0].message);
|
||||||
var index = $scope.images.indexOf(i);
|
} else {
|
||||||
$scope.images.splice(index, 1);
|
Messages.send("Image deleted", i.Id);
|
||||||
|
var index = $scope.images.indexOf(i);
|
||||||
|
$scope.images.splice(index, 1);
|
||||||
|
}
|
||||||
complete();
|
complete();
|
||||||
}, function (e) {
|
}, function (e) {
|
||||||
Messages.error("Failure", e.data);
|
Messages.error("Unable to remove image", e.data);
|
||||||
$('#loadImagesSpinner').hide();
|
|
||||||
complete();
|
complete();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,11 +152,11 @@ module.exports = function (grunt) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
angular: {
|
angular: {
|
||||||
src: ['bower_components/angular/angular.min.js',
|
src: ['bower_components/angular/angular.js',
|
||||||
'bower_components/angular-sanitize/angular-sanitize.min.js',
|
'bower_components/angular-sanitize/angular-sanitize.min.js',
|
||||||
'bower_components/angular-cookies/angular-cookies.min.js',
|
'bower_components/angular-cookies/angular-cookies.min.js',
|
||||||
'bower_components/angular-ui-router/release/angular-ui-router.min.js',
|
'bower_components/angular-ui-router/release/angular-ui-router.min.js',
|
||||||
'bower_components/angular-resource/angular-resource.min.js',
|
'bower_components/angular-resource/angular-resource.js',
|
||||||
'bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js',
|
'bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js',
|
||||||
'bower_components/angular-ui-select/dist/select.min.js'],
|
'bower_components/angular-ui-select/dist/select.min.js'],
|
||||||
dest: '<%= distdir %>/js/angular.js'
|
dest: '<%= distdir %>/js/angular.js'
|
||||||
|
|
Loading…
Reference in New Issue