fix wrong message after subscription upload

since extjs5 Store.snapshot does not exist anymore,
we didnt remove filtered records

this lead to the fact, that the 'message' record did
not get removed and a "no subscription file" message
was shown directly after uploading a key

to get also the filtered records in the store
we use store.getData().getSource()

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2016-05-20 10:24:04 +02:00 committed by Dietmar Maurer
parent 685b7aa4c5
commit f51fdaa6a8

View File

@ -73,8 +73,12 @@ Ext.define('PVE.data.DiffStore', {
me.suspendEvents();
// getSource returns null if data is not filtered
// if it is filtered it returns all records
var allItems = me.getData().getSource() || me.getData();
// remove vanished items
(me.snapshot || me.data).each(function(olditem) {
allItems.each(function(olditem) {
var item = rstore.getById(olditem.getId());
if (!item) {
me.remove(olditem);