提交 0b352dce 编写于 作者: 蔡祥熠

Merge branch 'feature/cms_add_publishTime' into 'develop'

Merge of feature/cms_add_publishTime 内容管理增加定时发布功能 to develop

See merge request o2oa/o2oa!851
......@@ -1022,6 +1022,8 @@ MWF.xApplication.cms.ColumnManager.ApplicationProperty = new Class({
html += "<tr><td class='formTitle'>"+this.app.lp.application.ignoreTitle+"</td><td id='formApplicationIgnoreTitle' class='formValue'>"+(flag ? lp.ignoreTitleSelectText[0] : lp.ignoreTitleSelectText[1] )+"</td></tr>";
var flag = typeOf(this.config.latest) === "boolean" ? this.config.latest : true;
html += "<tr><td class='formTitle'>"+this.app.lp.application.latest+"</td><td id='formApplicationLatest' class='formValue'>"+(flag ? lp.checkDraftSelectText[0] : lp.checkDraftSelectText[1] )+"</td></tr>";
var flag = typeOf(this.data.allowWaitPublish) === "boolean" ? this.data.allowWaitPublish : false;
html += "<tr><td class='formTitle'>"+this.app.lp.application.delayView+"</td><td id='formApplicationDelay' class='formValue'>"+(flag ? lp.showDelayDocumentSelectText[0] : lp.showDelayDocumentSelectText[1] )+"</td></tr>";
var flag = typeOf(this.data.showAllDocuments) === "boolean" ? this.data.showAllDocuments : true;
html += "<tr><td class='formTitle'>"+this.app.lp.application.showAllDocumentViews+"</td><td id='showAllDocumentViews' class='formValue'>"+(flag ? lp.showAllDocumentSelectText[0] : lp.showAllDocumentSelectText[1] )+"</td></tr>";
// html += "<tr><td class='formTitle'>"+this.app.lp.application.type+"</td><td id='formApplicationType'></td></tr>";
......@@ -1067,6 +1069,14 @@ MWF.xApplication.cms.ColumnManager.ApplicationProperty = new Class({
selectText : lp.checkDraftSelectText
});
this.delaySelect = new MDomItem( this.propertyContentNode.getElement("#formApplicationDelay"), {
type : "select",
defaultValue : "true",
value : ( typeOf(this.data.allowWaitPublish) === "boolean" ? this.data.allowWaitPublish : false ).toString(),
selectValue : [ "true", "false" ],
selectText : lp.showDelayDocumentSelectText
});
this.allDocumentViewSelect = new MDomItem( this.propertyContentNode.getElement("#showAllDocumentViews"), {
type : "select",
defaultValue : "true",
......@@ -1143,6 +1153,7 @@ MWF.xApplication.cms.ColumnManager.ApplicationProperty = new Class({
this.typeSelect.editMode();
this.latestSelect.editMode();
this.delaySelect.editMode();
this.ignoreTitleSelect.editMode();
this.allDocumentViewSelect.editMode();
this.defaultEditForm.editMode();
......@@ -1158,6 +1169,7 @@ MWF.xApplication.cms.ColumnManager.ApplicationProperty = new Class({
this.sortInput.readMode();
this.typeSelect.readMode();
this.latestSelect.readMode();
this.delaySelect.readMode();
this.ignoreTitleSelect.readMode();
this.allDocumentViewSelect.readMode();
this.defaultEditForm.readMode();
......@@ -1223,6 +1235,8 @@ MWF.xApplication.cms.ColumnManager.ApplicationProperty = new Class({
this.config.ignoreTitle = this.ignoreTitleSelect.getValue() !== "false";
this.config.latest = this.latestSelect.getValue() !== "false";
this.data.allowWaitPublish = this.delaySelect.getValue() === "true";
this.data.config = JSON.stringify( this.config );
//this.data.applicationCategory = this.appTypeInput.input.get("value");
......@@ -1237,6 +1251,7 @@ MWF.xApplication.cms.ColumnManager.ApplicationProperty = new Class({
this.sortInput.save();
this.typeSelect.save();
this.latestSelect.save();
this.delaySelect.save();
this.ignoreTitleSelect.save();
this.allDocumentViewSelect.save();
this.defaultEditForm.save();
......
......@@ -175,6 +175,7 @@ MWF.xApplication.cms.ColumnManager.LP = {
"appType": "AppInfo Type",
"ignoreTitle": "Ignore Title",
"latest": "Check Draft",
"delayView": "Delayed View",
"defaultEditForm": "Default Edit Form",
"defaultReadForm": "Default Read Form",
"editformNote": "Note: The default edit form when creating a category",
......@@ -224,6 +225,8 @@ MWF.xApplication.cms.ColumnManager.LP = {
"loadFiles": "Batch upload attachments"
},
"enable": "enable",
"disable": "disable",
"name": "Name",
"alias": "Alias",
"attachment": "Attachment",
......@@ -297,6 +300,7 @@ MWF.xApplication.cms.ColumnManager.LP = {
"ignoreTitleSelectText": ["Do not fill in the title of the new interface", "The title of the new interface needs to be filled in"],
"checkDraftSelectText": ["New interface check draft","New interface does not check draft"],
"showAllDocumentSelectText": ["Show all document views","Hide all document views"],
"showDelayDocumentSelectText": ["Show timed release document view","Hide timed release document view"],
"selectRelateFormNotice": "Please select the related form of the view to be pasted",
......
......@@ -176,6 +176,7 @@ MWF.xApplication.cms.ColumnManager.LP = {
"appType" : "栏目类型",
"ignoreTitle" : "忽略标题",
"latest" : "检查草稿",
"delayView": "定时视图",
"defaultEditForm": "默认编辑表单",
"defaultReadForm": "默认阅读表单",
"editformNote": "注:创建分类时的默认编辑表单",
......@@ -225,6 +226,8 @@ MWF.xApplication.cms.ColumnManager.LP = {
"loadFiles": "批量上传附件"
},
"enable": "启用",
"disable": "禁用",
"name": "名称",
"alias": "别名",
"attachment": "附件",
......@@ -297,6 +300,7 @@ MWF.xApplication.cms.ColumnManager.LP = {
"ignoreTitleSelectText": ["新建界面不填写标题","新建界面需要填写标题"],
"checkDraftSelectText": ["新建界面检查草稿","新建界面不检查草稿"],
"showAllDocumentSelectText": ["显示所有文档视图","隐藏所有文档视图"],
"showDelayDocumentSelectText": ["显示定时发布文档视图","隐藏定时发布文档视图"],
"selectRelateFormNotice": "请选择需粘贴视图的关联表单",
......
{
"routeSelectorTile": {
"overflow": "hidden",
"height": "30px",
"line-height": "30px",
"font-size": "14px",
"font-weight": "bold",
"background-color": "#6681a5",
"color": "#FFF",
"padding-left": "20px"
},
"routeSelectorArea": {
"overflow": "hidden",
"min-height": "40px",
"padding": "0xp 20px"
},
"routeNode": {
"float": "left",
"margin-left": "20px",
"border-radius": "5px",
"background-color": "#E3E3E3",
"height": "24px",
"line-height": "24px",
"margin-top": "8px",
"padding-right": "8px",
"cursor": "pointer"
},
"routeIconNode": {
"width": "24px",
"height": "24px",
"float": "left",
"background": "url("+"../x_component_cms_Document/$Processor/default/nocheck.png) no-repeat center center"
},
"routeTextNode": {
"margin-left": "24px",
"line-height": "24px",
"color": "#000"
},
"routeOpinionTile": {
"overflow": "hidden",
"height": "30px",
"line-height": "30px",
"font-size": "14px",
"font-weight": "bold",
"background-color": "#6681a5",
"color": "#FFF",
"padding-left": "20px"
},
"routeOpinionArea": {
"height": "129px",
"border-bottom": "1px solid #6681a5"
},
"inputOpinionNode": {
"height": "129px",
"width": "358px",
"float": "left",
"border-left": "1px solid #6681a5",
"border-right": "1px solid #6681a5",
"background-color": "#EEE"
},
"selectIdeaNode": {
"height": "129px",
"width": "112px",
"float": "right",
"background-color": "#FFF",
"overflow": "hidden"
},
"selectIdeaScrollNode": {
"height": "129px",
"margin-right": "6px",
"overflow": "hidden"
},
"selectIdeaItemNode": {
"height": "20px",
"line-height": "20px",
"font-size": "12px",
"cursor": "pointer",
"background-color": "#FFF",
"overflow": "hidden"
},
"selectIdeaItemNode_over": {
"background-color": "#e6ecf8"
},
"buttonsArea": {
"height": "50px",
"overflow": "hidden"
},
"okButton": {
"height": "30px",
"width": "100px",
"border-radius": "5px",
"background-color": "#6681a5",
"color": "#FFF",
"float": "right",
"margin-right": "20px",
"margin-top": "10px",
"cursor": "pointer"
},
"okIconNode": {
"height": "30px",
"width": "40px",
"float": "left",
"background": "url("+"../x_component_cms_Document/$Processor/default/ok-18.png) no-repeat center center"
},
"okTextNode": {
"font-size": "14px",
"margin-left": "40px",
"line-height": "28px"
},
"cancelButton": {
"height": "28px",
"width": "78px",
"border": "1px solid #999",
"border-radius": "5px",
"background-color": "#fff",
"color": "#999",
"float": "right",
"margin-right": "20px",
"margin-top": "10px",
"cursor": "pointer"
},
"cancelIconNode": {
"height": "28px",
"width": "33px",
"float": "left",
"background": "url("+"../x_component_cms_Document/$Processor/default/cancel-18.png) no-repeat center center"
},
"cancelTextNode": {
"font-size": "14px",
"margin-left": "33px",
"line-height": "26px"
},
"inputTextarea": {
"font-family": "Microsoft YaHei",
"border": "0px",
"overflow": "auto",
"width": "352px",
"height": "120px",
"padding": "3px",
"color": "#666"
}
}
\ No newline at end of file
{
"routeSelectorTile": {
"overflow": "hidden",
"height": "30px",
"line-height": "36px",
"font-size": "14px",
"font-weight": "bold",
"color": "#333",
"width": "80px",
"float": "left",
"margin-left": "20px"
},
"routeSelectorArea": {
"overflow": "hidden",
"min-height": "30px",
"margin-left": "100px"
},
"routeNode": {
"float": "left",
"margin-left": "20px",
"border-radius": "5px",
"background-color": "#E3E3E3",
"height": "24px",
"line-height": "24px",
"margin-top": "8px",
"padding-right": "8px",
"cursor": "pointer"
},
"routeIconNode": {
"width": "24px",
"height": "24px",
"float": "left",
"background": "url("+"../x_component_cms_Document/$Processor/task/nocheck.png) no-repeat center center"
},
"routeTextNode": {
"margin-left": "24px",
"line-height": "24px",
"color": "#000"
},
"routeOpinionTile": {
"clear": "both",
"overflow": "hidden",
"height": "20px",
"line-height": "20px",
"font-size": "14px",
"font-weight": "bold",
"color": "#333",
"padding-left": "20px"
},
"routeOpinionArea": {
"height": "99px",
"margin": "0px 10px 0px 20px",
"border-bottom": "0px solid #6681a5"
},
"inputOpinionNode": {
"height": "97px",
"width": "358px",
"border": "1px solid #6681a5",
"background-color": "#EEE"
},
"selectIdeaNode": {
"height": "97px",
"width": "116px",
"float": "right",
"background-color": "#FFF",
"overflow": "hidden"
},
"selectIdeaScrollNode": {
"height": "97px",
"margin-right": "6px",
"overflow": "hidden"
},
"selectIdeaItemNode": {
"height": "20px",
"line-height": "20px",
"font-size": "12px",
"cursor": "pointer",
"background-color": "#FFF"
},
"selectIdeaItemNode_over": {
"background-color": "#e6ecf8"
},
"buttonsArea": {
"height": "50px",
"overflow": "hidden"
},
"okButton": {
"height": "30px",
"width": "100px",
"border-radius": "5px",
"background-color": "#6681a5",
"color": "#FFF",
"float": "right",
"margin-right": "20px",
"margin-top": "10px",
"cursor": "pointer"
},
"okIconNode": {
"height": "30px",
"width": "40px",
"float": "left",
"background": "url("+"../x_component_cms_Document/$Processor/task/ok-18.png) no-repeat center center"
},
"okTextNode": {
"font-size": "14px",
"margin-left": "40px",
"line-height": "28px"
},
"cancelButton": {
"height": "28px",
"width": "78px",
"border": "1px solid #999",
"border-radius": "5px",
"background-color": "#fff",
"color": "#999",
"float": "right",
"margin-right": "20px",
"margin-top": "10px",
"cursor": "pointer"
},
"cancelIconNode": {
"height": "28px",
"width": "33px",
"float": "left",
"background": "url("+"../x_component_cms_Document/$Processor/task/cancel-18.png) no-repeat center center"
},
"cancelTextNode": {
"font-size": "14px",
"margin-left": "33px",
"line-height": "26px"
},
"inputTextarea": {
"font-family": "Microsoft YaHei",
"border": "0px",
"overflow": "auto",
"width": "352px",
"height": "90px",
"padding": "3px",
"color": "#666"
}
}
\ No newline at end of file
MWF.xApplication.cms.Document = MWF.xApplication.cms.Document || {};
MWF.xDesktop.requireApp("Template", "MPopupForm", null, false);
MWF.xApplication.cms.Document.DelayPublishForm = new Class({
Extends: MPopupForm,
Implements: [Options, Events],
options: {
"style": "default",
"width": "580",
"height": "220",
"hasTop": true,
"hasIcon": false,
"hasTopIcon" : false,
"hasTopContent" : true,
"hasBottom": true,
"title": MWF.xApplication.cms.Document.LP.regularPublish, //"设置热点"
"draggable": true,
"closeAction": true,
"publishTime": ""
},
_createTableContent: function () {
this.formAreaNode.setStyle("z-index", 1002);
this.formMaskNode.setStyle("z-index", 1002);
this.formTableContainer.setStyles({
"margin":"40px 40px 0px 40px"
});
var html = "<table width='100%' bordr='0' cellpadding='5' cellspacing='0' styles='formTable'>" +
"<tr>" +
" <td styles='formTableTitle' style='font-size: 14px;width: 80px;'>"+this.lp.publishTime+":</td>" +
" <td styles='formTableValue' item='publishTime'></td>" +
"</tr>"+
"</table>";
this.formTableArea.set("html", html);
MWF.xDesktop.requireApp("Template", "MForm", function () {
this.form = new MForm(this.formTableArea, this.data, {
style: "meeting",
isEdited: true,
itemTemplate: {
publishTime: {
text: this.lp.publishTime,
tType: "datetime",
notEmpty: true,
value: this.options.publishTime || "",
attr: {
"readonly":true
},
calendarOptions : {
"secondEnable": true,
"format": "db",
"onShow": function () {
this.container.setStyle("z-index", 1003 );
}
}
}
}
}, this.app, this.css);
this.form.load();
}.bind(this), true);
},
_createBottomContent: function () {
this.closeActionNode = new Element("div.formCancelActionNode", {
"styles": this.css.formCancelActionNode,
"text": this.lp.close
}).inject(this.formBottomNode);
this.closeActionNode.addEvent("click", function (e) {
this.cancel(e);
}.bind(this));
this.okActionNode = new Element("div.formOkActionNode", {
"styles": this.css.formOkActionNode,
"text": this.lp.publish
}).inject(this.formBottomNode);
this.okActionNode.addEvent("click", function (e) {
this.ok(e);
}.bind(this));
},
ok: function (e) {
this.fireEvent("queryOk");
var result = this.form.getResult(true, null);
if( !result ){
this.app.notice(this.lp.inputPublishTime, "error");
return;
}else if( new Date( result.publishTime ) <= new Date() ){
this.app.notice(this.lp.inputPublishTime2, "error");
return;
}
(this.formMaskNode || this.formMarkNode).destroy();
this.formAreaNode.destroy();
// this.app.notice(this.lp.setHotLinkSuccess, "success");
this.fireEvent("postOk", result.publishTime);
}
});
......@@ -481,13 +481,14 @@ MWF.xApplication.cms.Document.Main = new Class({
var isControl = this.options.isControl;
this.control = data.control || {
"allowRead": true,
"allowPublishDocument": isControl && this.document.docStatus == "draft",
"allowPublishDocument": isControl && ["draft","waitPublish"].contains( this.document.docStatus ),
"allowPublishDocumentDelayed": isControl && ["draft","waitPublish"].contains( this.document.docStatus ),
"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,
"allowSetTop": this.isAdmin && this.document.docStatus == "published" && !this.document.isTop,
"allowCancelTop": this.isAdmin && this.document.docStatus == "published" && this.document.isTop,
"allowCancelTop": this.isAdmin && this.document.docStatus == "published" && this.document.isTop
};
},
errorLoadingV2 : function( error, type ){
......
......@@ -35,6 +35,11 @@ MWF.xApplication.cms.Document.LP = {
"hotPicture": "Hot Picture",
"cancelHotPicture": "Cancel hotspot",
"setHotPicture": "Set HotPicture",
"regularPublish": "Regular Publish",
"publishTime": "Publish Time",
"publish": "Publish",
"inputPublishTime": "Publish time cannot be empty",
"inputPublishTime2": "Publish time cannot be earlier than current time",
"setHotLinkSuccess": "Set hotspot picture successfully",
"cancelHotLinkSuccess": "Cancel hotspot picture success",
"selectDocPicture": "Select Document Picture",
......
......@@ -35,6 +35,11 @@ MWF.xApplication.cms.Document.LP = {
"hotPicture" : "热点图片",
"cancelHotPicture" : "取消热点",
"setHotPicture" : "设置热点",
"regularPublish": "定时发布",
"publishTime": "发布时间",
"publish": "发布",
"inputPublishTime": "发布时间不能为空",
"inputPublishTime2": "发布时间不能早于当前时间",
"setHotLinkSuccess" : "设置热点图片成功",
"cancelHotLinkSuccess" : "取消热点图片成功",
"selectDocPicture" : "选择文档图片",
......
......@@ -46,6 +46,18 @@
"read": false,
"edit" : true
},
{
"type": "MWFToolBarButton",
"img": "submitDelayed.png",
"img_over": "submitDelayed_over.png",
"title": "{{$.lp.publishDelayedTitle}}",
"action": "publishDocumentDelayed",
"text": "{{$.lp.publishDelayed}}",
"id": "action_publishDocumentDelayed",
"control": "allowPublishDocumentDelayed",
"read": false,
"edit" : true
},
{
"type": "MWFToolBarButton",
"img": "save.png",
......
......@@ -70,6 +70,8 @@ MWF.xApplication.cms.FormDesigner.LP = Object.merge( {}, MWF.xApplication.proces
"saveTitle": "Save Document",
"publish": "Publish",
"publishTitle": "Publish Document",
"publishDelayed": "Timely publish",
"publishDelayedTitle": "Publish documents regularly",
"saveDraft": "Save Draft",
"saveDraftTitle": "Save Draft",
"popular": "Set Popular",
......
......@@ -73,6 +73,8 @@ MWF.xApplication.cms.FormDesigner.LP = Object.merge( {}, MWF.xApplication.proces
"saveTitle": "保存文档",
"publish": "发布",
"publishTitle": "发布文档",
"publishDelayed": "定时发布",
"publishDelayedTitle": "定时发布文档",
"saveDraft": "保存草稿",
"saveDraftTitle": "保存草稿",
"popular": "设置热点",
......
[
{
"title" : MWF.xApplication.cms.Module.LP.subject,
"headStyles" : "titleAreaHeadNode",
"contentStyles" : "titleAreaContentNode",
"item" : "title",
"name" : "titleAreaNode",
"sortByClickTitle" : "yes",
"width" : "38%"
},
{
"title" : MWF.xApplication.cms.Module.LP.creatorPerson,
"headStyles" : "personAreaHeadNode",
"contentStyles" : "personAreaContentNode",
"item" : "creatorPersonShort",
"name" : "personAreaNode",
"sortByClickTitle" : "yes",
"width" : "11%"
},
{
"title" : MWF.xApplication.cms.Module.LP.creatorDepartment,
"headStyles" : "departmentAreaHeadNode",
"contentStyles" : "departmentAreaContentNode",
"item" : "creatorUnitNameShort",
"name" : "departmentAreaNode",
"sortByClickTitle" : "yes",
"width" : "11%"
},
{
"title" : MWF.xApplication.cms.Module.LP.category,
"headStyles" : "categoryAreaHeadNode",
"contentStyles" : "categoryAreaContentNode",
"item" : "categoryName",
"name" : "categoryAreaNode",
"sortByClickTitle" : "yes",
"width" : "11%"
},
{
"title" : MWF.xApplication.cms.Module.LP.publishTimeDelay,
"headStyles" : "timeAreaHeadNode",
"contentStyles" : "timeAreaContentNode",
"item" : "publishTime",
"name" : "timeAreaNode",
"sortByClickTitle" : "yes",
"width" : "15%"
},
{
"access" : "admin",
"title" : MWF.xApplication.cms.Module.LP.action,
"headStyles" : "actionAreaHeadNode",
"contentStyles" : "actionAreaContentNode",
"item" : "action",
"name" : "actionAreaNode",
"width" : "13%"
}
]
......@@ -74,4 +74,13 @@
}
.o2icon-list4:before {
content: "\e9c1";
}
.o2icon-publishdelay:before {
content: "\e901";
}
.o2icon-clock2:before {
content: "\e9ab";
}
.o2icon-spinner:before {
content: "\e97d";
}
\ No newline at end of file
......@@ -140,7 +140,8 @@ MWF.xApplication.cms.Module.ListExplorer = new Class({
this.view = new MWF.xApplication.cms.Module.ListExplorer.ListForALL(this.elementContentNode, this.app,this, this.viewData, this.options.searchKey );
}else if( this.revealData.isDraft ){
this.view = new MWF.xApplication.cms.Module.ListExplorer.ListForDraft(this.elementContentNode, this.app,this, this.viewData, this.options.searchKey );
}else if( this.revealData.isDelay ){
this.view = new MWF.xApplication.cms.Module.ListExplorer.ListForDelay(this.elementContentNode, this.app,this, this.viewData, this.options.searchKey );
}else if( (this.revealData.id == "defaultList") || (this.options.searchKey && this.options.searchKey!="") ){
this.view = new MWF.xApplication.cms.Module.ListExplorer.DefaultList(this.elementContentNode, this.app,this, this.viewData, this.options.searchKey );
}else{
......@@ -767,6 +768,95 @@ MWF.xApplication.cms.Module.ListExplorer.ListForDraft = new Class({
});
MWF.xApplication.cms.Module.ListExplorer.ListForDelay = new Class({
Extends: MWF.xApplication.cms.Module.ListExplorer.DefaultList,
createListHead : function(){
var _self = this;
var headNode = this.headNode = new Element("tr", {"styles": this.css.listHeadNode}).inject(this.table);
if( this.selectEnable ){
this.createSelectTh();
}
var listItemUrl = this.explorer.path+"listItemForDelay.json";
MWF.getJSON(listItemUrl, function(json){
this.listItemTemplate = json;
json.each(function(cell){
var isShow = true;
if( cell.access ){
if( cell.access == "admin" && !this.explorer.options.isAdmin ){
isShow = false;
}
}
if(isShow) {
var th = new Element("th", {
"styles": this.css[cell.headStyles],
"width": cell.width,
"text": cell.title
}).inject(headNode)
}
//var thText = new Element("div",{
// "styles" : this.css.thTextNode,
// "text": cell.title
//}).inject(th);
if( cell.sortByClickTitle == "yes" ){
th.store("field",cell.item);
if( this.orderField == cell.item && this.orderType!="" ){
th.store("orderType",this.orderType);
this.sortIconNode = new Element("div",{
"styles": this.orderType == "asc" ? this.css.sortIconNode_asc : this.css.sortIconNode_desc
}).inject( th, "bottom" );
}else{
th.store("orderType","");
this.sortIconNode = new Element("div",{"styles":this.css.sortIconNode}).inject( th, "bottom" );
}
th.setStyle("cursor","pointer");
th.addEvent("click",function(){
_self.resort( this );
})
}
}.bind(this));
}.bind(this),false);
},
_getCurrentPageData: function(callback, count){
if(!count)count=this.explorer.countPerPage;
// var id = (this.items.length) ? this.items[this.items.length-1].data.id : "(0)";
var page = this.currentPage || 1;
this.currentPage = page + 1;
var data = {
"appIdList": [ this.explorer.columnData.id ],
"statusList": [ "waitPublish" ],
"orderField" : this.orderField || null,
"orderType" : this.orderType || null,
"documentType": "全部"
};
if( this.searchKey && this.searchKey!="" ){
data.title = this.searchKey
}
if (this.filter && this.filter.filter ){
var filterResult = this.filter.getFilterResult();
for(var f in filterResult ){
data[f] = filterResult[f];
}
o2.Actions.load("x_cms_assemble_control").DocumentAction.query_listWithFilterPaging(page, count || this.pageCount, data, function(json){
if (callback) callback(json);
});
// this.actions.listDocumentFilterNext(id, count || this.pageCount, data, function(json){
// if (callback) callback(json);
// });
}else{
o2.Actions.load("x_cms_assemble_control").DocumentAction.query_listWithFilterPaging(page, count || this.pageCount, data, function(json){
if (callback) callback(json);
});
// this.actions.listDocumentFilterNext(id, count || this.pageCount, data, function(json){
// if (callback) callback(json);
// });
}
}
});
MWF.xApplication.cms.Module.ListExplorer.List = new Class({
Extends: MWF.xApplication.cms.Module.ListExplorer.DefaultList,
......
......@@ -1174,6 +1174,10 @@ MWF.xApplication.cms.Module.Navi = new Class({
if( this.columnData.config.latest === false ){
this.draftView = new MWF.xApplication.cms.Module.NaviDraftView( this, this.node, {} );
}
var allowWaitPublish = (typeOf(this.columnData.allowWaitPublish) === "boolean" ? this.columnData.allowWaitPublish : false).toString();
if( allowWaitPublish !== "false" ){
this.delayView = new MWF.xApplication.cms.Module.NaviDelayView( this, this.node, {} );
}
new Element("div",{
......@@ -1732,3 +1736,106 @@ MWF.xApplication.cms.Module.NaviDraftView = new Class({
this.app.openView( this, null, this.data, searchKey || "", this );
}
});
MWF.xApplication.cms.Module.NaviDelayView = new Class({
Implements: [Options, Events],
options: {
"style": "default"
},
initialize: function ( navi, container, options) {
this.setOptions(options);
this.navi = navi;
this.app = navi.app;
this.container = $(container);
this.css = this.app.css;
this.data = {
"isDelay" : true,
"id" : "defaultList"
};
this.load();
},
load: function(){
var _self = this;
this.isDefault = true;
this.isAll = true;
this.isCurrent = false;
this.isCategory = false;
this.listNode = new Element("div.viewNaviListNode_all",{
"styles" : this.css.viewNaviListNode_all
}).inject(this.container);
this.node = new Element("div.viewNaviNode_all", {
"styles": this.css.viewNaviNode_all,
"text" : this.app.lp.delayStatus
}).inject(this.listNode);
this.iconNode = new Element("i.o2icon-clock2", {
"styles": this.css.viewNaviIcon_all
}).inject(this.node, "top");
this.node.addEvents({
"mouseover": function(){ if ( !_self.isCurrent ){
this.setStyles(_self.css.viewNaviNode_all_over);
this.addClass( "mainColor_bg_opacity" );
} },
"mouseout": function(){ if ( !_self.isCurrent ){
this.setStyles( _self.css.viewNaviNode_all );
this.removeClass( "mainColor_bg_opacity" );
} },
"click": function (el) {
_self.setCurrent();
}
});
new Element("div", {
"styles": this.css.viewNaviSepartorNode
}).inject(this.listNode);
if( this.isCurrent ){
this.setCurrent()
}
},
setCurrent : function(){
if( this.navi.currentObject ){
this.navi.currentObject.cancelCurrent();
}
this.node.setStyles( this.css.viewNaviNode_all_selected );
this.node.addClass( "mainColor_color" );
this.node.addClass( "mainColor_bg_opacity" );
this.iconNode.setStyles( this.css.viewNaviIcon_all_selected );
this.iconNode.addClass( "mainColor_color" );
this.isCurrent = true;
this.navi.currentObject = this;
var action = this.app.importAction;
if( action ){
action.setStyle("display","none");
}
var action = this.app.exportAction;
if( action ){
action.setStyle("display","none");
}
this.loadView();
},
cancelCurrent : function(){
this.isCurrent = false;
this.node.setStyles( this.css.viewNaviNode_all );
this.node.removeClass( "mainColor_color" );
this.node.removeClass( "mainColor_bg_opacity" );
this.iconNode.setStyles( this.css.viewNaviIcon_all );
this.iconNode.removeClass( "mainColor_color" );
},
getCategoryId : function(){
return null;
},
loadView : function( searchKey ){
this.app.openView( this, null, this.data, searchKey || "", this );
}
});
\ No newline at end of file
......@@ -2,6 +2,7 @@ MWF.xApplication.cms.Module.LP = {
"title": "Content Management",
"draftStatus": "Draft",
"delayStatus" : "Scheduled",
"publishedStatus": "Published",
"archivedStatus": "Archived",
......@@ -102,5 +103,6 @@ MWF.xApplication.cms.Module.LP = {
"creatorCompany": "Create Company",
"creatorDepartment": "Create Department",
"creatorPerson": "Creator",
"publishTime": "Publish Time"
"publishTime": "Publish Time",
"publishTimeDelay": "Timed publishing time"
};
\ No newline at end of file
......@@ -2,6 +2,7 @@ MWF.xApplication.cms.Module.LP = {
"title": "内容管理",
"draftStatus" : "草稿",
"delayStatus" : "定时发布",
"publishedStatus" : "已发布",
"archivedStatus" : "已归档",
......@@ -28,6 +29,7 @@ MWF.xApplication.cms.Module.LP = {
"completedTime": "完成时间",
"process": "流程",
"batchRemove" : "清除",
"batchRemoveConfirm" : "确定清除",
......@@ -102,8 +104,8 @@ MWF.xApplication.cms.Module.LP = {
"creatorCompany": "创建公司",
"creatorDepartment": "创建部门",
"creatorPerson": "创建人",
"publishTime": "发布时间"
"publishTime": "发布时间",
"publishTimeDelay": "定时发布时间"
};
\ No newline at end of file
......@@ -191,6 +191,9 @@ MWF.xApplication.cms.Xform.Actionbar = MWF.CMSActionbar = new Class({
publishDocument: function(){
this.form.publishDocument();
},
publishDocumentDelayed: function(){
this.form.publishDocumentDelayed();
},
archiveDocument: function(){
this.form.archiveDocument();
},
......
......@@ -126,6 +126,9 @@ MWF.xApplication.cms.Xform.ProcessActionbar = MWF.CMSProcessActionbar = new Cla
publishDocument: function(){
this.form.publishDocument();
},
publishDocumentDelayed: function(){
this.form.publishDocumentDelayed();
},
archiveDocument: function(){
this.form.archiveDocument();
},
......
......@@ -6,7 +6,7 @@ MWF.xApplication.cms.Xform = MWF.xApplication.cms.Xform || {};
MWF.xApplication.cms.Xform.LP = Object.merge({}, MWF.xApplication.process.Xform.LP, {
"dataSaved": "Data saved successfully",
"documentPublished": "Published successfully",
"documentDelayedPublished": "Timed Published Successfully",
"noSelectRange": "Cannot determine the selection range",
......@@ -83,6 +83,8 @@ MWF.xApplication.cms.Xform.LP = Object.merge({}, MWF.xApplication.process.Xform
"saveTitle": "Save Document",
"publish": "Publish",
"publishTitle": "Publish Document",
"publishDelayed": "Timed publishing",
"publishDelayedTitle": "Publish the document regularly",
"saveDraft": "Save Draft",
"saveDraftTitle": "Save Draft",
"popular": "Set focus document",
......
......@@ -6,7 +6,7 @@ MWF.xApplication.cms.Xform = MWF.xApplication.cms.Xform || {};
MWF.xApplication.cms.Xform.LP = Object.merge({}, MWF.xApplication.process.Xform.LP, {
"dataSaved": "数据保存成功",
"documentPublished" : "发布成功" ,
"documentDelayedPublished": "定时发布成功",
"noSelectRange": "无法确定选择范围",
......@@ -83,6 +83,8 @@ MWF.xApplication.cms.Xform.LP = Object.merge({}, MWF.xApplication.process.Xform.
"saveTitle": "保存文档",
"publish": "发布",
"publishTitle": "发布文档",
"publishDelayed": "定时发布",
"publishDelayedTitle": "定时发布文档",
"saveDraft": "保存草稿",
"saveDraftTitle": "保存草稿",
"popular": "设置热点",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册