diff --git a/o2web/source/x_component_cms_Index/Newer.js b/o2web/source/x_component_cms_Index/Newer.js index 9a7c0bc5f0f3f51adc98de75f58895c66938318b..b902cf06c047231229e4f35c4d453b3b982bc5a0 100644 --- a/o2web/source/x_component_cms_Index/Newer.js +++ b/o2web/source/x_component_cms_Index/Newer.js @@ -503,7 +503,24 @@ MWF.xApplication.cms.Index.Newer = new Class({ }; if( typeOf(this.options.autoSave) == "boolean" )options.autoSave = this.options.autoSave; if( typeOf(this.options.saveOnClose) == "boolean" )options.saveOnClose = this.options.saveOnClose; - this.app.desktop.openApplication(el, "cms.Document", options); + if( layout.inBrowser ){ + debugger; + if( !window.o2RefreshCMSView ){ + window.o2CreateCMSDocumentCount = ( window.o2CreateCMSDocumentCount || 0 ) + 1; + window.o2RefreshCMSView = function () { + try{ + if(_self.view && _self.view.reload )_self.view.reload(); + }catch (e) {} + if( window.o2CreateCMSDocumentCount )window.o2CreateCMSDocumentCount--; + if( !window.o2CreateCMSDocumentCount || window.o2CreateCMSDocumentCount<0 ){ + window.o2RefreshCMSView = null; + } + }.bind(this) + } + this.app.desktop.openApplication(el, "cms.Document", options); + }else{ + this.app.desktop.openApplication(el, "cms.Document", options); + } } }, _createProcessDocument:function(e){ diff --git a/o2web/source/x_component_cms_Xform/Form.js b/o2web/source/x_component_cms_Xform/Form.js index 8d6e2c66d47540b3403aad65b153e7f09ffe77e1..8749afb68b8d5e152b5e7fa02df4cc8e3d24e069 100644 --- a/o2web/source/x_component_cms_Xform/Form.js +++ b/o2web/source/x_component_cms_Xform/Form.js @@ -479,7 +479,13 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class({ } this.options.saveOnClose = false; } + debugger; if( layout.inBrowser ){ + try{ + if( window.opener && window.opener.o2RefreshCMSView ){ + window.opener.o2RefreshCMSView(); + } + }catch (e) {} window.setTimeout(function () { this.app.close(); }.bind(this), 1500)