From 51b9c7650ccc23a16b0e9b0de85da209283dc66f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Dec 2020 14:42:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8B=AC=E7=AB=8B=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E4=B8=AD=E5=86=85=E5=AE=B9=E7=AE=A1=E7=90=86=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=90=8E=E6=9C=AA=E5=88=B7=E6=96=B0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- o2web/source/x_component_cms_Index/Newer.js | 19 ++++++++++++++++++- o2web/source/x_component_cms_Xform/Form.js | 6 ++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/o2web/source/x_component_cms_Index/Newer.js b/o2web/source/x_component_cms_Index/Newer.js index 9a7c0bc5f0..b902cf06c0 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 8d6e2c66d4..8749afb68b 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) -- GitLab