From c36ea6bc49975a3287272d9cbd5ff9dcac5d7651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E7=A5=A5=E7=86=A0?= Date: Wed, 25 May 2022 07:06:52 +0000 Subject: [PATCH] Merge branch 'fix/forum' into 'develop' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge of fix/forum 论坛增加匿名发帖、设置帖子编辑者、禁言功能,修复主题类别搜索问题 to develop See merge request o2oa/o2oa!658 (cherry picked from commit 8b3d706df82ebbae4c6ddc877f7c4960f7d2727c) eac5e9d6 forum bf0748a4 论坛修改 61505ebd 论坛 b9656072 api aee44754 论坛匿名发帖、修复按主体类别搜索问题、设置帖子编辑者、禁言 35dea40e 论坛 ead768ad 论坛添加禁言功能 ec0698ce 论坛添加禁言功能 f7899cf8 论坛修改 --- o2web/source/o2_core/o2/widget/O2Identity.js | 2 + .../o2_lib/mootools/mootools-1.6.0_all.js | 16 +- .../$Main/default/listItemRecommand.json | 2 +- .../$NaviMode/default/listItem.json | 2 +- .../$Setting/default/icon/mute.png | Bin 0 -> 1678 bytes .../$Setting/listItemMute.json | 103 ++++++++ .../x_component_Forum/ColumnTemplate.js | 4 +- o2web/source/x_component_Forum/Common.js | 48 +++- o2web/source/x_component_Forum/Main.js | 4 +- o2web/source/x_component_Forum/Setting.js | 247 ++++++++++++++++++ o2web/source/x_component_Forum/TopNode.js | 4 +- o2web/source/x_component_Forum/lp/en.js | 29 +- o2web/source/x_component_Forum/lp/zh-cn.js | 25 +- .../source/x_component_ForumCategory/Main.js | 4 +- .../$Main/default/css.wcss | 7 +- .../$Main/default/icon/action_person.png | Bin 0 -> 555 bytes .../default/listItemAnonymousSubject.json | 112 ++++++++ .../$Main/default/listItemReply.json | 4 +- .../$Main/default/listItemSatisfied.json | 4 +- .../$Main/default/listItemSubject.json | 4 +- .../default/listItemAnonymousSubject.json | 79 ++++++ .../$Mobile/default/listItemReply.json | 2 +- .../$Mobile/default/listItemSatisfied.json | 2 +- .../$Mobile/default/listItemSubject.json | 5 +- .../source/x_component_ForumDocument/Main.js | 136 +++++++++- .../x_component_ForumDocument/Mobile.js | 18 +- o2web/source/x_component_ForumPerson/Main.js | 42 ++- .../$Main/default/listItem.json | 10 +- o2web/source/x_component_ForumSearch/Main.js | 8 +- .../$Main/default/listItem.json | 8 +- .../$Main/default/listItemPrime.json | 8 +- .../$Main/default/listItemType.json | 8 +- o2web/source/x_component_ForumSection/Main.js | 8 +- o2web/source/x_component_Selector/Person.js | 4 + .../source/x_desktop/js/initialScriptText.js | 2 +- 35 files changed, 870 insertions(+), 91 deletions(-) create mode 100644 o2web/source/x_component_Forum/$Setting/default/icon/mute.png create mode 100644 o2web/source/x_component_Forum/$Setting/listItemMute.json create mode 100644 o2web/source/x_component_ForumDocument/$Main/default/icon/action_person.png create mode 100644 o2web/source/x_component_ForumDocument/$Main/default/listItemAnonymousSubject.json create mode 100644 o2web/source/x_component_ForumDocument/$Mobile/default/listItemAnonymousSubject.json diff --git a/o2web/source/o2_core/o2/widget/O2Identity.js b/o2web/source/o2_core/o2/widget/O2Identity.js index 299e5d65c3..9599f62276 100644 --- a/o2web/source/o2_core/o2/widget/O2Identity.js +++ b/o2web/source/o2_core/o2/widget/O2Identity.js @@ -49,6 +49,7 @@ o2.widget.O2Identity = new Class({ this.node.set("text", this.data.displayName || disply ); }, load: function(){ + this.fireEvent("queryLoad"); var style = ( layout.mobile && this.style.identityNode_mobile ) ? this.style.identityNode_mobile : this.style.identityNode; @@ -101,6 +102,7 @@ o2.widget.O2Identity = new Class({ }.bind(this) }); } + this.fireEvent("postLoad"); }, setEvent: function(){ if( this.open ){ diff --git a/o2web/source/o2_lib/mootools/mootools-1.6.0_all.js b/o2web/source/o2_lib/mootools/mootools-1.6.0_all.js index ecb890fa5f..cd78f72be7 100644 --- a/o2web/source/o2_lib/mootools/mootools-1.6.0_all.js +++ b/o2web/source/o2_lib/mootools/mootools-1.6.0_all.js @@ -6443,15 +6443,15 @@ var Request = this.Request = new Class({ if ((/*<1.4compat>*/this.options.user || /**/this.options.withCredentials) && 'withCredentials' in xhr) xhr.withCredentials = true; //modify by Tommy-- - if (Browser.name=="firefox"){ - if (this.options.async){ - if (isWithCredentials) xhr.withCredentials = true; - }else{ - xhr.setRequestHeader(o2.tokenName, Cookie.read(o2.tokenName)); - } - }else{ + // if (Browser.name=="firefox"){ + // if (this.options.async){ + // if (isWithCredentials) xhr.withCredentials = true; + // }else{ + // xhr.setRequestHeader(o2.tokenName, Cookie.read(o2.tokenName)); + // } + // }else{ if (isWithCredentials) xhr.withCredentials = true; - } + // } //----------------- xhr.onreadystatechange = this.onStateChange.bind(this); diff --git a/o2web/source/x_component_Forum/$Main/default/listItemRecommand.json b/o2web/source/x_component_Forum/$Main/default/listItemRecommand.json index 597158acbc..87ea4ab354 100644 --- a/o2web/source/x_component_Forum/$Main/default/listItemRecommand.json +++ b/o2web/source/x_component_Forum/$Main/default/listItemRecommand.json @@ -34,7 +34,7 @@ }, "creatorName" : { "value" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", - "event" : "mouseover^^function( node, ev ){ node.setStyles( this.css.documentItemNode_rcm_person_over ) }##mouseout^^function( node, ev ){ node.setStyles( this.css.documentItemNode_rcm_person )}##click^^function(){this.app.openPerson( this.data.creatorName ) }" + "event" : "mouseover^^function( node, ev ){ node.setStyles( this.css.documentItemNode_rcm_person_over ) }##mouseout^^function( node, ev ){ node.setStyles( this.css.documentItemNode_rcm_person )}##click^^function(){this.app.openPerson( this.data.creatorName, this.data ) }" }, "sectionName": { "value" : "function(d){ return d.sectionName.length > 8 ? d.sectionName.substr(0,8)+'...' : d.sectionName }", diff --git a/o2web/source/x_component_Forum/$NaviMode/default/listItem.json b/o2web/source/x_component_Forum/$NaviMode/default/listItem.json index d1e5cf33d0..08c058fff7 100644 --- a/o2web/source/x_component_Forum/$NaviMode/default/listItem.json +++ b/o2web/source/x_component_Forum/$NaviMode/default/listItem.json @@ -93,7 +93,7 @@ "title" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName ) }"}, + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }"}, "createTime" : { "value" : "function(d){ return MWFForum.getDateDiff( d.createTime ) }" } diff --git a/o2web/source/x_component_Forum/$Setting/default/icon/mute.png b/o2web/source/x_component_Forum/$Setting/default/icon/mute.png new file mode 100644 index 0000000000000000000000000000000000000000..fcb870e1d02a403056ab06175ace3734859588c8 GIT binary patch literal 1678 zcmV;9266d`P)Nhz6shYV#OCPh*ZTFF`_7<##$^jLhA*sjn`UH zDb*(N_t~B8WHM)WHuIe?yKz7G=ggV;=DYl7&dk}9bGo`Z(qW*(fC2**1sh2wrlzJ= zpx6uKcqZrp-+)7vN@W+v|Bpb%z{JGFW0RAUdnp$R?Z2V-6bhHlYj#NRc9Pvu$V5Sd z5Jb}h^Nt*n>S5%cDabpy8iHO!c`cC3t-VE(AfcC%vrkaO-Z*OO+L{>>*p!fK(<+ej z51rbR90FfK0*9NyCl`^6hqs9PSYvD(HXb^LORj>@eHCDc|iD48kvL>TLp`s zC9F^;mu)sNhNN^c2qy|T7CzgGm?|MBcZdlX;4(T))n7q%DW@7U=Fd_hiyQrw%jxHM zlWuJ`F^uBpx*^rI_C?)R#l~!6y1To_6yvFDib2?4S3$8cn;2r*rx;INQw+jrT?NI) z>}S4=qWpN2MbSdeXN@troHS<4LddaNfPb)HUwmi~a}T4q$SB|qMt<^%;kVL7R>3ke zS6lhYo-xdp)Wzyhjz1xVGA|;FCxA^4HGEqJewE- zd!Lak{aywi^!`kN%^DKVMZt&FNC-6<6EE!e{)Y=e?EMe>Z zM4K6GeuhnXOTtvLFC`Z()BJZ57;)!XM{K@>?L%7jQthY_BM#X$-cEI#s)x;YQ*~Qf zkEy>~>vF=@ci1v{_+2`wBqFbGXvzB01GaJiBNg6}*^n=~# zXFXZ~2EkS^3J!oH)uWtCy|gb#wONWDJIZE)$d#`e1&0H9(`pC^5h)^iqHlk1gwwlH zB23iTUPKQ4`@qgbJE5BN>npOYT92c%xl?^5j3D9xVRIGuG1Ip6U!_WdZw%wB zxpbZ*0eS7T6bbyvOvxq1#VL05W)8-B!A8hX`(5NBjT|3z#Ly;d%ERD#un}kwB$rj* znuCG!m>u%b#2=Kcq_)H1@Mcg;g7RYUD3Bc}M}{2vO&#&r4;kv~M?xmgyFk&EEjjvF zgZgv8t6;VwyH)yDjAliu z4Jis#>Q8mSQI?xDCnFRtac%yQdKt|7z(LTAZ1wF#%UD}uypBW@@Pk7^?qGd6%E=Sp z6kpGksb2;j2cnlE_5TBbg#kz@ZR<^m(CN4&`Bd7Ri1;s-}Sjdq?fbO!uBewnsg!Iz*&j`;f1%CZ#~^_q)%KREms&6qH> z*Qq$y@9WCc%g#0oVz(Rno!+z~%8OcIT_KK|_yJNGt}!*eNa1hlwt(o%($t>@wu4FF zmW#{^f%eR=`?A9iph5X2uYHGCPA$rI|0IzAkX{{jf}D@3y9#UrFNf{_okNV=8?>Cb zU#X9X zP;2fRmNM<-ensw8J_461g!DZ&VRlExFfU$7JXz15moCq_k5ePAb;jmSnLGiH7Y$;mHiS&&nA zt9|I+3;ZP{N=|L@jkdN)C5g&Irt82hU?n&m$j9sB;A8v?l}q Y0&K@75p1vtI{*Lx07*qoM6N<$f>D4GBLDyZ literal 0 HcmV?d00001 diff --git a/o2web/source/x_component_Forum/$Setting/listItemMute.json b/o2web/source/x_component_Forum/$Setting/listItemMute.json new file mode 100644 index 0000000000..6f45437de7 --- /dev/null +++ b/o2web/source/x_component_Forum/$Setting/listItemMute.json @@ -0,0 +1,103 @@ +{ + "viewSetting": { + "html": "
" + }, + "headSetting": { + "html": "" + }, + "documentSetting": { + "html": "", + "mouseoverStyles": "documentNode_over", + "action": "open" + }, + "items": [ + { + "name": "person", + "head": { + "html": "", + "width": "15%" + }, + "content": { + "html": "", + "items": { + "person" : { + "value": "function(d){ return d.person.split('@')[0] }" + } + } + } + }, + { + "name": "unmuteDate", + "head": { + "html": "", + "width": "15%" + }, + "content": { + "html": "", + "items": { + "unmuteDate" : {} + } + } + }, + { + "name": "reason", + "head": { + "html": "", + "width": "40%" + }, + "content": { + "html": "", + "items": { + "reason" : {} + } + } + }, + { + "name": "createTime", + "head": { + "html": "", + "width": "15%" + }, + "content": { + "html": "", + "items": { + "createTime" : {} + } + } + }, + { + //"access": "admin", + "head": { + "html": "", + "width": "15%" + }, + "content": { + "html": "" + + " " + + " " + + "", + "items": { + "action_edit": { + //"access": "admin", + "title": "edit", + "text": "edit", + "action": "action_edit", + "condition": "function( d ){ return MWF.AC.isBBSManager() }", + "styles": "documentActionNode", + "mouseoverStyles": "documentActionNode_over", + "mousedownStyles": "documentActionNode_down" + }, + "remove": { + "title": "unmute", + "text": "unmute", + "action": "unmute", + "condition": "function( d ){ return MWF.AC.isBBSManager() }", + "styles": "documentActionNode", + "mouseoverStyles": "documentActionNode_over", + "mousedownStyles": "documentActionNode_down" + } + } + } + } + ] +} \ No newline at end of file diff --git a/o2web/source/x_component_Forum/ColumnTemplate.js b/o2web/source/x_component_Forum/ColumnTemplate.js index ba7dd80dbc..5fbec3f5a8 100644 --- a/o2web/source/x_component_Forum/ColumnTemplate.js +++ b/o2web/source/x_component_Forum/ColumnTemplate.js @@ -285,8 +285,8 @@ MWF.xApplication.Forum.ColumnTemplate.Document = new Class({ } } }, - openPerson : function( userName ){ - MWFForum.openPersonCenter(userName) + openPerson : function( userName, data ){ + MWFForum.openPersonCenter(userName, data) }, createPersonNode : function( container, personName ){ var persons = typeOf(personName) === "array" ? personName : personName.split(","); diff --git a/o2web/source/x_component_Forum/Common.js b/o2web/source/x_component_Forum/Common.js index 4ec5278845..bb90ac0f2b 100644 --- a/o2web/source/x_component_Forum/Common.js +++ b/o2web/source/x_component_Forum/Common.js @@ -54,6 +54,44 @@ MWFForum.BBS_LOGO_NAME = "BBS_LOGO_NAME"; MWFForum.BBS_SUBJECT_TYPECATAGORY = "BBS_SUBJECT_TYPECATAGORY"; MWFForum.BBS_TITLE_TAIL = "BBS_TITLE_TAIL"; MWFForum.BBS_USE_NICKNAME = "BBS_USE_NICKNAME"; +MWFForum.BBS_ANONYMOUS_PERMISSION = "BBS_ANONYMOUS_PERMISSION"; + +MWFForum.enableAnonymousSubject = function(){ + return MWFForum.getSystemConfigValue( MWFForum.BBS_ANONYMOUS_PERMISSION ) === "YES"; +} + +MWFForum.isSubjectMuted = function( usecache ){ + if( usecache && o2.typeOf( MWFForum.isMuted ) === "boolean" ){ + return MWFForum.isMuted; + } + o2.Actions.load("x_bbs_assemble_control").ShutupAction.getShutup(function(json){ + debugger; + // json.data = { + // "id": "a13843ac-0700-4a94-b7d9-a85e6fca131b", + // "operator": "蔡祥熠@cxy@P", + // "person": "龚新民@91eed25b-8891-4ba6-b234-a70ed97c42ae@P", + // "unmuteDate": "2022-05-25", + // "reason": "888", + // "createTime": "2022-05-24 16:09:48", + // "updateTime": "2022-05-24 16:09:48" + // }; + var d = json.data || {}; + MWFForum.muteData = d; + if( d.unmuteDate && (new Date(d.unmuteDate + " 00:00:00") > new Date())){ + MWFForum.isMuted = true; + }else{ + MWFForum.isMuted = false; + } + }, null, false); + if( o2.typeOf( MWFForum.isMuted ) !== "boolean" ){ + MWFForum.isMuted = false; + } + return MWFForum.isMuted; +} + +MWFForum.isReplyMuted = function(){ + return MWFForum.isSubjectMuted( true ); +} MWFForum.isUseNickName = function(){ return MWFForum.getSystemConfigValue( MWFForum.BBS_USE_NICKNAME ) === "YES"; @@ -91,11 +129,19 @@ MWFForum.getLastReplyUserName = function(d){ return o2.name.cn( MWFForum.isUseNickName() ? (d.latestReplyUserNickName || d.latestReplyUser): d.latestReplyUser ); }; +MWFForum.isSubjectEditor = function(d){ + var dn = layout.desktop.session.user.distinguishedName; + return d.creatorName === dn || (d.editorList || []).contains(dn); +}; + MWFForum.getReplyCreatorName = function(d){ return o2.name.cn( MWFForum.isUseNickName() ? (d.nickName || d.creatorName): d.creatorName ); }; -MWFForum.openPersonCenter = function( userName ){ +MWFForum.openPersonCenter = function( userName, data ){ + if( data && ( data.anonymousSubject || data.anonymousReply ) ){ + return; + } if( MWFForum.isUseNickName() && userName!=="xadmin" ){ o2.Actions.load("x_organization_assemble_express").PersonAction.listObject( { personList : [userName]} diff --git a/o2web/source/x_component_Forum/Main.js b/o2web/source/x_component_Forum/Main.js index d302c1bc89..0307d898bb 100644 --- a/o2web/source/x_component_Forum/Main.js +++ b/o2web/source/x_component_Forum/Main.js @@ -318,8 +318,8 @@ MWF.xApplication.Forum.Main = new Class({ } return status; }, - openPerson : function( userName ){ - MWFForum.openPersonCenter( userName ); + openPerson : function( userName, data ){ + MWFForum.openPersonCenter( userName, data ); }, createPersonNode : function( container, personName ){ var persons = personName.split(","); diff --git a/o2web/source/x_component_Forum/Setting.js b/o2web/source/x_component_Forum/Setting.js index 9b613ac76b..a86c02c3f9 100644 --- a/o2web/source/x_component_Forum/Setting.js +++ b/o2web/source/x_component_Forum/Setting.js @@ -97,6 +97,12 @@ MWF.xApplication.Forum.Setting = new Class({ "icon" :"squared.png", "action" : "openSectionSetting", "enable": this.app.access.isAdmin() || permission.bbsAdmin || permission.bbsForumAdmin || permission.bbsSectionAdmin + }, + { + "title" : MWF.xApplication.Forum.LP.muteSettingFormTitle, + "icon" :"mute.png", + "action" : "openMuteSetting", + "enable": this.app.access.isAdmin() || permission.bbsAdmin } ].filter(function(data){ return data.enable; @@ -165,6 +171,15 @@ MWF.xApplication.Forum.Setting = new Class({ this.explorer = new MWF.xApplication.Forum.Setting.RoleSettingExplorer(this.contentDiv, this.app, this,{style:this.options.style}); this.explorer.load(); }, + openMuteSetting: function(){ + if( this.contentDiv )this.contentDiv.empty(); + if( this.explorer ){ + this.explorer.destroy(); + delete this.explorer; + } + this.explorer = new MWF.xApplication.Forum.Setting.MuteSettingExplorer(this.contentDiv, this.app, this,{style:this.options.style}); + this.explorer.load(); + }, openPermissionSetting: function(){ if( this.contentDiv )this.contentDiv.empty(); if( this.explorer ){ @@ -1737,6 +1752,238 @@ MWF.xApplication.Forum.Setting.SystemSettingForm = new Class({ +MWF.xApplication.Forum.Setting.MuteSettingExplorer = new Class({ + Extends: MWF.widget.Common, + Implements: [Options, Events], + options: { + "style": "default" + }, + initialize: function (container, app, parent, options) { + this.container = container; + this.parent = parent; + this.app = app; + this.css = this.parent.css; + this.lp = this.app.lp; + }, + load: function () { + this.container.empty(); + if( this.app.access.isAdmin() ){ + this.loadToolbar(); + } + this.loadView(); + }, + destroy : function(){ + if(this.resizeWindowFun)this.app.removeEvent("resize",this.resizeWindowFun); + this.view.destroy(); + }, + loadToolbar: function(){ + this.toolbar = new Element("div",{ + styles : this.css.toolbar + }).inject(this.container); + + this.createActionNode = new Element("div",{ + styles : this.css.toolbarActionNode, + text: this.lp.addMutePerson + }).inject(this.toolbar); + this.createActionNode.addEvent("click",function(){ + var form = new MWF.xApplication.Forum.Setting.MuteSettingForm(this, {}, { + onPostOk : function(){ + // this.app.access.getUserPermission(function () { + this.view.page = 0; + this.view.reload(); + // }.bind(this), true); + }.bind(this)}); + form.create(); + }.bind(this)); + + this.fileterNode = new Element("div",{ + styles : this.css.fileterNode + }).inject(this.toolbar); + }, + loadView : function(){ + this.viewContainer = Element("div",{ + "styles" : this.css.viewContainer + }).inject(this.container); + + this.resizeWindow(); + this.resizeWindowFun = this.resizeWindow.bind(this); + this.app.addEvent("resize", this.resizeWindowFun ); + + this.view = new MWF.xApplication.Forum.Setting.MuteSettingView( this.viewContainer, this.app, this, { + templateUrl : this.parent.path+"listItemMute.json", + scrollEnable : true + } ); + this.view.load(); + }, + resizeWindow: function(){ + var size = this.container.getSize(); + if( this.toolbar ){ + this.viewContainer.setStyles({"height":(size.y-65)+"px"}); + }else{ + this.viewContainer.setStyles({"height":(size.y)+"px"}); + } + } +}); + +MWF.xApplication.Forum.Setting.MuteSettingView = new Class({ + Extends: MWF.xApplication.Template.Explorer.ComplexView, + _createDocument: function(data){ + return new MWF.xApplication.Forum.Setting.MuteSettingDocument(this.viewNode, data, this.explorer, this); + }, + + _getCurrentPageData: function(callback, count){ + if (!count)count = 50; + if( !this.page ){ + this.page = 1; + }else{ + this.page ++; + } + o2.Actions.load("x_bbs_assemble_control").ShutupAction.listPaging(this.page, count, {}, function (json) { + if (callback)callback(json); + }.bind(this)) + }, + _removeDocument: function(documentData, all){ + o2.Actions.load("x_bbs_assemble_control").ShutupAction.delete(documentData.id, function(json){ + this.page = 0; + this.reload(); + this.app.notice(this.app.lp.unmuteSuccess, "success"); + }.bind(this)); + }, + _openDocument: function( documentData ){ + var form = new MWF.xApplication.Forum.Setting.MuteSettingForm(this, documentData, { + onPostOk : function(){ + debugger; + this.page = 0; + this.reload(); + }.bind(this) + }); + if( MWF.AC.isBBSManager() ){ + form.edit(); + }else{ + form.open(); + } + } + +}); + +MWF.xApplication.Forum.Setting.MuteSettingDocument = new Class({ + Extends: MWF.xApplication.Template.Explorer.ComplexDocument, + _queryCreateDocumentNode:function( itemData ){ + }, + _postCreateDocumentNode: function( itemNode, itemData ){ + + }, + unmute: function (e) { + var lp = this.lp || this.view.lp || this.app.lp; + var text = lp.unmuteDocument.replace(/{person}/g, this.data.person.split("@")[0]); + var _self = this; + this.node.setStyles(this.css.documentNode_remove); + this.readyRemove = true; + this.view.lockNodeStyle = true; + + this.app.confirm("warn", e, lp.unmuteTitle, text, 350, 120, function () { + _self.view._removeDocument(_self.data, false); + _self.view.lockNodeStyle = false; + this.close(); + }, function () { + _self.node.setStyles(_self.css.documentNode); + _self.readyRemove = false; + _self.view.lockNodeStyle = false; + this.close(); + }); + } +}); + +MWF.xApplication.Forum.Setting.MuteSettingForm = new Class({ + Extends: MPopupForm, + Implements: [Options, Events], + options: { + "style": "default", + "width": "600", + "height": "320", + "hasTop": true, + "hasIcon": false, + "hasTopIcon" : true, + "hasTopContent" : true, + "hasBottom": true, + "title": MWF.xApplication.Forum.LP.mute1SettingFormTitle, + "draggable": true, + "closeAction": true + }, + _createTableContent: function () { + var html = "" + + "" + + " " + + "" + + " " + + "" + + " " + + "" + + " " + + "" + + " " + + "
"+this.lp.unmuteDateNote+"
"; + this.formTableArea.set("html", html); + + MWF.xDesktop.requireApp("Template", "MForm", function () { + this.form = new MForm(this.formTableArea, this.data, { + style: "execution", + isEdited: this.isEdited || this.isNew, + itemTemplate: { + createTime: {text: this.lp.muteTime, type : "innerText", defaultValue: new Date().format("db") }, + person: {text: this.lp.mutePerson, type : "org", notEmpty: true, orgOptions: { + onPostLoadItem: function(item){ + if(item.data.nickName){ + item.textNode.set("text", item.data.name + "("+ item.data.nickName +")") + }else{ + item.textNode.set("text", item.data.name) + } + }, + onPostLoadItemSelected: function(item){ + if(item.data.nickName){ + item.textNode.set("text", item.data.name + "("+ item.data.nickName +")") + }else{ + item.textNode.set("text", item.data.name) + } + } + }, orgWidgetOptions: { + onPostLoad: function(){ + if(this.data.nickName){ + this.node.set("text", this.data.name + "("+ this.data.nickName +")") + }else{ + this.node.set("text", this.data.name) + } + } + } + }, + unmuteDate: {text: this.lp.unmuteDate, notEmpty: true, tType : "date", defaultValue: function(){ + return new Date().increment("day", 7).format("%Y-%m-%d"); + }, validRule: { + time: function(value, item){ + debugger; + if( new Date(value + " 00:00:00") < new Date() ){ + return false; + }else{ + return true; + } + } + }, validMessage:{ + time: this.lp.unmuteTimeUnvalid + } }, + reason: {text: this.lp.multReason, notEmpty: true, type : "textarea" } + } + }, this.app); + this.form.load(); + }.bind(this), true); + }, + _ok: function (data, callback) { + o2.Actions.load("x_bbs_assemble_control").ShutupAction.save( data, function(json){ + if( callback )callback(json); + this.fireEvent("postOk") + }.bind(this)); + } +}); + MWF.xApplication.Forum.Setting.SelectOrgForm = new Class({ Extends: MPopupForm, Implements: [Options, Events], diff --git a/o2web/source/x_component_Forum/TopNode.js b/o2web/source/x_component_Forum/TopNode.js index a8d55b3771..0ab0214c87 100644 --- a/o2web/source/x_component_Forum/TopNode.js +++ b/o2web/source/x_component_Forum/TopNode.js @@ -320,8 +320,8 @@ MWF.xApplication.Forum.TopNode = new Class({ }); } }, - openPerson : function( userName ){ - MWFForum.openPersonCenter( userName ); + openPerson : function( userName, data ){ + MWFForum.openPersonCenter( userName, data ); }, openLoginForm : function(){ MWF.require("MWF.xDesktop.Authentication", null, false); diff --git a/o2web/source/x_component_Forum/lp/en.js b/o2web/source/x_component_Forum/lp/en.js index 9f797b59ea..6fb7d9f488 100644 --- a/o2web/source/x_component_Forum/lp/en.js +++ b/o2web/source/x_component_Forum/lp/en.js @@ -140,6 +140,8 @@ MWF.xApplication.Forum.LP = { "subSectionCreateAble": "Allow the creation of subsections", "sectionStatus": "Status", "sectionStatusValue": "Enable, Disable", + "sectionGrade" : "Grade", + "sectionGradeValue" : "No,Yes", "sectionIcon": "Section Icon", "uploadIcon": "Upload local icon", "selectIcon": "Select Icon", @@ -175,6 +177,7 @@ MWF.xApplication.Forum.LP = { "subjectType": "Subject Type Option", "subjectTypeDefaultValue": "Discussion|News|News|Knowledge|Watering", "vote": "Vote", + "sectionApp" : "App Market", "typeCategoryDefaultValue": "Information|Question|Vote", "typeCatagory": "Theme Type Option", "typeCategorySelectValue": "Information|Question|Vote", @@ -182,6 +185,7 @@ MWF.xApplication.Forum.LP = { "summary": "Summary", "content": "Content", "createSubject": "Post", + "anonymousSubject" : "Post anonymously", "saveSubject": "Post", "selectCurrentDocumentFile": "Select Post Picture", "selectCloudFile": "Select Cloud File Picture", @@ -338,7 +342,28 @@ MWF.xApplication.Forum.LP = { "selectTargetSection": "Select the section to move to", "moveSuccess": "The post has been moved to {section}", - "poster": "Poster", - "replyAbbr": "reply" + "replyAbbr": "reply", + + "editPermissionFormTitle": "Set edit permission", + "editorSetting": "Editor", + "setEditorSuccess": "Set editing permission successfully!", + "setEditorFail": "Error setting editing permissions!", + + "muteSettingFormTitle": "Mute Management", + "addMutePerson": "Add Mute Person", + "mute1SettingFormTitle": "Mute Person Settings", + "mutePerson": "Mute Person", + "muteTime": "Mute Time", + "unmuteDate": "Unmute Date", + "unmuteDateNote": "Automatically unmute after expiration", + "unmute": "unmute", + "unmuteTitle": "Unmute Confirmation", + "unmuteDocument": "Are you sure you want to unmute:{person}?", + "multReason": "Mute Reason", + "unmuteSuccess": "Unmute Success!", + "unmuteTimeUnvalid": "Unblock date needs to be later than today", + "muteNote": "You have been muted to post and reply.", + "muteInfor": "Unblock Date: {unmuteDate}, Mute Reason: {reason}.", + "poster": "Poster" }; \ No newline at end of file diff --git a/o2web/source/x_component_Forum/lp/zh-cn.js b/o2web/source/x_component_Forum/lp/zh-cn.js index 7b519a00f5..f1e673b1cb 100644 --- a/o2web/source/x_component_Forum/lp/zh-cn.js +++ b/o2web/source/x_component_Forum/lp/zh-cn.js @@ -54,6 +54,7 @@ MWF.xApplication.Forum.LP = { "createSection" : "创建版块", "categoryFormTitle" : "分区设置", "sectionFormTitle" : "版块设置", + "muteSettingFormTitle": "禁言管理", "baseSetting" : "基本设置", "permissionSetting" : "权限设置", @@ -185,6 +186,7 @@ MWF.xApplication.Forum.LP = { "summary" : "摘要", "content" : "内容", "createSubject" : "发帖", + "anonymousSubject" : "匿名发帖", "saveSubject" : "发表帖子", "selectCurrentDocumentFile" : "选择帖子图片", "selectCloudFile" : "选择云文件图片", @@ -343,6 +345,27 @@ MWF.xApplication.Forum.LP = { "gradeNotice":"请评分后提交", "selectTargetSection" : "选择移动到的版块", - "moveSuccess": "帖子已经移动到{section}" + "moveSuccess": "帖子已经移动到{section}", + + "editPermissionFormTitle": "设置编辑权限", + "editorSetting": "编辑者", + "setEditorSuccess": "设置编辑权限成功!", + "setEditorFail": "设置编辑权限出错!", + + "addMutePerson": "添加禁言人员", + "mute1SettingFormTitle": "禁言人员设置", + "mutePerson": "禁言人员", + "muteTime": "禁言时间", + "unmuteDate": "解封日期", + "unmuteDateNote": "到期后自动解除禁言", + "unmute": "解除禁言", + "unmuteTitle": "解除禁言确认", + "unmuteDocument": "确定要解除禁言:{person}?", + "multReason": "禁言理由", + "unmuteSuccess": "解除禁言成功!", + "unmuteTimeUnvalid": "解封日期需要晚于今天", + "muteNote": "您被禁言了,无法发帖和回复。", + "muteInfor": "解封日期:{unmuteDate},禁言原因:{reason}。", + "poster": "发帖人" }; \ No newline at end of file diff --git a/o2web/source/x_component_ForumCategory/Main.js b/o2web/source/x_component_ForumCategory/Main.js index ced6daea9d..18037c1218 100644 --- a/o2web/source/x_component_ForumCategory/Main.js +++ b/o2web/source/x_component_ForumCategory/Main.js @@ -381,8 +381,8 @@ MWF.xApplication.ForumCategory.Main = new Class({ noteHidden : this.noteNodeHidden }; }, - openPerson : function( userName ){ - MWFForum.openPersonCenter( userName ); + openPerson : function( userName, data ){ + MWFForum.openPersonCenter( userName, data ); }, createPersonNode : function( container, personName ){ var persons = personName.split(","); diff --git a/o2web/source/x_component_ForumDocument/$Main/default/css.wcss b/o2web/source/x_component_ForumDocument/$Main/default/css.wcss index b01c41b28d..d54da56d4b 100644 --- a/o2web/source/x_component_ForumDocument/$Main/default/css.wcss +++ b/o2web/source/x_component_ForumDocument/$Main/default/css.wcss @@ -960,7 +960,7 @@ "formTopTextNodeTopSetting" : { "font-size": "16px", "float": "left", - "width" : "80px", + "width" : "100px", "overflow" : "hidden", "text-overflow" : "ellipsis", "white-space":"nowrap" @@ -1279,5 +1279,10 @@ }, "sidebarPrev_over" : { "opacity" : "1" + }, + "muteInfor": { + "padding": "15px 20px", + "font-size": "14px", + "color": "#999" } } \ No newline at end of file diff --git a/o2web/source/x_component_ForumDocument/$Main/default/icon/action_person.png b/o2web/source/x_component_ForumDocument/$Main/default/icon/action_person.png new file mode 100644 index 0000000000000000000000000000000000000000..4354388df79feffc8fc44b77772b1d1df572679a GIT binary patch literal 555 zcmV+`0@VG9P)Px$lZq%f>ZEiqr&th+ zap+Wf7mDDbgQHqd6mqRDeo>|1)S{pe?+#ogtrEpt{*Rp2n&i^_$LD>1@1OSz()P0M z=bWWFPU4_|gvjey8pWp<2Vb^((Ja_ra2C)z?IxiZ3Qzlm%uI7^4L&+i*}AdU3Lw~& zf)jzPa`{)rFYaFX7hi*OZg5UjZ+8S&MPtl~S!dv33bx(oDpV%A!K7U93;nlJaMle^ zS&DnzV2L?WzMOfMf)Ba#o3~(lB#^#!Y7T45m0iz^hvO8S2(}j-5z)th^tL1*s|_}? zbI#yG$8INLZnCmZd#ot|hMP?!?^gNc{2OQJM@KkU3a%;jhCs9xl#e2fu?G0nqP5=; z@8+ETSBdA(sPbM|6ySP?T5ECL?6rDy5#TpN;{cX{slP8fI~S36qXSe~z-pqlUmy8} z{^Pb6%|gsfxiFAyAMH~3Qz$QBd*K5BCp&eR{sxED`3I2u4L@DHb!jfqJIw tWUjPaRk!W3y>MDYKKX^r&7|(c`x`~1%7F#y%Dn&p002ovPDHLkV1fqq1yTS2 literal 0 HcmV?d00001 diff --git a/o2web/source/x_component_ForumDocument/$Main/default/listItemAnonymousSubject.json b/o2web/source/x_component_ForumDocument/$Main/default/listItemAnonymousSubject.json new file mode 100644 index 0000000000..a0b6668745 --- /dev/null +++ b/o2web/source/x_component_ForumDocument/$Main/default/listItemAnonymousSubject.json @@ -0,0 +1,112 @@ +{ + "viewSetting": { + "html": "
" + }, + "documentSetting": { + "html": "
", + "action": "open" + }, + "items": [ + { + "name": "subjectContent", + "content": { + "html": "
"+ + "
"+ + //"
"+ + "
"+ + "
"+ + "
"+ + "
"+ + " "+ + "
"+ + "
"+ + "
"+ +// "
"+ + "
"+ + "
"+ + "
"+ + //"
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
" + + "
"+ + " "+ + " "+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
", + "items": { + "isPrime" : { + "value": "", + "attr" : "title^^function( d ){ if( d.isCreamSubject ){ return (d.screamSetterName || '').split('@')[0] + this.lp.at + d.screamSetterTime + this.lp.setPrime } }", + "show": "function( d ){ return d.isCreamSubject ? true : false }" + }, + "creatorName" : { + "value" : "function( d ){ return MWFForum.getSubjectCreatorName(d); }", + "title" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", + "styles" : "person", + "mouseoverStyles": "person_over", + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }" + }, + "subject": {}, + "reply" : {}, + "accessed": {}, + "prime": {}, + "todaySubject": {}, + "todayReply": {}, + "createTime" : { "value" : "function( d ){ return MWFForum.getDateDiff2( d.createTime || d.updateTime )}" , + "title" : "function( d ){ return d.createTime || d.updateTime }" }, + "summaryContainer" : { + "value": "", + "show": "function( d ){ return ( d.summary && d.summary!='' ) ? true : false }" + }, + "signatureContainer" : { + "value": "", + "show": "function( d ){ return ( d.signature && d.signature!='' ) ? true : false }" + }, + "signature" : {}, + "summaryLabel" : { "value" : "function(d){ return ( d.summary && d.summary!='' ) ? (this.lp.summary + ':' ): '' }" }, + "summary" : { }, +// "content": { "type" : "html" }, + "remove" : { "action" : "remove" }, + "userIcon" : { + "value": "", + "attr" : "src^^function( d ){ if( d.userIcon ){ return d.userIcon }else{ return '../x_component_ForumDocument/$Main/default/icon/noavatar_big.gif' } }" + }, + //"index" : { "value" : "function(d){ return d.index + 1 }" }, + "messageAction": { + "text" : "sendMessage", + "action": "sendMessage", + "condition": "function( d ){ return d.creatorName != this.app.userName && !this.app.access.isAnonymous() && !this.app.inBrowser }", + "event" : "mouseover^^function( itemNode, ev ){ itemNode.setStyles( this.css.messageAction_over ) }##mouseout^^function( itemNode, ev ){ itemNode.setStyles( this.css.messageAction ) }" + }, + "replyAction": { + "text" : "reply", + "condition": "function( d ){ return !d.stopReply && this.explorer.isReplyPublisher && !MWFForum.isReplyMuted() }", + "action": "createReply", + "event" : "mouseover^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction_over ) }##mouseout^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction ) }" + } + } + } + } + ] +} \ No newline at end of file diff --git a/o2web/source/x_component_ForumDocument/$Main/default/listItemReply.json b/o2web/source/x_component_ForumDocument/$Main/default/listItemReply.json index 813519bcfc..74919c86cc 100644 --- a/o2web/source/x_component_ForumDocument/$Main/default/listItemReply.json +++ b/o2web/source/x_component_ForumDocument/$Main/default/listItemReply.json @@ -76,7 +76,7 @@ "title" : "function( d ){ return MWFForum.getReplyCreatorName(d); }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName ) }" + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }" }, // "subject": { "value" : "function(d){ return 8 }" }, // "reply" : { "value" : "function(d){ return 66 }"}, @@ -104,7 +104,7 @@ "replyAction": { "text" : "reply", "action": "createReply", - "condition": "function( d ){ return !d.stopReply && this.explorer.isReplyPublisher }", + "condition": "function( d ){ return !d.stopReply && this.explorer.isReplyPublisher && !MWFForum.isReplyMuted() }", "event" : "mouseover^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction_over ) }##mouseout^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction ) }" }, "editAction": { diff --git a/o2web/source/x_component_ForumDocument/$Main/default/listItemSatisfied.json b/o2web/source/x_component_ForumDocument/$Main/default/listItemSatisfied.json index 1eed5c3310..fa246f1a9e 100644 --- a/o2web/source/x_component_ForumDocument/$Main/default/listItemSatisfied.json +++ b/o2web/source/x_component_ForumDocument/$Main/default/listItemSatisfied.json @@ -80,7 +80,7 @@ "title" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName ) }" + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }" }, // "subject": { "value" : "function(d){ return 8 }" }, // "reply" : { "value" : "function(d){ return 66 }"}, @@ -108,7 +108,7 @@ "replyAction": { "text" : "reply", "action": "createReply", - "condition": "function( d ){ return !d.stopReply && this.explorer.isReplyPublisher }", + "condition": "function( d ){ return !d.stopReply && this.explorer.isReplyPublisher && !MWFForum.isReplyMuted() }", "event" : "mouseover^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction_over ) }##mouseout^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction ) }" }, "editAction": { diff --git a/o2web/source/x_component_ForumDocument/$Main/default/listItemSubject.json b/o2web/source/x_component_ForumDocument/$Main/default/listItemSubject.json index 0984e7c3d2..b5c88c952f 100644 --- a/o2web/source/x_component_ForumDocument/$Main/default/listItemSubject.json +++ b/o2web/source/x_component_ForumDocument/$Main/default/listItemSubject.json @@ -91,7 +91,7 @@ "title" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName ) }" + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }" }, "subject": {}, "reply" : {}, @@ -127,7 +127,7 @@ }, "replyAction": { "text" : "reply", - "condition": "function( d ){ return !d.stopReply && this.explorer.isReplyPublisher }", + "condition": "function( d ){ return !d.stopReply && this.explorer.isReplyPublisher && !MWFForum.isReplyMuted() }", "action": "createReply", "event" : "mouseover^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction_over ) }##mouseout^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction ) }" } diff --git a/o2web/source/x_component_ForumDocument/$Mobile/default/listItemAnonymousSubject.json b/o2web/source/x_component_ForumDocument/$Mobile/default/listItemAnonymousSubject.json new file mode 100644 index 0000000000..0145550105 --- /dev/null +++ b/o2web/source/x_component_ForumDocument/$Mobile/default/listItemAnonymousSubject.json @@ -0,0 +1,79 @@ +{ + "viewSetting": { + "html": "
" + }, + "documentSetting": { + "html": "
", + "action": "open" + }, + "items": [ + { + "name": "subjectContent", + "content": { + "html": "
"+ + "
"+ + "
"+ + "
"+ + " "+ + "
"+ + "
"+ + "
"+ + "
"+ + " "+MWF.xApplication.Forum.LP.poster+""+ + " "+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + " "+ + " "+ + "
"+ + "
"+ + "
"+ + "
"+ + "
"+ + "
", + "items": { + "isPrime" : { + "value": "", + "attr" : "title^^function( d ){ if( d.isCreamSubject ){ return d.screamSetterName + this.lp.at + d.screamSetterTime + this.lp.setPrime } }", + "show": "function( d ){ return d.isCreamSubject ? true : false }" + }, + "creatorName" : { + "value": "function( d ){ return MWFForum.getSubjectCreatorName(d) }" + }, + "createTime" : { "value" : "function( d ){ return MWFForum.getDateDiff2( d.createTime || d.updateTime )}" , "title" : "function( d ){ return d.createTime || d.updateTime }" }, + "summaryContainer" : { + "value": "", + "show": "function( d ){ return ( d.summary && d.summary!='' ) ? true : false }" + }, + "summaryLabel" : { "value" : "function(d){ return ( d.summary && d.summary!='' ) ? (this.lp.summary + ':' ): '' }" }, + "summary" : { }, +// "content": { "type" : "html" }, + "remove" : { "action" : "remove" }, + "replyTotal" : { + "value": "function( d ){ return ( d.replyTotal + MWF.xApplication.Forum.LP.replyAbbr ) || '' }" + }, + "userIcon" : { + "value": "", + "attr" : "src^^function( d ){ return this.explorer.getUserIcon( d.creatorName, true ) }" + }, + "replyAction": { + "text" : "reply", + "condition": "function( d ){ return !d.stopReply && !MWFForum.isReplyMuted() }", + //"condition": "function( d ){ return this.explorer.isReplyPublisher }", + "action": "createReply", + "event" : "mouseover^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction_over ) }##mouseout^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction ) }" + } + } + } + } + ] +} \ No newline at end of file diff --git a/o2web/source/x_component_ForumDocument/$Mobile/default/listItemReply.json b/o2web/source/x_component_ForumDocument/$Mobile/default/listItemReply.json index 22a801d257..6154d4bf75 100644 --- a/o2web/source/x_component_ForumDocument/$Mobile/default/listItemReply.json +++ b/o2web/source/x_component_ForumDocument/$Mobile/default/listItemReply.json @@ -61,7 +61,7 @@ "index" : { "value" : "function(d){ return d.orderNumber || (d.index + 2) }" }, "replyAction": { "action": "createReply", - "condition": "function( d ){ return this.explorer.permission.replyPublishAble }" + "condition": "function( d ){ return this.explorer.permission.replyPublishAble && !MWFForum.isReplyMuted() }" } } } diff --git a/o2web/source/x_component_ForumDocument/$Mobile/default/listItemSatisfied.json b/o2web/source/x_component_ForumDocument/$Mobile/default/listItemSatisfied.json index 5b06c1211c..4bb7014deb 100644 --- a/o2web/source/x_component_ForumDocument/$Mobile/default/listItemSatisfied.json +++ b/o2web/source/x_component_ForumDocument/$Mobile/default/listItemSatisfied.json @@ -61,7 +61,7 @@ "index" : { "value" : "function(d){ return d.orderNumber || (d.index + 2) }" }, "replyAction": { "action": "createReply", - "condition": "function( d ){ return this.explorer.permission.replyPublishAble }" + "condition": "function( d ){ return this.explorer.permission.replyPublishAble && !MWFForum.isReplyMuted() }" } } } diff --git a/o2web/source/x_component_ForumDocument/$Mobile/default/listItemSubject.json b/o2web/source/x_component_ForumDocument/$Mobile/default/listItemSubject.json index 2412230629..0145550105 100644 --- a/o2web/source/x_component_ForumDocument/$Mobile/default/listItemSubject.json +++ b/o2web/source/x_component_ForumDocument/$Mobile/default/listItemSubject.json @@ -59,14 +59,15 @@ // "content": { "type" : "html" }, "remove" : { "action" : "remove" }, "replyTotal" : { - "value": "function( d ){ return d.replyTotal + MWF.xApplication.Forum.LP.replyAbbr }" + "value": "function( d ){ return ( d.replyTotal + MWF.xApplication.Forum.LP.replyAbbr ) || '' }" }, "userIcon" : { "value": "", - "attr" : "src^^function( d ){ return this.explorer.getUserIcon( d.creatorName ) }" + "attr" : "src^^function( d ){ return this.explorer.getUserIcon( d.creatorName, true ) }" }, "replyAction": { "text" : "reply", + "condition": "function( d ){ return !d.stopReply && !MWFForum.isReplyMuted() }", //"condition": "function( d ){ return this.explorer.isReplyPublisher }", "action": "createReply", "event" : "mouseover^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction_over ) }##mouseout^^function( itemNode, ev ){ itemNode.setStyles( this.css.replyAction ) }" diff --git a/o2web/source/x_component_ForumDocument/Main.js b/o2web/source/x_component_ForumDocument/Main.js index 1978268705..d9f7e5882b 100644 --- a/o2web/source/x_component_ForumDocument/Main.js +++ b/o2web/source/x_component_ForumDocument/Main.js @@ -328,7 +328,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ " " + "" + " " + - " " + + "
" + ""+ ""; this.contentDiv.set("html", html); @@ -398,6 +398,11 @@ MWF.xApplication.ForumDocument.Main = new Class({ reference : this.advanceId || this.data.id, referenceType: "forumDocument" }, + anonymousSubject: { type: "checkbox", + disable: !MWFForum.enableAnonymousSubject(), + selectValue: ['true'], + selectText: [this.lp.anonymousSubject] + }, content: {text: this.lp.content, type : "rtf", notEmpty : true, RTFConfig : { isSetImageMaxWidth : true, reference : this.advanceId || this.data.id, @@ -625,7 +630,22 @@ MWF.xApplication.ForumDocument.Main = new Class({ if( this.access.isAnonymous() ){ this.createReplyEditor_Anonymous() }else{ - this.createReplyEditor(); + if( MWFForum.isReplyMuted() ){ + var d = MWFForum.muteData; + if( d ){ + new Element("div", { + styles: this.css.muteInfor, + text: this.lp.muteNote + this.lp.muteInfor.replace("{unmuteDate}", d.unmuteDate).replace("{reason}", d.reason) + }).inject( this.middleNode ) + }else{ + new Element("div", { + styles: this.css.muteInfor, + text: this.lp.muteNote + }).inject( this.middleNode ) + } + }else{ + this.createReplyEditor(); + } } } //this.createTurnSubjectNode(); @@ -642,7 +662,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ } //if( this.access.isSubjectPublisher( this.sectionData ) ){ - if( this.sectionPermission.subjectPublishAble ){ + if( this.sectionPermission.subjectPublishAble && !MWFForum.isSubjectMuted() ){ var createActionNode = new Element("div",{ styles : this.css.pagingActionNode, text: this.lp.createSubject @@ -885,6 +905,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ form.create() }, createActionBar : function( container ){ + var action; this.actionBar = new Element("div", { "styles" : this.css.actionBar, "html" : " "}).inject(container); //var action = new Element("div", { @@ -985,6 +1006,17 @@ MWF.xApplication.ForumDocument.Main = new Class({ }); //} + action = new Element("div", { + "styles" : this.css.actionItem, + "text" : this.lp.editorSetting + }).inject( this.actionBar ); + action.setStyle("background-image" , "url("+this.path+"icon/action_person.png)"); + action.addEvents({ + "mouseover" : function(){ this.itemNode.setStyles( this.obj.css.actionItem_over ) }.bind({ obj : this, itemNode : action }), + "mouseout" : function(){ this.itemNode.setStyles( this.obj.css.actionItem ) }.bind({ obj : this, itemNode : action }), + "click" : function(){ this.setEditPermission() }.bind(this) + }); + } if( MWF.AC.isHotPictureManager() ){ @@ -1029,7 +1061,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ } - if( this.permission.manageAble || this.permission.editAble || this.data.creatorName == this.userName ){ + if( this.permission.manageAble || this.permission.editAble || this.data.creatorName == this.userName || MWFForum.isSubjectEditor(this.data)){ action = new Element("div", { "styles" : this.css.actionItem, "text" : this.lp.delete @@ -1043,7 +1075,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ } if( this.data.typeCategory != this.lp.vote && this.data.typeCategory!="投票"){ - if( this.permission.manageAble || this.permission.editAble || this.data.creatorName == this.userName ){ + if( this.permission.manageAble || this.permission.editAble || this.data.creatorName == this.userName || MWFForum.isSubjectEditor(this.data) ){ action = new Element("div", { "styles" : this.css.actionItem, "text" : this.lp.edit @@ -1057,7 +1089,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ } } - if( !this.data.stopReply ){ + if( !this.data.stopReply && !MWFForum.isReplyMuted()){ if( this.isReplyPublisher ){ action = new Element("div", { "styles" : this.css.actionItem, @@ -1117,6 +1149,16 @@ MWF.xApplication.ForumDocument.Main = new Class({ }); form.create() }, + setEditPermission: function(){ + var form = new MWF.xApplication.ForumDocument.EditorSettingForm(this, this.data, { + onPostOk : function( id ){ + this.reload(); + }.bind(this) + },{ + app : this, lp : this.lp, css : this.css, actions : this.restActions + }); + form.create(); + }, setTop : function(){ var form = new MWF.xApplication.ForumDocument.TopSettingForm(this, this.data, { onPostOk : function( id ){ @@ -1151,7 +1193,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ }, createSubject : function(){ this.subjectView = new MWF.xApplication.ForumDocument.SubjectView( this.subjectConainer, this, this, { - templateUrl : this.path + "listItemSubject.json", + templateUrl : this.path + (this.data.anonymousSubject ? "listItemAnonymousSubject.json" : "listItemSubject.json"), scrollEnable : false } ); this.subjectView.data = this.data; @@ -1497,7 +1539,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ } ); - if( this.sectionPermission.subjectPublishAble ){ + if( this.sectionPermission.subjectPublishAble && !MWFForum.isSubjectMuted()){ count++; var createActionNode = new Element("div",{ styles : this.css.sidebarCreate, @@ -1524,7 +1566,7 @@ MWF.xApplication.ForumDocument.Main = new Class({ ) } - if( !this.data.stopReply ){ + if( !this.data.stopReply && !MWFForum.isReplyMuted() ){ if( this.isReplyPublisher ){ count++; var action = new Element("div", { @@ -1584,8 +1626,8 @@ MWF.xApplication.ForumDocument.Main = new Class({ this.sideBar.setStyle( "height" , (count * 30 + 5 ) +"px" ); }, - openPerson : function( userName ){ - MWFForum.openPersonCenter( userName ); + openPerson : function( userName, data ){ + MWFForum.openPersonCenter( userName, data ); }, createPersonNode : function( container, personName ){ var persons = personName.split(","); @@ -1677,8 +1719,13 @@ MWF.xApplication.ForumDocument.SubjectView = new Class({ data.index = index; var document; this.getUserData( data.creatorName, function(json ){ - data.userIcon = json.data.icon; - data.signature = json.data.signature; + if( data.anonymousSubject ){ + data.userIcon = '../x_component_ForumDocument/$Main/default/icon/noavatar_big.gif'; + data.signature = ""; + }else{ + data.userIcon = json.data.icon; + data.signature = json.data.signature; + } this.actions.getUserInfor( {"userName":data.creatorName}, function( json ){ data.subject = json.data.subjectCount; data.reply = json.data.replyCount; @@ -2478,3 +2525,66 @@ MWF.xApplication.ForumDocument.TopSettingForm = new Class({ } } }); + + +MWF.xApplication.ForumDocument.EditorSettingForm = new Class({ + Extends: MWF.xApplication.ForumDocument.TopSettingForm, + Implements: [Options, Events], + options: { + "style": "default", + "width": "420", + "height": "250", + "hasTop": true, + "hasIcon": false, + "hasTopIcon" : true, + "hasTopContent" : true, + "hasBottom": true, + "title": MWF.xApplication.Forum.LP.editPermissionFormTitle, + "draggable": true, + "closeAction": true + }, + _createTableContent: function () { + var html = "" + + "" + + " " + + "" + + "
"; + this.formTableArea.set("html", html); + + MWF.xDesktop.requireApp("Template", "MForm", function () { + this.form = new MForm(this.formTableArea, this.data, { + style: "forum", + isEdited: this.isEdited || this.isNew, + itemTemplate: { + editorList: { type: "org", style: {height:"100px"}, count: 0 } + } + }, this.app, this.css); + this.form.load(); + }.bind(this), true); + }, + ok: function (e) { + this.fireEvent("queryOk"); + debugger; + var data = this.form.getResult(true, ",", true, false, true); + if (data) { + var flag = true; + this.data.editorList = data.editorList.split(","); + o2.Actions.load("x_bbs_assemble_control").SubjectInfoManagerUserAction.save( this.data , function( json ){ + if (json.type == "error") { + this.app.notice(json.message, "error"); + flag = false; + } + }, function(){ + flag = false; + }, false ) + if( flag ){ + if(this.formMaskNode)this.formMaskNode.destroy(); + this.formAreaNode.destroy(); + this.app.notice( this.app.lp.setEditorSuccess ); + this.fireEvent("postOk"); + }else{ + this.app.notice( this.app.lp.setEditorFail , "error"); + } + } + } +}); diff --git a/o2web/source/x_component_ForumDocument/Mobile.js b/o2web/source/x_component_ForumDocument/Mobile.js index 358f39f5fd..d331fd8c30 100644 --- a/o2web/source/x_component_ForumDocument/Mobile.js +++ b/o2web/source/x_component_ForumDocument/Mobile.js @@ -68,7 +68,7 @@ MWF.xApplication.ForumDocument.Mobile = new Class({ }, createSubject : function(){ this.subjectView = new MWF.xApplication.ForumDocument.Mobile.SubjectView( this.subjectConainer, this.app, this, { - templateUrl : this.path + "listItemSubject.json", + templateUrl : this.path + (this.data.anonymousSubject ? "listItemAnonymousSubject.json" : "listItemSubject.json"), scrollEnable : false } ); this.subjectView.data = this.data; @@ -130,14 +130,20 @@ MWF.xApplication.ForumDocument.Mobile = new Class({ this.satisfiedReplyView.data = this.data; this.satisfiedReplyView.load(); }, - getUserIcon: function( name ){ + getUserIcon: function( name, isSubject ){ var icon = ""; - var url = MWF.Actions.get("x_organization_assemble_personal").getIcon(name); - if( url ){ - icon = url; + if( isSubject && this.data.anonymousSubject ){ + icon = '../x_component_ForumDocument/$Main/default/icon/noavatar_big.gif'; }else{ - icon = "../x_component_ForumDocument/$Main/default/icon/noavatar_big.gif"; + var url = MWF.Actions.get("x_organization_assemble_personal").getIcon(name); + if( url ){ + icon = url; + }else{ + icon = "../x_component_ForumDocument/$Main/default/icon/noavatar_big.gif"; + } } + + //MWF.Actions.get("x_organization_assemble_control").getPersonIcon(name, function(url){ // icon = url; //}.bind(this), function(){ diff --git a/o2web/source/x_component_ForumPerson/Main.js b/o2web/source/x_component_ForumPerson/Main.js index 5573977a2c..ffd2617d84 100644 --- a/o2web/source/x_component_ForumPerson/Main.js +++ b/o2web/source/x_component_ForumPerson/Main.js @@ -56,7 +56,7 @@ MWF.xApplication.ForumPerson.Main = new Class({ if( !this.options.personName && this.status && this.status.personName ){ this.options.personName = this.status.personName; } - if( !this.options.p && this.p && this.status.p ){ + if( !this.options.p && this.status && this.status.p ){ this.options.p = this.status.p; } this.loadController(function(){ @@ -319,10 +319,10 @@ MWF.xApplication.ForumPerson.Main = new Class({ }); this.explorer.load(); }, - openPerson : function( userName ){ + openPerson : function( userName, data ){ if( !userName || userName == "" ){ }else{ - MWFForum.openPersonCenter( userName ); + MWFForum.openPersonCenter( userName, data ); } }, setContentSize: function () { @@ -336,18 +336,31 @@ MWF.xApplication.ForumPerson.Main = new Class({ this.contentContainerNode.setStyle("height", "" + height + "px"); }, recordStatus: function(){ + debugger; if( this.options.p ){ - return { - type : this.explorer.options.type, - p : this.options.p, - viewPageNum : this.explorer.view.getCurrentPageNum() - }; + if( this.explorer && this.explorer.options ){ + return { + type : this.explorer.options.type, + p : this.options.p, + viewPageNum : this.explorer.view.getCurrentPageNum() + }; + }else{ + return { + p : this.options.p + } + } }else{ - return { - type : this.explorer.options.type, - personName : this.options.personName, - viewPageNum : this.explorer.view.getCurrentPageNum() - }; + if( this.explorer && this.explorer.options ) { + return { + type: this.explorer.options.type, + personName: this.options.personName, + viewPageNum: this.explorer.view.getCurrentPageNum() + }; + }else{ + return { + personName: this.options.personName + }; + } } } }); @@ -561,6 +574,9 @@ MWF.xApplication.ForumPerson.SubjectView = new Class({ this.actions.listUserSubjectPage( pageNum, count, filter, function(json){ if( !json.data )json.data = []; if( !json.count )json.count=0; + json.data = json.data.filter(function(d){ + return !d.anonymousSubject; + }) if( callback )callback(json); }.bind(this)) } diff --git a/o2web/source/x_component_ForumSearch/$Main/default/listItem.json b/o2web/source/x_component_ForumSearch/$Main/default/listItem.json index b1525b3615..d1a3332609 100644 --- a/o2web/source/x_component_ForumSearch/$Main/default/listItem.json +++ b/o2web/source/x_component_ForumSearch/$Main/default/listItem.json @@ -93,7 +93,7 @@ "title" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName ) }"}, + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }"}, "createTime" : { "value" : "function(d){ return MWFForum.getDateDiff( d.createTime ) }" } @@ -129,7 +129,7 @@ "title" : "function(d){ return MWFForum.getLastReplyUserName(d) }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.latestReplyUser ) }" + "event" : "click^^function(node){ this.app.openPerson( this.data.latestReplyUser, this.data ) }" }, "latestReplyTime2" : { "show": "function( d ){ return !d.latestReplyUser ? false : true }", @@ -155,18 +155,18 @@ //"access": "admin", "title": "edit", "action": "edit", - "condition": "function( d ){ return (d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.isAdmin() || (d.creatorName == this.app.userName)) }", + "condition": "function( d ){ return (d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.isAdmin() || MWFForum.isSubjectEditor(d)) }", "styles": "actionEditNode", "mouseoverStyles": "actionEditNode_over", "mousedownStyles": "actionEditNode_over" }, "placeholder" : { - "show": "function( d ){ return !((d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.isAdmin() || (d.creatorName == this.app.userName))) }" + "show": "function( d ){ return !((d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.isAdmin() || MWFForum.isSubjectEditor(d))) }" }, "remove": { "title": "remove", "action": "remove", - "condition": "function( d ){ return this.isAdmin() || (d.creatorName == this.app.userName) }", + "condition": "function( d ){ return this.isAdmin() || MWFForum.isSubjectEditor(d) }", "styles": "actionDeleteNode", "mouseoverStyles": "actionDeleteNode_over", "mousedownStyles": "actionDeleteNode_down" diff --git a/o2web/source/x_component_ForumSearch/Main.js b/o2web/source/x_component_ForumSearch/Main.js index 78038839f7..0583dfba2d 100644 --- a/o2web/source/x_component_ForumSearch/Main.js +++ b/o2web/source/x_component_ForumSearch/Main.js @@ -195,10 +195,10 @@ MWF.xApplication.ForumSearch.Main = new Class({ viewPageNum : this.explorer.view.getCurrentPageNum() }; }, - openPerson : function( userName ){ + openPerson : function( userName, data ){ if( !userName || userName == "" ){ }else{ - MWFForum.openPersonCenter( userName ); + MWFForum.openPersonCenter( userName, data ); } }, createPersonNode : function( container, personName ){ @@ -338,8 +338,8 @@ MWF.xApplication.ForumSearch.Explorer = new Class({ }); } }, - openPerson : function( userName ){ - MWFForum.openPersonCenter( userName ); + openPerson : function( userName, data ){ + MWFForum.openPersonCenter( userName, data ); }, createPersonNode : function( container, personName ){ var persons = personName.split(","); diff --git a/o2web/source/x_component_ForumSection/$Main/default/listItem.json b/o2web/source/x_component_ForumSection/$Main/default/listItem.json index 74afd59037..c38d06007c 100644 --- a/o2web/source/x_component_ForumSection/$Main/default/listItem.json +++ b/o2web/source/x_component_ForumSection/$Main/default/listItem.json @@ -61,7 +61,7 @@ "title" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName ) }" + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }" }, "createTime" : { "value" : "function(d){ return MWFForum.getDateDiff( d.createTime ) }" @@ -125,19 +125,19 @@ "title": "edit", //"text": "edit", "action": "edit", - "condition": "function( d ){ return (d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || (d.creatorName == this.app.userName)) }", + "condition": "function( d ){ return (d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || MWFForum.isSubjectEditor(d) ) }", "styles": "actionEditNode", "mouseoverStyles": "actionEditNode_over", "mousedownStyles": "actionEditNode_over" }, "placeholder" : { - "show": "function( d ){ return !((d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || (d.creatorName == this.app.userName))) }" + "show": "function( d ){ return !((d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || MWFForum.isSubjectEditor(d))) }" }, "remove": { "title": "remove", //"text": "remove", "action": "remove", - "condition": "function( d ){ return this.app.isAdmin || (d.creatorName == this.app.userName) }", + "condition": "function( d ){ return this.app.isAdmin || MWFForum.isSubjectEditor(d) }", "styles": "actionDeleteNode", "mouseoverStyles": "actionDeleteNode_over", "mousedownStyles": "actionDeleteNode_down" diff --git a/o2web/source/x_component_ForumSection/$Main/default/listItemPrime.json b/o2web/source/x_component_ForumSection/$Main/default/listItemPrime.json index 8bc895fd35..90e99f0b59 100644 --- a/o2web/source/x_component_ForumSection/$Main/default/listItemPrime.json +++ b/o2web/source/x_component_ForumSection/$Main/default/listItemPrime.json @@ -61,7 +61,7 @@ "title" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName ) }" + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }" }, "createTime" : { "value" : "function(d){ return MWFForum.getDateDiff( d.createTime ) }" @@ -125,19 +125,19 @@ "title": "edit", //"text": "edit", "action": "edit", - "condition": "function( d ){ return (d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || (d.creatorName == this.app.userName)) }", + "condition": "function( d ){ return (d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || MWFForum.isSubjectEditor(d)) }", "styles": "actionEditNode", "mouseoverStyles": "actionEditNode_over", "mousedownStyles": "actionEditNode_over" }, "placeholder" : { - "show": "function( d ){ return !((d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || (d.creatorName == this.app.userName))) }" + "show": "function( d ){ return !((d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || MWFForum.isSubjectEditor(d))) }" }, "remove": { "title": "remove", //"text": "remove", "action": "remove", - "condition": "function( d ){ return this.app.isAdmin || (d.creatorName == this.app.userName) }", + "condition": "function( d ){ return this.app.isAdmin || MWFForum.isSubjectEditor(d) }", "styles": "actionDeleteNode", "mouseoverStyles": "actionDeleteNode_over", "mousedownStyles": "actionDeleteNode_down" diff --git a/o2web/source/x_component_ForumSection/$Main/default/listItemType.json b/o2web/source/x_component_ForumSection/$Main/default/listItemType.json index 57434e872e..ba9cb81e09 100644 --- a/o2web/source/x_component_ForumSection/$Main/default/listItemType.json +++ b/o2web/source/x_component_ForumSection/$Main/default/listItemType.json @@ -61,7 +61,7 @@ "title" : "function(d){ return MWFForum.getSubjectCreatorName(d) }", "styles" : "person", "mouseoverStyles": "person_over", - "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName ) }" + "event" : "click^^function(node){ this.app.openPerson( this.data.creatorName, this.data ) }" }, "createTime" : { "value" : "function(d){ return MWFForum.getDateDiff( d.createTime ) }" @@ -125,19 +125,19 @@ "title": "edit", //"text": "edit", "action": "edit", - "condition": "function( d ){ return (d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || (d.creatorName == this.app.userName)) }", + "condition": "function( d ){ return (d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || MWFForum.isSubjectEditor(d)) }", "styles": "actionEditNode", "mouseoverStyles": "actionEditNode_over", "mousedownStyles": "actionEditNode_over" }, "placeholder" : { - "show": "function( d ){ return !((d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || (d.creatorName == this.app.userName))) }" + "show": "function( d ){ return !((d.typeCategory!='投票' && d.typeCategory!=this.app.lp.vote) && (this.app.isAdmin || MWFForum.isSubjectEditor(d))) }" }, "remove": { "title": "remove", //"text": "remove", "action": "remove", - "condition": "function( d ){ return this.app.isAdmin || (d.creatorName == this.app.userName) }", + "condition": "function( d ){ return this.app.isAdmin || MWFForum.isSubjectEditor(d) }", "styles": "actionDeleteNode", "mouseoverStyles": "actionDeleteNode_over", "mousedownStyles": "actionDeleteNode_down" diff --git a/o2web/source/x_component_ForumSection/Main.js b/o2web/source/x_component_ForumSection/Main.js index fa7ffd3886..30513cc9cb 100644 --- a/o2web/source/x_component_ForumSection/Main.js +++ b/o2web/source/x_component_ForumSection/Main.js @@ -482,10 +482,10 @@ MWF.xApplication.ForumSection.Main = new Class({ noteHidden : this.noteNodeHidden }; }, - openPerson : function( userName ){ + openPerson : function( userName, data ){ if( !userName || userName == "" ){ }else{ - MWFForum.openPersonCenter( userName ); + MWFForum.openPersonCenter( userName, data ); } }, createPersonNode : function( container, personName ){ @@ -588,7 +588,7 @@ MWF.xApplication.ForumSection.Explorer = new Class({ } //if( this.parent.access.isSubjectPublisher( this.parent.sectionData ) ){ - if( this.app.sectionPermission.subjectPublishAble ){ + if( this.app.sectionPermission.subjectPublishAble && !MWFForum.isSubjectMuted()){ var createActionNode = new Element("div",{ styles : this.css.toolbarActionNode, text: this.lp.createSubject @@ -804,7 +804,7 @@ MWF.xApplication.ForumSection.Explorer = new Class({ "value" : selectNotice, "text" : selectNotice }).inject(select); - var subjectTypeList = this.app.sectionData.subjectTypeList; + var subjectTypeList = (this.app.sectionData.subjectType || "").split("|"); //this.app.sectionData.subjectTypeList; subjectTypeList.each( function(subjectType, i){ if( !subjectType )return; if(subjectTypeName!="" && subjectTypeName==subjectType){ diff --git a/o2web/source/x_component_Selector/Person.js b/o2web/source/x_component_Selector/Person.js index b3d01297b7..06b4f7671c 100644 --- a/o2web/source/x_component_Selector/Person.js +++ b/o2web/source/x_component_Selector/Person.js @@ -1910,6 +1910,8 @@ MWF.xApplication.Selector.Person.Item = new Class({ load: function(){ if( this.clazz === "Item" ){ this.selector.fireEvent("queryLoadItem",[this]); + }else if( this.clazz === "ItemSelected" ){ + this.selector.fireEvent("queryLoadItemSelected",[this]); } if( !this.node ){ @@ -1973,6 +1975,8 @@ MWF.xApplication.Selector.Person.Item = new Class({ if( this.clazz === "Item" ) { this.selector.fireEvent("postLoadItem", [this]); + }else if( this.clazz === "ItemSelected" ){ + this.selector.fireEvent("postLoadItemSelected",[this]); } }, loadSubItem: function(){}, diff --git a/o2web/source/x_desktop/js/initialScriptText.js b/o2web/source/x_desktop/js/initialScriptText.js index 40fbabc535..2183caf2ef 100644 --- a/o2web/source/x_desktop/js/initialScriptText.js +++ b/o2web/source/x_desktop/js/initialScriptText.js @@ -2407,7 +2407,7 @@ bind.Table = function(name){ * var table = new this.Table("table1"); * * //查询字段name等于zhangsan的数据,结果按updateTime倒序 - * table.rowCountWhere( "o.name='zhangsan", function(data){ + * table.rowCountWhere( "o.name='zhangsan'", function(data){ * //data 形如 * //{ * // "type": "success", -- GitLab