提交 6a75fab3 编写于 作者: NoSubject's avatar NoSubject

新增启动模式:“草稿模式”

上级 db5a7315
......@@ -36,6 +36,7 @@ o2.widget.Dialog = o2.DL = new Class({
"container": null
},
initialize: function(options){
debugger;
this.setOptions(options);
this.path = o2.session.path+"/widget/$Dialog/";
......
......@@ -113,8 +113,8 @@
"listDraftPrev": {"uri": "/jaxrs/draft/list/{id}/prev/{count}"},
"listDraftPage": {"uri": "/jaxrs/draft/list/my/paging/{page}/size/{size}", "method": "POST"},
"listDraftApplication": {"uri": "/jaxrs/draft/list/count/application"},
"startDraft": {"uri": "/jaxrs/draft/{id}/start"},
"deleteDraftWork": {"uri": "/jaxrs/draft/{id}", "method": "DELETE"},
"getTask": {"uri": "/jaxrs/task/{id}"},
"saveTask": {"uri": "/jaxrs/task/{id}", "method": "POST"},
......
......@@ -820,6 +820,7 @@ o2.xDesktop.Dialog = o2.DDL = new Class({
}
});
o2.DL.open = function(options){
debugger;
if (!options) options = {};
if (!options.style) options.style = "user";
//if (!options.transition) options.transition = Fx.Transitions.Back.easeOut;
......@@ -827,14 +828,14 @@ o2.DL.open = function(options){
if (options.isClose!==false) options.isClose = true;
var size;
if (!options.width && !options.contentWidth){
if ((!options.width || options.width=="auto") && !options.contentWidth){
if (options.content){
options.content.show();
size = options.content.getComputedSize();
options.contentWidth = size.totalWidth.toFloat();
}
}
if (!options.height && !options.contentHeight){
if ((!options.height || options.height=="auto") && !options.contentHeight){
if (options.content){
if (!size){
options.content.show();
......
......@@ -23,7 +23,7 @@ MWF.xApplication.process.TaskCenter.DraftList = new Class({
this.initData();
this.filterData = null;
if (this.applicationFilterAreaNode) this.applicationFilterAreaNode.empty();
//this.createAppFilterNodes();
this.createAppFilterNodes();
this.listAreaNode.empty();
this.resetListAreaHeight();
this.app.getWorkCounts();
......
......@@ -1065,12 +1065,12 @@ MWF.xApplication.process.TaskCenter.Process = new Class({
var options = {"draft": work, "appId": "process.Work"+(new o2.widget.UUID).toString(), "desktopReload": false};
this.app.desktop.openApplication(null, "process.Work", options);
var msg = {
"subject": this.app.lp.processStarted,
"content": "<div>"+this.app.lp.processStartedMessage+"“["+processName+"]"+title+"”</div>"
};
var tooltip = layout.desktop.message.addTooltip(msg);
var item = layout.desktop.message.addMessage(msg);
// var msg = {
// "subject": this.app.lp.processStarted,
// "content": "<div>"+this.app.lp.processStartedMessage+"“["+processName+"]"+title+"”</div>"
// };
// var tooltip = layout.desktop.message.addTooltip(msg);
// var item = layout.desktop.message.addMessage(msg);
},
startProcessInstance: function(data, title, processName){
var workInfors = [];
......
......@@ -32,6 +32,8 @@
},
"processNode_Area": {
"height": "300px",
"width": "700px",
"padding": "10px",
"background-color": "#FFF",
"overflow": "hidden"
},
......
......@@ -89,7 +89,7 @@
"float": "left",
"margin-left": "20px",
"padding-left" : "26px",
"border-radius": "5px",
"border-radius": "20px",
"min-height": "24px",
"line-height": "24px",
"margin-top": "8px",
......
......@@ -240,7 +240,7 @@ MWF.xApplication.process.Work.Main = new Class({
"allowVisit": true,
"allowProcessing": true,
"allowSave": true,
"allowDelete": false
"allowDelete": true
};
this.parseData(workData, control, json_form.data, [], [], []);
......@@ -349,9 +349,11 @@ MWF.xApplication.process.Work.Main = new Class({
//this.inheritedAttachmentList = data.inheritedAttachmentList;
this.control = controlData;
this.form = (formData.data) ? JSON.decode(MWF.decodeJsonString(formData.data)): null;
delete formData.data;
this.formInfor = formData;
if (formData){
this.form = (formData.data) ? JSON.decode(MWF.decodeJsonString(formData.data)): null;
delete formData.data;
this.formInfor = formData;
}
},
// loadWork2: function(){
......
......@@ -62,7 +62,7 @@ MWF.xApplication.process.Work.Processor = new Class({
if( layout.mobile ){
this.orgsArea = new Element("div", {"styles": this.css.orgsArea}).inject(this.node);
this.orgsTile = new Element("div", {"styles": this.css.orgsTitle, "text": MWF.xApplication.process.Work.LP.selectPerson}).inject(this.orgsArea);
this.orgsArea.hide()
this.orgsArea.hide();
}else{
this.orgsArea = new Element("div", {"styles": this.css.orgsArea}).inject(this.node);
this.orgsTile = new Element("div", {"styles": this.css.orgsTitle, "text": MWF.xApplication.process.Work.LP.selectPerson}).inject(this.orgsArea);
......@@ -248,9 +248,11 @@ MWF.xApplication.process.Work.Processor = new Class({
if (this.selectedRouteGroup){
if (this.selectedRouteGroup.get("text") != node.get("text")){
this.selectedRouteGroup.setStyles(this.css.routeGroupNode);
//this.selectedRouteGroup.removeClass("mainColor_bg");
this.selectedRouteGroup = node;
this.selectedRouteGroup.setStyles(this.css.routeGroupNode_selected);
//this.selectedRouteGroup.addClass("mainColor_bg");
var routeList = this.selectedRouteGroup.retrieve("routeList");
this.setRouteList( routeList );
......@@ -265,6 +267,7 @@ MWF.xApplication.process.Work.Processor = new Class({
}else{
this.selectedRouteGroup = node;
node.setStyles(this.css.routeGroupNode_selected);
//this.selectedRouteGroup.addClass("mainColor_bg");
var routeList = this.selectedRouteGroup.retrieve("routeList");
this.setRouteList( routeList );
......@@ -341,19 +344,23 @@ MWF.xApplication.process.Work.Processor = new Class({
if (this.selectedRoute){
if (this.selectedRoute.get("text") != node.get("text")){
node.setStyles(this.css.routeNode_over);
node.addClass("lightColor_bg");
//node.setStyle("background-color", "#f7e1d0");
}
}else{
node.setStyles(this.css.routeNode_over);
node.addClass("lightColor_bg");
}
},
outRoute: function(node){
if (this.selectedRoute){
if (this.selectedRoute.get("text") != node.get("text")){
node.setStyles(this.css.routeNode);
node.removeClass("lightColor_bg");
}
}else{
node.setStyles(this.css.routeNode);
node.removeClass("lightColor_bg");
}
},
selectRoute_noform: function(node){
......@@ -378,17 +385,22 @@ MWF.xApplication.process.Work.Processor = new Class({
if (this.selectedRoute){
if (this.selectedRoute.get("text") != node.get("text")){
this.selectedRoute.setStyles(this.css.routeNode);
this.selectedRoute.removeClass("mainColor_bg");
//this.selectedRoute.getFirst().setStyles(this.css.routeIconNode);
//this.selectedRoute.getLast().setStyles(this.css.routeTextNode);
this.selectedRoute = node;
node.setStyles(this.css.routeNode_selected);
node.addClass("mainColor_bg");
node.removeClass("lightColor_bg");
//node.setStyle("background-color", "#da7429");
//node.getFirst().setStyle("background-image", "url("+"/x_component_process_Work/$Processor/default/checked.png)");
//node.getLast().setStyle("color", "#FFF");
}else{
this.selectedRoute.setStyles(this.css.routeNode);
this.selectedRoute.addClass("mainColor_bg");
this.selectedRoute.removeClass("lightColor_bg");
//this.selectedRoute.getFirst().setStyles(this.css.routeIconNode);
//this.selectedRoute.getLast().setStyles(this.css.routeTextNode);
......@@ -397,6 +409,8 @@ MWF.xApplication.process.Work.Processor = new Class({
}else{
this.selectedRoute = node;
node.setStyles(this.css.routeNode_selected);
node.addClass("mainColor_bg");
node.removeClass("lightColor_bg");
//node.setStyle("background-color", "#da7429");
//node.getFirst().setStyle("background-image", "url("+"/x_component_process_Work/$Processor/default/checked.png)");
//node.getLast().setStyle("color", "#FFF");
......
......@@ -128,6 +128,18 @@ MWF.xApplication.process.Xform.Actionbar = MWF.APPActionbar = new Class({
// flag = false;
// }
// }
if (tool.id == "action_downloadAll" || tool.id == "action_print"){
if (!this.form.businessData.activity || !this.form.businessData.activity.id){
flag = false;
}
}
if (tool.id == "action_delete"){
if (!this.form.businessData.work || !this.form.businessData.work.id){
flag = false;
}
}
if (tool.id == "action_rollback") tool.read = true;
if (readonly) if (!tool.read) flag = false;
if (flag){
......
......@@ -1031,8 +1031,10 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
_loadUserInterface: function () {
this.node.empty();
this.loadAttachmentController();
this.fireEvent("load");
if (this.form.businessData.activity && this.form.businessData.activity.id){
this.loadAttachmentController();
this.fireEvent("load");
}
},
loadAttachmentController: function () {
//MWF.require("MWF.widget.AttachmentController", function() {
......@@ -1103,7 +1105,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class({
},
getData: function () {
return this.attachmentController.getAttachmentNames();
return (this.attachmentController) ? this.attachmentController.getAttachmentNames() : null;
},
createUploadFileNode: function () {
var accept = "*";
......
......@@ -18,6 +18,11 @@ MWF.xApplication.process.Xform.LP = {
"arrivedUsers": "到达处理人",
"replace": "",
"processStarted": "文件已启动",
"processStartedMessage": "您启动了一个新的工作:",
"draftStart": "流程已启动",
"taskCompleted": "待办已处理",
"workCompleted": "工作流转已完成",
"arrivedActivity": "工作已到达活动:",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册