mirror of
https://github.com/portainer/portainer.git
synced 2025-08-04 13:25:26 +02:00
This commit is contained in:
parent
f1c458b147
commit
6f53d1a35a
2 changed files with 21 additions and 2 deletions
15
app/services/entityListService.js
Normal file
15
app/services/entityListService.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
angular.module('portainer.services')
|
||||
.factory('EntityListService', [function EntityListServiceFactory() {
|
||||
'use strict';
|
||||
return {
|
||||
rememberPreviousSelection: function(oldContainerList, model, onSelectCallback) {
|
||||
var oldModel = _.find(oldContainerList, function(item){
|
||||
return item.Id === model.Id;
|
||||
});
|
||||
if (oldModel && oldModel.Checked) {
|
||||
model.Checked = true;
|
||||
onSelectCallback(model);
|
||||
}
|
||||
}
|
||||
};
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue