提交 e3084610 编写于 作者: 蔡祥熠

Merge branch 'feature/CMS.setTop' into 'wrdp'

Merge of feature/CMS.setTop 内容管理增加置顶功能,整理内容管理流程管理的文档的一些图标,修复内容管理设计端的一些语言问题,修复内容管理文档刷新时事件未注销的问题 to wrdp

See merge request o2oa/o2oa!4710
......@@ -115,6 +115,7 @@ MWF.xApplication.cms.Document.Main = new Class({
MWF.release(this.appForm);
this.appForm = null;
this.form = null;
this.$events = {};
}
// this.parseDocumentV2(data);
// this.openDocument();
......@@ -391,7 +392,9 @@ MWF.xApplication.cms.Document.Main = new Class({
"allowSave": isControl && this.document.docStatus == "published",
"allowPopularDocument": MWF.AC.isHotPictureManager() && this.document.docStatus == "published",
"allowEditDocument": isControl && !this.document.wf_workId,
"allowDeleteDocument": isControl && !this.document.wf_workId
"allowDeleteDocument": isControl && !this.document.wf_workId,
"allowSetTop": this.isAdmin && this.document.docStatus == "published" && !this.document.isTop,
"allowCancelTop": this.isAdmin && this.document.docStatus == "published" && this.document.isTop,
};
},
errorLoadingV2 : function( error, type ){
......
......@@ -57,7 +57,6 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
this.node.setStyles({"height": "24px", "line-height": "24px", "background-color": "#999"});
}else{
this.toolbarNode = new Element("div").inject(this.node);
this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);
o2.xhr_get(this.path+"toolbars.json", function(xhr){
......@@ -176,7 +175,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
if (MWF.xApplication.cms.FormDesigner.LP.actionBar){
var jsonStr = JSON.stringify(this.json.multiTools);
jsonStr = o2.bindJson(jsonStr, {"lp": MWF.xApplication.cms.FormDesigner.LP.actionBar});
this.multiToolsJson = JSON.parse(jsonStr).map( function (d) { d.system = true; return d; });
this.multiToolsJson = JSON.parse(jsonStr); //.map( function (d) { return d; });
}else{
this.multiToolsJson = this.json.multiTools;
}
......
......@@ -92,5 +92,29 @@
"id": "action_print",
"read": true,
"edit" : true
},
{
"type": "MWFToolBarButton",
"img": "top.png",
"img_over": "top_over.png",
"title": "{{$.lp.setTopTitle}}",
"action": "setTop",
"text": "{{$.lp.setTop}}",
"id": "action_setTop",
"read": true,
"edit" : true,
"control": "allowSetTop"
},
{
"type": "MWFToolBarButton",
"img": "topcancel.png",
"img_over": "topcancel_over.png",
"title": "{{$.lp.cancelTopTitle}}",
"action": "cancelTop",
"text": "{{$.lp.cancelTop}}",
"id": "action_cancelTop",
"read": true,
"edit" : true,
"control": "allowCancelTop"
}
]
\ No newline at end of file
......@@ -64,6 +64,10 @@ MWF.xApplication.cms.FormDesigner.LP = Object.merge( {}, MWF.xApplication.proces
"delete": "Delete",
"deleteTitle": "Delete Document",
"print": "Print",
"printTitle": "Print Document"
"printTitle": "Print Document",
"setTop": "Top",
"setTopTitle": "Set the document to the top",
"cancelTop": "Cancel Top",
"cancelTopTitle": "Cancel the top of the document"
}
});
\ No newline at end of file
......@@ -64,6 +64,10 @@ MWF.xApplication.cms.FormDesigner.LP = Object.merge( {}, MWF.xApplication.proces
"delete": "删除",
"deleteTitle": "删除文档",
"print": "打印",
"printTitle": "打印文档"
"printTitle": "打印文档",
"setTop": "置顶",
"setTopTitle": "对文档置顶",
"cancelTop": "取消置顶",
"cancelTopTitle": "取消对文档的置顶"
}
});
\ No newline at end of file
......@@ -250,7 +250,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
}, icon);
item.iconName = i+".png";
}
for (var i=1; i<=134; i++){
for (var i=1; i<=136; i++){
//var icon = this.editor.path+this.editor.options.style+"/tools/"+i+".png";
var icon = "../x_component_cms_FormDesigner/Module/Actionbar/"+this.editor.options.style+"/custom/"+i+".png";
var item = this.iconMenu.addMenuItem("", "click", function(ev){
......
......@@ -208,5 +208,11 @@ MWF.xApplication.cms.Xform.Actionbar = MWF.CMSActionbar = new Class({
},
printDocument: function(){
this.form.printDocument();
},
setTop: function(){
this.form.setTop();
},
cancelTop: function(){
this.form.cancelTop();
}
});
\ No newline at end of file
......@@ -934,7 +934,71 @@ MWF.xApplication.cms.Xform.Form = MWF.CMSForm = new Class(
attachmentController.checkActions();
}
}.bind(this))
}
},
/**
* @summary 弹出文档置顶对话框,操作后使当前文档在列式服务中排在前面.
* @method setTop
* @memberof CMSForm
* @example
* this.form.getApp().appForm.setTop();
*/
setTop: function () {
var _self = this;
var p = MWF.getCenterPosition(this.app.content, 380, 150);
var event = {
"event": {
"x": p.x,
"y": p.y - 200,
"clientX": p.x,
"clientY": p.y - 200
}
};
this.app.confirm("infor", event, MWF.xApplication.cms.Xform.LP.setTopTitle, MWF.xApplication.cms.Xform.LP.setTopText, 380, 120, function () {
o2.Actions.load("x_cms_assemble_control").DocumentAction.persist_top(_self.businessData.document.id, function () {
_self.app.notice(MWF.xApplication.cms.Xform.LP.setTopSuccess, "success");
_self.app.reload();
this.close();
}.bind(this))
//this.close();
}, function () {
this.close();
});
},
/**
* @summary 弹出文档取消置顶对话框.
* @method cancelTop
* @memberof CMSForm
* @example
* this.form.getApp().appForm.cancelTop();
*/
cancelTop: function () {
var _self = this;
var p = MWF.getCenterPosition(this.app.content, 380, 150);
var event = {
"event": {
"x": p.x,
"y": p.y - 200,
"clientX": p.x,
"clientY": p.y - 200
}
};
this.app.confirm("infor", event, MWF.xApplication.cms.Xform.LP.cancelTopTitle, MWF.xApplication.cms.Xform.LP.cancelTopText, 380, 120, function () {
o2.Actions.load("x_cms_assemble_control").DocumentAction.persist_unTop(_self.businessData.document.id, function () {
_self.app.notice(MWF.xApplication.cms.Xform.LP.cancelTopSuccess, "success");
_self.app.reload();
this.close();
}.bind(this))
//this.close();
}, function () {
this.close();
});
},
......
......@@ -57,6 +57,13 @@ MWF.xApplication.cms.Xform.LP = Object.merge({}, MWF.xApplication.process.Xform
"updateSuccess": "Update successful",
"save": "Save",
"setTopTitle": "Put Top Confirmation",
"setTopText": "Are you sure to put the current document on top?",
"setTopSuccess": "Put Top Success",
"cancelTopTitle": "Cancel Top Title Confirmation",
"cancelTopText": "Are you sure you want to cancel the current document on top?",
"cancelTopSuccess": "Cancel Top Success",
"attachmentArea": "Attachment Area",
"selectAttachment": "Select Attachment",
......@@ -83,7 +90,11 @@ MWF.xApplication.cms.Xform.LP = Object.merge({}, MWF.xApplication.process.Xform
"delete": "Delete",
"deleteTitle": "Delete Document",
"print": "Print",
"printTitle": "Print Document"
"printTitle": "Print Document",
"setTop": "Top",
"setTopTitle": "Set the document to the top",
"cancelTop": "Cancel Top",
"cancelTopTitle": "Cancel the top of the document"
}
});
MWF.xApplication.cms.Xform["lp."+o2.language] = MWF.xApplication.cms.Xform.LP;
\ No newline at end of file
......@@ -57,6 +57,13 @@ MWF.xApplication.cms.Xform.LP = Object.merge({}, MWF.xApplication.process.Xform.
"updateSuccess" : "更新成功",
"save" : "保存",
"setTopTitle": "置顶确认",
"setTopText": "确定将当前文档置顶?",
"setTopSuccess": "置顶成功",
"cancelTopTitle": "取消置顶确认",
"cancelTopText": "确定将当前文档取消置顶?",
"cancelTopSuccess": "取消置顶成功",
"attachmentArea" : "附件区域",
"selectAttachment" : "选择附件",
......@@ -83,7 +90,11 @@ MWF.xApplication.cms.Xform.LP = Object.merge({}, MWF.xApplication.process.Xform.
"delete": "删除",
"deleteTitle": "删除文档",
"print": "打印",
"printTitle": "打印文档"
"printTitle": "打印文档",
"setTop": "置顶",
"setTopTitle": "对文档置顶",
"cancelTop": "取消置顶",
"cancelTopTitle": "取消对文档的置顶"
}
//"at" : "阅于",
......
......@@ -198,7 +198,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
if (MWF.xApplication.process.FormDesigner.LP.actionBar){
var jsonStr = JSON.stringify(this.json.multiTools);
jsonStr = o2.bindJson(jsonStr, {"lp": MWF.xApplication.process.FormDesigner.LP.actionBar});
this.multiToolsJson = JSON.parse(jsonStr).map( function (d) { d.system = true; return d; });
this.multiToolsJson = JSON.parse(jsonStr); //.map( function (d) { d.system = true; return d; });
}else{
this.multiToolsJson = this.json.multiTools;
}
......
......@@ -46,7 +46,9 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
this.getHtmlString(function(){
if (this.htmlString){
var lp;
if( this.options.appType === "cms" ){
if( this.options.appType === "cms" ) {
lp = MWF.xApplication.cms.FormDesigner.LP.propertyTemplate;
}else if( this.designer && this.designer.options && this.designer.options.name && this.designer.options.name.indexOf("cms") === 0 ){
lp = MWF.xApplication.cms.FormDesigner.LP.propertyTemplate;
}else{
lp = MWF.xApplication.process.FormDesigner.LP.propertyTemplate;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册