mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 13648: fix a bug in listView widget - $listView.length is 0 after calling $(window).trigger('cloudStack.fullRefresh'), calling $listView.listView will encounter an error when $listView.length is 0.
This commit is contained in:
parent
1dfe656f2a
commit
65d9b60d42
@ -2173,12 +2173,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2203,12 +2204,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2368,12 +2370,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2398,12 +2401,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2590,12 +2594,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2620,12 +2625,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2828,12 +2834,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2858,12 +2865,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2957,12 +2965,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2987,12 +2996,13 @@
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{
|
||||
jobId: jid
|
||||
jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$(window).trigger('cloudStack.fullRefresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
var $newRow;
|
||||
var jsonObj = $row.data('json-obj');
|
||||
|
||||
if($listView.length > 0 ) { //$listView.length is 0 after calling $(window).trigger('cloudStack.fullRefresh')
|
||||
$listView.listView('replaceItem', {
|
||||
$row: $row,
|
||||
data: $.extend(jsonObj, newData),
|
||||
@ -19,6 +20,7 @@
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Refresh detail view context
|
||||
$.extend(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user