diff --git a/o2web/source/o2_core/o2/widget/O2Identity.js b/o2web/source/o2_core/o2/widget/O2Identity.js
index 299e5d65c3af0cb9638d7be52470882ae36eac52..9599f6227643c8597cb6483040d2bd7d55f2e1a5 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 ecb890fa5f0b22667940a1801531fb63d3f3b7c7..cd78f72be72e37097ad949b1e0ecc46c6370771b 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 || /*1.4compat>*/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 597158acbc1c415a88a4aa640bd4348e0d68e567..87ea4ab3544c1e86512eb251b154ef1e3bbb954e 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 d1e5cf33d050e7a43b14dc513f789cbfb0691f19..08c058fff72ba6521a6e691afe0035c2d3e856bc 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
Binary files /dev/null and b/o2web/source/x_component_Forum/$Setting/default/icon/mute.png differ
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 0000000000000000000000000000000000000000..6f45437de7b4fb410ee4e23f95aabb63f47bb075
--- /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 ba7dd80dbc27fc7ab293f27871912527c3c4dcc7..5fbec3f5a84b74bf2bdaa725099da541700fb29f 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 4ec527884529b693aa978348e423e001011ece2b..bb90ac0f2bf3fa3ebf0c00b76eda546c70921156 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 d302c1bc896a1007bbb193eea648d7865cae7979..0307d898bb826923b9748f96e8a40075c8b51b3b 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 9b613ac76bf3c0fc8e80f09154818eefd1efc5ca..a86c02c3f9b0d52c63713e5ced32c3bda67159c4 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 a8d55b37714da5eda5e4a4d8effe50d8c10defe5..0ab0214c87d2bef00f02f9153f4de8ca3e6d7d0e 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 9f797b59ea2dd50f8ddf677d2484a748b8ad8093..6fb7d9f488a814dff3e920a50a55a9608bd9b174 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 7b519a00f5a1293e9c0791d7a5558f839435c7b8..f1e673b1cb6ad1e85aff858cc416ab25efb4d049 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 ced6daea9d0871b0e0aa538c287c55a9feb8a9aa..18037c1218c25862b76bb08dc651ce835e936722 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 b01c41b28dcfa10b331a9990161c559fe71225b6..d54da56d4b53661d47440fd1f1d9479e8e1fd32b 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
Binary files /dev/null and b/o2web/source/x_component_ForumDocument/$Main/default/icon/action_person.png differ
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 0000000000000000000000000000000000000000..a0b666874524cc3f57181a1b429101684c031912
--- /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 813519bcfc203e24f874514f8d8c962fe0d28dad..74919c86ccc41650019d6f550b720495ffdc49a2 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 1eed5c33108b2d454c35daaa017796443ae4a41c..fa246f1a9ea30346d146ed0862e3a8f5c2e0686f 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 0984e7c3d2824368a3c3223203c0ca541f305a54..b5c88c952fc0223ef44db9e076cbb3eaec76721f 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 0000000000000000000000000000000000000000..0145550105a0cce9c160bc870fa693a274454a65
--- /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 22a801d257843094199b384c6182527a11527306..6154d4bf7516c960d02220c7b3635fe4b93472ad 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 5b06c1211c0f89f34f2a2b56d20bc3b84fc73099..4bb7014deb27b0df46a2847ef8883e85b9f48771 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 24122306297539cd8255bb701b8b9314f81d3fad..0145550105a0cce9c160bc870fa693a274454a65 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 19782687051e309ae83bda3a23d5a1f389878c62..d9f7e5882bbcbe5cab15daa455d605d11a6361b8 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 358f39f5fdc36eb16dd759e3fd3f987c1998ffe0..d331fd8c300ef94ea15d7270fee36c5d2209d65c 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 5573977a2cbaaf6ce1e25fb1da6e167e789e50ab..ffd2617d84484e11592b8d6e70d68c6be4bd9f2a 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 b1525b36158d70fc8ecfeef555fb9405d630b3bb..d1a33326094909cfd88e3547f5d91121bad5a6e4 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 78038839f7119ecf64f3659166f8fda8f6101858..0583dfba2d6e023c5f0bf00467826e219f3f23a4 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 74afd59037038c9ba65632f4ed94e5df2091e34f..c38d06007cccfbf23721a29c5ec939ffa4b5ccd0 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 8bc895fd353d657bbf52a50b35bf25184a0807b6..90e99f0b59ca4845f6f1a80ab5f6f854d7c53dc7 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 57434e872ebae2471132922fbc2fa05dd7e68f90..ba9cb81e091c4a0e8477861706253d70a0f818d3 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 fa7ffd3886981c779bca98b1c3ee4ace7abe9f9b..30513cc9cb8a6be0417196ebeda5a83383f073c8 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 b3d01297b7f47b917ae14454508e91fb1ad67664..06b4f7671c3cb506ae72138e2b9a496107acd9b3 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 40fbabc53564def6f79be92eb7cfa4737c988161..2183caf2ef93bb2bd168f737df2c57e858d684f1 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",