Skip to content

Commit

Permalink
(js) Restore cards selection after refresh
Browse files Browse the repository at this point in the history
Fixes #4809
  • Loading branch information
cgx committed Sep 30, 2019
1 parent bd9dfe6 commit fe92b4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions UI/WebServerResources/js/Contacts/AddressBook.service.js
Expand Up @@ -813,9 +813,11 @@
// Instanciate Card objects
_this.$cards = [];
angular.forEach(response.headers, function(data) {
var o = _.zipObject(headers, data);
var o = _.zipObject(headers, data), cardObject;
angular.extend(o, { pid: _this.id });
_this.$cards.push(new AddressBook.$Card(o));
cardObject = new AddressBook.$Card(o);
cardObject.selected = selectedCards.indexOf(cardObject.id) > -1; // Restore selection
_this.$cards.push(cardObject);
});
}
}
Expand Down

0 comments on commit fe92b4d

Please sign in to comment.