Skip to content

Commit bee5912

Browse files
committed
Try calling reload() instead of refresh()
1 parent b6e3f10 commit bee5912

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

public/js/pimcore/helpers.js

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,21 @@ pimcore.helpers.closeElement = function (id, type) {
361361
}
362362
};
363363

364+
pimcore.helpers.refreshElement = function () {
365+
var tabpanel = Ext.getCmp("pimcore_panel_tabs");
366+
var activeTab = tabpanel.getActiveTab();
367+
368+
if (activeTab) {
369+
// for document
370+
if (activeTab.initialConfig.document) {
371+
activeTab.initialConfig.document.reload();
372+
}
373+
else if (activeTab.initialConfig.object) {
374+
activeTab.initialConfig.object.reload();
375+
}
376+
}
377+
};
378+
364379
pimcore.helpers.getElementTypeByObject = function (object) {
365380
var type = null;
366381
if (object instanceof pimcore.document.document) {
@@ -723,20 +738,7 @@ pimcore.helpers.handleF5 = function (keyCode, e) {
723738

724739
e.stopEvent();
725740

726-
var tabpanel = Ext.getCmp("pimcore_panel_tabs");
727-
var activeTab = tabpanel.getActiveTab();
728-
729-
if (activeTab) {
730-
// for document
731-
if (activeTab.initialConfig.document) {
732-
activeTab.initialConfig.document.reload();
733-
return;
734-
}
735-
else if (activeTab.initialConfig.object) {
736-
activeTab.initialConfig.object.reload();
737-
return;
738-
}
739-
}
741+
pimcore.helpers.refreshElement();
740742

741743
var date = new Date();
742744
location.href = Routing.generate('pimcore_admin_index', {'_dc': date.getTime()});

0 commit comments

Comments
 (0)