File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed
Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff 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+
364379pimcore . 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 ( ) } ) ;
You can’t perform that action at this time.
0 commit comments