Skip to content

Commit b45cfdc

Browse files
committed
bug 12352
-Don't refresh detail view after destroy action
1 parent 1d087cb commit b45cfdc

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

‎ui/scripts/ui/widgets/detailView.js‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
var _custom = $detailView.data('_custom');
9696
var customAction = action.action.custom;
9797
var noAdd = action.noAdd;
98+
var noRefresh = additional.noRefresh;
9899

99100
var updateTabContent = function(newData) {
100101
var $detailViewElems = $detailView.find('ul.ui-tabs-nav, .detail-group').remove();
@@ -139,8 +140,12 @@
139140

140141
// Success
141142
function(args) {
142-
$loading.remove();
143-
updateTabContent(args.data);
143+
$loading.remove();
144+
145+
if (!noRefresh) {
146+
updateTabContent(args.data);
147+
}
148+
144149
replaceListViewItem($detailView, args.data);
145150
},
146151

@@ -175,7 +180,10 @@
175180
function(args) {
176181
if ($detailView.is(':visible')) {
177182
$loading.remove();
178-
updateTabContent(args.data);
183+
184+
if (!noRefresh) {
185+
updateTabContent(args.data);
186+
}
179187
}
180188

181189
if (messages.complete) {
@@ -264,6 +272,7 @@
264272

265273
destroy: function($detailView, args) {
266274
uiActions.standard($detailView, args, {
275+
noRefresh: true,
267276
complete: function(args) {
268277
var $browser = $detailView.data('view-args').$browser;
269278
var $panel = $detailView.closest('.panel');

0 commit comments

Comments
 (0)