Просмотр исходного кода

完成查看流程版本功能

huqi 5 лет назад
Родитель
Сommit
2725b220fb
20 измененных файлов с 406 добавлено и 464 удалено
  1. 1 0
      o2web/source/o2_core/o2/widget/Dialog.js
  2. 3 0
      o2web/source/o2_core/o2/xDesktop/$Default/blue/style-skin.css
  3. 8 0
      o2web/source/o2_core/o2/xDesktop/$Default/cyan/style-skin.css
  4. 3 0
      o2web/source/o2_core/o2/xDesktop/$Default/darkgreen/style-skin.css
  5. 6 0
      o2web/source/o2_core/o2/xDesktop/$Default/gray/style-skin.css
  6. 6 0
      o2web/source/o2_core/o2/xDesktop/$Default/green/style-skin.css
  7. 3 0
      o2web/source/o2_core/o2/xDesktop/$Default/navy/style-skin.css
  8. 6 0
      o2web/source/o2_core/o2/xDesktop/$Default/orange/style-skin.css
  9. 6 0
      o2web/source/o2_core/o2/xDesktop/$Default/purple/style-skin.css
  10. 6 0
      o2web/source/o2_core/o2/xDesktop/$Default/red/style-skin.css
  11. 3 0
      o2web/source/o2_core/o2/xDesktop/$Default/tan/style-skin.css
  12. 1 0
      o2web/source/o2_core/o2/xDesktop/Dialog.js
  13. 1 0
      o2web/source/x_component_process_ProcessDesigner/Main.js
  14. 37 13
      o2web/source/x_component_process_ProcessDesigner/Process.js
  15. 38 1
      o2web/source/x_component_process_ProcessDesigner/lp/zh-cn.js
  16. 66 2
      o2web/source/x_component_process_ProcessDesigner/widget/$EditionList/default/css.wcss
  17. BIN
      o2web/source/x_component_process_ProcessDesigner/widget/$EditionList/default/icon/check.png
  18. BIN
      o2web/source/x_component_process_ProcessDesigner/widget/$EditionList/default/icon/select.png
  19. BIN
      o2web/source/x_component_process_ProcessDesigner/widget/$EditionList/default/icon/unselect.png
  20. 212 448
      o2web/source/x_component_process_ProcessDesigner/widget/EditionList.js

+ 1 - 0
o2web/source/o2_core/o2/widget/Dialog.js

@@ -243,6 +243,7 @@ o2.widget.Dialog = o2.DL = new Class({
 				var button = new Element("input", {
 					"type": "button",
 					"value": bt.text,
+					"title": bt.title,
 					"styles": styles,
 					"events": {
 						"click": function(e){bt.action.call(this, this, e)}.bind(this)

+ 3 - 0
o2web/source/o2_core/o2/xDesktop/$Default/blue/style-skin.css

@@ -84,6 +84,9 @@
 .grayColor_bg {
     background-color: #e6e6e6 !important;
 }
+.lightColor_bg {
+    background-color: #F7FBFF !important;
+}
 
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/blue/icons/logo_o2_40.png) !important;

+ 8 - 0
o2web/source/o2_core/o2/xDesktop/$Default/cyan/style-skin.css

@@ -38,6 +38,14 @@
 .badgeColor_border {
     border-color: #66CC80 !important;
 }
+
+.grayColor_bg {
+    background-color: #e6e6e6 !important;
+}
+.lightColor_bg {
+    background-color: #F7FFF9 !important;
+}
+
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/cyan/icons/logo_o2_40.png) !important;
 }

+ 3 - 0
o2web/source/o2_core/o2/xDesktop/$Default/darkgreen/style-skin.css

@@ -41,6 +41,9 @@
 .grayColor_bg {
     background-color: #e6e6e6 !important;
 }
+.lightColor_bg {
+    background-color: #FAFFF7 !important;
+}
 
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/darkgreen/icons/logo_o2_40.png) !important;

+ 6 - 0
o2web/source/o2_core/o2/xDesktop/$Default/gray/style-skin.css

@@ -38,6 +38,12 @@
 .badgeColor_border {
     border-color: #66CC80 !important;
 }
+.grayColor_bg {
+    background-color: #e6e6e6 !important;
+}
+.lightColor_bg {
+    background-color: #F7F7F7 !important;
+}
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/gray/icons/logo_o2_40.png) !important;
 }

+ 6 - 0
o2web/source/o2_core/o2/xDesktop/$Default/green/style-skin.css

@@ -38,6 +38,12 @@
 .badgeColor_border {
     border-color: #66CC80 !important;
 }
+.grayColor_bg {
+    background-color: #e6e6e6 !important;
+}
+.lightColor_bg {
+    background-color: #F7FFF9 !important;
+}
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/green/icons/logo_o2_40.png) !important;
 }

+ 3 - 0
o2web/source/o2_core/o2/xDesktop/$Default/navy/style-skin.css

@@ -41,6 +41,9 @@
 .grayColor_bg {
     background-color: #e6e6e6 !important;
 }
+.lightColor_bg {
+    background-color: #F7F7FF !important;
+}
 
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/navy/icons/logo_o2_40.png) !important;

+ 6 - 0
o2web/source/o2_core/o2/xDesktop/$Default/orange/style-skin.css

@@ -38,6 +38,12 @@
 .badgeColor_border {
     border-color: #66CC80 !important;
 }
+.grayColor_bg {
+    background-color: #e6e6e6 !important;
+}
+.lightColor_bg {
+    background-color: #FFFBF7 !important;
+}
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/orange/icons/logo_o2_40.png) !important;
 }

+ 6 - 0
o2web/source/o2_core/o2/xDesktop/$Default/purple/style-skin.css

@@ -38,6 +38,12 @@
 .badgeColor_border {
     border-color: #66CC80 !important;
 }
+.grayColor_bg {
+    background-color: #e6e6e6 !important;
+}
+.lightColor_bg {
+    background-color: #FFF7FC !important;
+}
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/purple/icons/logo_o2_40.png) !important;
 }

+ 6 - 0
o2web/source/o2_core/o2/xDesktop/$Default/red/style-skin.css

@@ -38,6 +38,12 @@
 .badgeColor_border {
     border-color: #66CC80 !important;
 }
+.grayColor_bg {
+    background-color: #e6e6e6 !important;
+}
+.lightColor_bg {
+    background-color: #FFF7F7 !important;
+}
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/red/icons/logo_o2_40.png) !important;
 }

+ 3 - 0
o2web/source/o2_core/o2/xDesktop/$Default/tan/style-skin.css

@@ -41,6 +41,9 @@
 .grayColor_bg {
     background-color: #e6e6e6 !important;
 }
+.lightColor_bg {
+    background-color: #FFFBF7 !important;
+}
 
 .logo_o2_40 {
     background-image: url(/o2_core/o2/xDesktop/$Default/tan/icons/logo_o2_40.png) !important;

+ 1 - 0
o2web/source/o2_core/o2/xDesktop/Dialog.js

@@ -139,6 +139,7 @@ o2.xDesktop.Dialog = o2.DDL = new Class({
                 }
                 button.set({
                     "value": bt.text,
+                    "title": bt.title,
                     "styles": styles,
                     "events": {
                         "click": function(e){bt.action.call(this, this, e)}.bind(this)

+ 1 - 0
o2web/source/x_component_process_ProcessDesigner/Main.js

@@ -734,6 +734,7 @@ MWF.xApplication.process.ProcessDesigner.Main = new Class({
         }
     },
     recordStatus: function(){
+        debugger;
         return {"id": this.options.id};
     },
     saveProcess: function(){

+ 37 - 13
o2web/source/x_component_process_ProcessDesigner/Process.js

@@ -190,6 +190,7 @@ MWF.xApplication.process.ProcessDesigner.Process = new Class({
 		this.reload(this.process);
 	},
 	reload: function(process){
+		debugger;
 		//this.process = process;
 		this.panel.destroy();
 		this.paper.clear();
@@ -206,6 +207,15 @@ MWF.xApplication.process.ProcessDesigner.Process = new Class({
 		}.bind(this));
 		this.showProperty();
 		this.showEditionInfor();
+		if (process && this.designer.options.id != process.id){
+			var app = layout.desktop.apps["process.ProcessDesigner"+this.designer.options.id];
+			if (app){
+				delete layout.desktop.apps["process.ProcessDesigner"+this.designer.options.id];
+				this.designer.appId = "process.ProcessDesigner"+process.id;
+				layout.desktop.apps[this.designer.appId] = this.designer;
+			}
+			this.designer.setOptions({"id": process.id});
+		}
 	},
 	setEvent: function(){
 		this.paper.canvas.addEvent("selectstart", function(e){e.preventDefault();e.stopPropagation();});
@@ -370,17 +380,18 @@ MWF.xApplication.process.ProcessDesigner.Process = new Class({
 	showEditionInfor: function(){
 		if (this.process.edition){
 			if (this.designer.processEditionNode){
+				this.designer.processEditionNode.removeEvents("click");
 				if (this.process.editionEnable){
 					this.designer.processEditionNode.set("text", this.designer.lp.enable);
+					this.designer.processEditionNode.addClass("mainColor_bg");
 				}else{
 					this.designer.processEditionNode.set("text", this.designer.lp.notEnable);
 					this.designer.processEditionNode.removeClass("mainColor_bg");
-				}
-
 
-				this.designer.processEditionNode.addEvent("click", function(){
-					this.enableCurrentEdition();
-				}.bind(this));
+					this.designer.processEditionNode.addEvent("click", function(e){
+						this.enableCurrentEdition(e);
+					}.bind(this));
+				}
 			}
 			if (this.designer.processEditionInforNode){
 				var text = this.designer.lp.currentEdition+": <span class='mainColor_color'>"+this.process.editionNumber+"</span> "+this.designer.lp.editionUpdate+": <span class='mainColor_color'>"+o2.name.cn(this.process.lastUpdatePerson)+" ("+this.process.updateTime+")</span>";
@@ -388,8 +399,20 @@ MWF.xApplication.process.ProcessDesigner.Process = new Class({
 			}
 		}
 	},
-	enableCurrentEdition: function(){
-		//@todo enable edition
+	enableCurrentEdition: function(e){
+		var _self = this;
+		this.designer.confirm("infor", e, this.designer.lp.edition_list.enabledProcessTitle, {"html": this.designer.lp.edition_list.enabledProcessInfor}, 600, 120, function(){
+			_self.save(function(){
+				var actions = o2.Actions.load("x_processplatform_assemble_designer").ProcessAction;
+				actions.enableProcess(this.process.id, function(json){
+					actions.get(this.process.id, function(json){
+						this.reload(json.data);
+					}.bind(this))
+				}.bind(this));
+			}.bind(_self));
+			this.close();
+		},function(){this.close();})
+
 	},
 
 	unSelected: function(e){
@@ -612,7 +635,7 @@ MWF.xApplication.process.ProcessDesigner.Process = new Class({
 	listEdition: function(){
 		if (this.process.edition){
 			MWF.xDesktop.requireApp("process.ProcessDesigner", "widget.EditionList", function(){
-				var list = new MWF.xApplication.process.ProcessDesigner.widget.EditionList(this.process.application, this.process.edition);
+				var list = new MWF.xApplication.process.ProcessDesigner.widget.EditionList(this.process.application, this.process.edition, this);
 				list.load();
 			}.bind(this));
 
@@ -896,14 +919,15 @@ MWF.xApplication.process.ProcessDesigner.Process = new Class({
                 this.process.isNewProcess = false;
                 this.designer.notice(MWF.APPPD.LP.notice["save_success"], "ok", null, {x: "left", y:"bottom"} );
                 this.isNewProcess = false;
-                if (reload){
+                this.designer.options.id = responseJSON.data.id;
+				if (reload){
 					this.designer.actions.getProcess(responseJSON.data.id, function(json){
-					   this.reload(json.data);
-					   if (callback) callback();
+						this.reload(json.data);
+						if (callback) callback();
 					}.bind(this));
+				}else{
+					if (callback) callback();
 				}
-
-                this.designer.options.id = responseJSON.data.id;
             }.bind(this), function(xhr, text, error){
                 this.isSave = false;
 

+ 38 - 1
o2web/source/x_component_process_ProcessDesigner/lp/zh-cn.js

@@ -18,6 +18,7 @@ MWF.xApplication.process.ProcessDesigner.LP = {
     "condition": "条件",
     "unCategory": "未分类",
 	"ok": "确定",
+	"close": "关闭",
 	"cancel": "取消",
 
 	"notice":{
@@ -43,6 +44,12 @@ MWF.xApplication.process.ProcessDesigner.LP = {
 			"merge": "合并活动",
 			"embed": "子流程活动",
 			"invoke": "调用活动",
+			"service": "服务活动",
+			"agent": "脚本活动",
+			"delay": "定时活动",
+			"message": "消息活动",
+			"choice": "选择活动",
+			"cancel": "取消活动",
 			"begin": "开始活动",
 			"end": "结束活动"
 		},
@@ -130,10 +137,40 @@ MWF.xApplication.process.ProcessDesigner.LP = {
 	"inputDiscription": "请先输入版本描述",
 
 	"edition_list":{
+		"editionList": "查看流程版本",
 		"number": "版本号",
 		"update": "更新时间",
 		"updatePerson": "更新人",
-		"description": "版本描述"
+		"description": "版本描述",
+		"enabled": "启用",
+		"action": "操作",
+		"yes": "是",
+		"no": "否",
+		"newProcess": "创建了新的流程。",
+		"an": "个",
+
+		"modifyProcess": "修改了流程的 <b>\"{field}\"</b>,从:<span style='color: #ff0000'>\"{old}\"</span>,修改为:<span style='color: #0000ff'>\"{new}\"</span>",
+		"modifyActivity": "修改了<b>“{name}”</b>活动的 <b>\"{field}\"</b>,从:<span style='color: #ff0000'>\"{old}\"</span>,修改为:<span style='color: #0000ff'>\"{new}\"</span>",
+		"modifyActivity_addRoute": "增加了<b>“{name}”</b>活动的路由,指向<span style='color: #0000ff'>“{next}”</span>",
+		"modifyActivity_deleteRoute": "删除了<b>“{name}”</b>活动的路由,指向<span style='color: #ff0000'>“{next}”</span>",
+		"modifyActivity_modifyRouteNext": "修改了<b>“{name}”</b>活动的路由,从指向<span style='color: #ff0000'>“{oldnext}”</span>,修改为指向<span style='color: #0000ff'>“{newnext}”</span>",
+		"modifyActivity_modifyRouteField": "修改了<b>“{name}”</b>活动的路由,指向“{next}”, <b>\"{field}\"</b> 从:<span style='color: #ff0000'>\"{old}\"</span>,修改为:<span style='color: #0000ff'>\"{new}\"</span>",
+		"deleteActivity": "删除了活动<b style='color: #ff0000'>“{name}”</b>",
+		"addActivity": "增加了活动<b style='color: #0000ff'>“{name}”</b>",
+		"noDiffs": "与上一版本无差异",
+		"hasDiffs": "与上一版本差异:",
+
+		"open": "切换",
+		"rollback": "回滚",
+		"override": "覆盖",
+
+		"openInfor": "保存当前打开的版本,并打开选定的版本。",
+		"rollbackInfor": "将流程设计回滚所选版本,所有所选版本之后的版本会被删除。",
+		"overrideInfor": "用所选版本的设计覆盖当前版本。",
+
+		"enabledProcessTitle": "启用流程确认",
+		"enabledProcessInfor": "将当前流程设置为”启用“,原来已启用的流程版本将被设置为”未启用“。<br><br>已经在流转的流程实例不会受到影响,下次启动流程时,会以已启用的流程版本为模板创建流程实例。<br><br>您确定要将当前流程设置为”启用“吗?"
+
 	}
 
 };

+ 66 - 2
o2web/source/x_component_process_ProcessDesigner/widget/$EditionList/default/css.wcss

@@ -18,7 +18,9 @@
     "listNode": {
         "height": "100%",
         "background-color": "#ffffff",
-        "border": "1px solid #cccccc"
+        "border": "1px solid #cccccc",
+        "font-size": "12px",
+        "overflow": "auto"
     },
     "resizeNode": {
         "float": "left",
@@ -31,6 +33,68 @@
         "background-color": "#ffffff",
         "border": "1px solid #cccccc",
         "float-left": "20px",
-        "margin-left": "10px"
+        "margin-left": "10px",
+        "font-size": "12px",
+        "overflow": "auto"
+    },
+
+    "listTable_th": {
+        "border-bottom": "1px solid #cccccc",
+        "border-right": "1px solid #cccccc",
+        "background-color": "#eeeeee",
+        "color": "#666666"
+    },
+
+    "itemTr": {
+        "background-color": "#ffffff"
+    },
+
+    "listTable_td": {
+        "border-bottom": "1px solid #cccccc",
+        "border-right": "1px solid #cccccc",
+        "color": "#666666",
+        "cursor": "pointer",
+        "text-align": "center"
+    },
+    "listTable_td_current": {
+        "border-bottom": "1px solid #cccccc",
+        "border-right": "1px solid #cccccc",
+        "color": "#0000ff",
+        "cursor": "pointer",
+        "text-align": "center",
+        "font-weight": "bold"
+    },
+    "listTable_td_right": {
+        "border-right-width": "0px"
+    },
+    "listTable_td_action": {
+        "width": "20px"
+    },
+    "unselectIcon": {
+        "width": "12px",
+        "height": "12px",
+        "margin": "4px auto",
+        "cursor": "pointer",
+        "border": "1px solid #dddddd",
+        "border-radius": "8px",
+        "background": "transparent"
+    },
+    "selectIcon": {
+        "width": "14px",
+        "height": "14px",
+        "margin": "4px auto",
+        "cursor": "pointer",
+        "border": "0px solid #dddddd",
+        "border-radius": "8px",
+        "background": "url("+"/x_component_process_ProcessDesigner/widget/$EditionList/default/icon/check.png) no-repeat center center",
+        "background-color": "#4A90E2"
+    },
+
+    "itemTr_selected": {
+        "background-color": "#F7FBFF"
+    },
+
+    "diffLine": {
+        "padding": "5px 10px 0px 10px"
     }
 }

BIN
o2web/source/x_component_process_ProcessDesigner/widget/$EditionList/default/icon/check.png


BIN
o2web/source/x_component_process_ProcessDesigner/widget/$EditionList/default/icon/select.png


BIN
o2web/source/x_component_process_ProcessDesigner/widget/$EditionList/default/icon/unselect.png


+ 212 - 448
o2web/source/x_component_process_ProcessDesigner/widget/EditionList.js

@@ -5,15 +5,17 @@ MWF.xApplication.process.ProcessDesigner.widget.EditionList = new Class({
 	options: {
 		"style": "default"
 	},
-	initialize: function(application, edition, options){
+	initialize: function(application, edition, process, options){
 		this.setOptions(options);
 		this.application = application;
         this.edition = edition;
+        this.process = process;
 		this.path = "/x_component_process_ProcessDesigner/widget/$EditionList/";
 		this.cssPath = "/x_component_process_ProcessDesigner/widget/$EditionList/"+this.options.style+"/css.wcss";
 		this._loadCss();
         this.selectedItem = null;
-        this.items = {};
+        this.items = [];
+        this.lp = MWF.xApplication.process.ProcessDesigner.LP;
 	},
     load: function(){
         o2.Actions.load("x_processplatform_assemble_designer").ProcessAction.listEdition(this.application, this.edition, function(json){
@@ -30,500 +32,262 @@ MWF.xApplication.process.ProcessDesigner.widget.EditionList = new Class({
         this.resizeNode = new Element("div", {"styles": this.css.resizeNode}).inject(this.rightNode);
         this.diffNode = new Element("div", {"styles": this.css.diffNode}).inject(this.rightNode);
 
+        //this.listTable = new Element("table", {"styles": this.css.listNode}).inject(this.listNode);
+        var tableHtml = "<table width='100%' cellspacing='0' cellpadding='3'><tr>" +
+            "<th></th>" +
+            "<th>"+this.lp.edition_list.number+"</th>" +
+            "<th>"+this.lp.edition_list.update+"</th>" +
+            "<th>"+this.lp.edition_list.updatePerson+"</th>" +
+            "<th>"+this.lp.edition_list.enabled+"</th>" +
+            "<th>"+this.lp.edition_list.description+"</th>" +
+            "</tr></table>";
+        this.listNode.set("html", tableHtml);
+        this.listTable = this.listNode.getElement("table");
+        this.listTable.setStyles(this.css.listTable);
+        var ths = this.listNode.getElements("th").setStyles(this.css.listTable_th);
+        ths[ths.length-1].setStyles(this.css.listTable_td_right);
+
         this.show();
     },
     show: function(){
 	    if (!this.dlg){
 	        this.dlg = o2.DL.open({
+                "title": this.lp.edition_list.editionList,
                 "content": this.node,
+                "offset": {"y": -100},
                 "isMax": true,
-                "width": 700,
+                "width": 900,
                 "height": 500,
                 "buttonList": [{
-                    "text": MWF.xApplication.process.ProcessDesigner.LP.ok,
+                    "text": this.lp.edition_list.open,
+                    "action": function(){ this.openCurrentEdition(); this.dlg.close();}.bind(this),
+                    "title": this.lp.edition_list.openInfor
+                },{
+                    "text": MWF.xApplication.process.ProcessDesigner.LP.close,
                     "action": function(){ this.close(); }
-                }]
+                }],
+                "onPostShow": function(){
+                    this.setEvent();
+                }.bind(this)
             });
         }
     },
     listEditionDlg: function(){
         this.editionList.each(function(edition){
-
-        }.bind(this));
-    },
-
-
-
-
-
-    loadSelectNode: function(){
-        this.getSerialRule(function(){
-            this.loadSelectNodeItems();
-            this.loadSelectedNodeItems();
-        }.bind(this));
-    },
-
-    loadSelectedNodeItems: function(){
-        this.data.each(function(itemData){
-            this.selectedItems.push(new MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem[itemData.key.capitalize()](this.items[itemData.key], itemData));
+            var item = new MWF.xApplication.process.ProcessDesigner.widget.EditionList.Item(this, edition);
+            this.items.push(item);
         }.bind(this));
-        this.fireEvent("change");
     },
-
-    loadSelectNodeItems: function(){
-        Object.each(this.serialRuleJson, function(v, k){
-            this.loadSelectNodeItem(v, k);
-        }.bind(this));
-    },
-
-    loadSelectNodeItem: function(v, k){
-        this.items[k] = new MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.Item(v, k, this);
+    setEvent: function(){
+        var buttons = this.dlg.button.getElements("input");
+	    this.openCurrentEditionButton = buttons[0];
+	    var display = this.openCurrentEditionButton.getStyle("display");
+        this.openCurrentEditionButton.store("dsp", display);
+        this.openCurrentEditionButton.setStyle("display", "none");
+        var size, leftSize;
+	    var drag = new Drag(this.resizeNode, {
+            "onSnap": function(el){
+                el.setStyle("background", "#cccccc");
+            },
+            "onStart": function(el, e){
+                size = this.node.getSize();
+                leftSize = this.leftNode.getSize();
+                drag.x = e.event.x;
+            }.bind(this),
+            "onComplete": function(el){
+                el.setStyle("background-color", "transparent");
+            },
+	        "onDrag": function(el, e){
+                var x = drag.x - e.event.x;
+                var w = leftSize.x-x;
+                w = (w/size.x)*100;
+                this.leftNode.setStyle("width", ""+w+"%");
+                w = 100-w;
+                this.rightNode.setStyle("width", ""+w+"%");
+            }.bind(this)
+        });
     },
-
-    getSerialRule: function(callback){
-        if (!this.serialRuleJson){
-            var serialConifgUrl = "/x_component_process_ProcessDesigner/$Process/serialRule.json";
-            MWF.getJSON(serialConifgUrl, function(json){
-                this.serialRuleJson = json;
-                if (callback) callback();
+    openCurrentEdition: function(){
+	    debugger;
+	    if (this.currentItem && this.currentItem.edition.fullProcess.id != this.process.process.id){
+	        this.process.save(function(){
+                this.process.reload(this.currentItem.edition.fullProcess);
             }.bind(this));
-        }else{
-            if (callback) callback();
         }
     },
-    getData: function(){
-        var data = [];
-        this.selectedItems.each(function(item){
-            data.push(item.getData());
-        });
-        this.data = data;
-        return data;
+    checkButtonDisable: function(){
+	    if (this.currentItem && this.currentItem.edition.fullProcess.id != this.process.process.id){
+            this.openCurrentEditionButton.setStyle("display", this.openCurrentEditionButton.retrieve("dsp"));
+        }else{
+            this.openCurrentEditionButton.setStyle("display", "none");
+        }
     }
 });
 
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.Item = new Class({
-    initialize: function(value, key, editor){
-        this.editor = editor;
-        this.json = value;
-        this.key = key;
-        this.css = this.editor.css;
+MWF.xApplication.process.ProcessDesigner.widget.EditionList.Item = new Class({
+    initialize: function(list, edition){
+        this.list = list;
+        this.edition = edition;
+        this.table = this.list.listTable;
+        this.css = this.list.css;
+        this.lp = this.list.lp;
+        this.isCurrentEdition = (this.list.process.process.id == this.edition.id);
         this.load();
     },
     load: function(){
-        this.node = new Element("div", {"styles": this.css.itemNode}).inject(this.editor.selectNode);
-        this.iconNode = new Element("div", {"styles": this.css.itemIconNode}).inject(this.node);
-        this.textNode = new Element("div", {"styles": this.css.itemTextNode}).inject(this.node);
-
-
-        this.textNode.set({
-            "text": this.json.text,
-            "title": this.json.description
-        });
-        this.node.addEvents({
-            "mouseover": function(){this.node.setStyles(this.css.itemNode_over); this.iconNode.setStyles(this.css.itemIconNode_over);}.bind(this),
-            "mouseout": function(){this.node.setStyles(this.css.itemNode); this.iconNode.setStyles(this.css.itemIconNode);}.bind(this),
-            "click": function(){this.selectNumberItem();}.bind(this)
-        });
+        this.node = new Element("tr").inject(this.table);
+        var html = "<td></td>" +
+            "<td>"+this.edition.editionNumber+"</td>" +
+            "<td>"+this.edition.updateTime+"</td>" +
+            "<td>"+o2.name.cn(this.edition.lastUpdatePerson)+"</td>" +
+            "<td>"+(this.edition.editionEnable ? this.lp.edition_list.yes : this.lp.edition_list.no)+"</td>"+
+            "<td>"+(this.edition.editionDes || "")+"</td>";
+        this.node.set("html", html);
+
+        var tds = this.node.getElements("td").setStyles((this.isCurrentEdition) ? this.css.listTable_td_current : this.css.listTable_td);
+        tds[tds.length-1].setStyles(this.css.listTable_td_right);
+        this.actionTd = tds[0].setStyles(this.css.listTable_td_action);;
+
+        this.selectIconNode = new Element("div", {"styles": this.css.unselectIcon}).inject(this.actionTd);
+        this.setEvent();
     },
-    selectNumberItem: function(){
-        this.editor.selectedItems.push(new MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem[this.key.capitalize()](this));
-        this.editor.fireEvent("change");
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem = new Class({
-    initialize: function(item, itemData){
-        this.item = item;
-        this.json = item.json;
-        this.key = item.key;
-        this.editor = item.editor;
-        this.css = this.editor.css;
-        this.data = itemData;
-        this.load();
-    },
-    load: function(){
-        this.node = new Element("div", {"styles": this.css.selectedItemNode}).inject(this.editor.showNode);
-
-        this.textNode = new Element("div", {"styles": this.css.selectedItemTextNode}).inject(this.node);
-        this.textNode.set({
-            "text": this.json.text,
-            "title": this.json.description
-        });
-
-        this.node.addEvents({
-            "mouseover": function(){
-                if (this.editor.currentItem!=this) this.node.setStyles(this.css.selectedItemNode_over);
-            }.bind(this),
-            "mouseout": function(){
-                if (this.editor.currentItem!=this) this.node.setStyles(this.css.selectedItemNode);
-            }.bind(this),
-
-            "click": function(){this.selectItem();}.bind(this)
-        });
-
-        this.closeNode = new Element("div", {"styles": this.css.selectedItemCloseNode}).inject(this.node);
-        this.closeNode.addEvent("click", function(){
-            this.deleteItem();
+    setEvent: function(){
+        this.node.addEvent("click", function(){
+            this.selected();
         }.bind(this));
 
-        this.loadProperty();
-        this.selectItem();
     },
-    loadProperty: function(){},
-
-    deleteItem: function(){
-        this.node.destroy();
-        if (this.propertyNode) this.propertyNode.destroy();
-        this.editor.selectedItems.erase(this);
-        if (this.editor.currentItem === this) this.editor.currentItem = null;
-        this.editor.fireEvent("change");
-        MWF.release(this);
+    selected: function(){
+        if (this.list.currentItem) this.list.currentItem.unSelected();
+        this.node.setStyles(this.css.itemTr_selected).addClass("lightColor_bg");
+        this.selectIconNode.setStyles(this.css.selectIcon).addClass("mainColor_bg");
+        this.list.currentItem = this;
+        this.checkDiff();
+        this.list.checkButtonDisable();
     },
-    selectItem: function(){
-        if (this.editor.currentItem) this.editor.currentItem.unSelectItem();
-        if (this.propertyNode){
-            this.propertyNode.setStyle("display", "block");
-            if (this.key==="number"){
-                this.loadNumberBy();
-            }
-        }
-        this.node.setStyles(this.css.selectedItemNode_check);
-        this.editor.currentItem = this;
+    unSelected: function(){
+        this.node.setStyles(this.css.itemTr).removeClass("lightColor_bg");
+        this.selectIconNode.setStyles(this.css.unselectIcon).removeClass("mainColor_bg");
+        this.list.currentItem = null;
+        this.list.diffNode.empty();
     },
-    unSelectItem: function(){
-        this.node.setStyles(this.css.selectedItemNode);
-        if (this.propertyNode) this.propertyNode.setStyle("display", "none");
-        this.editor.currentItem = null;
-    }
-});
-
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Text = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
-
-    loadProperty: function(){
-        this.propertyNode = new Element("div", {"styles": this.css.itemPropertyNode}).inject(this.editor.propertyNode);
-        this.propertyTitleNode = new Element("div", {"styles": this.css.propertyTitleNode}).inject(this.propertyNode);
-        this.propertyTitleNode.set("text", MWF.xApplication.process.ProcessDesigner.LP.serialTextTitle);
-        this.propertyInputDivNode = new Element("div", {"styles": this.css.propertyInputDivNode}).inject(this.propertyNode);
-        this.propertyInputNode = new Element("input", {
-            "type": "text",
-            "value": (this.data) ? this.data.value: "",
-            "styles": this.css.propertyInputNode
-        }).inject(this.propertyInputDivNode);
-        this.changeText();
+    checkDiff: function(){
+        this.getFullProcess(function(){
+            var prevItem  = this.getPrevItem();
+            if (prevItem){
+                prevItem.getFullProcess();
+                var diffs = this.getDiffWithProcess(prevItem.edition.fullProcess);
+                if (diffs.length){
+                    this.appendDiffLine(this.lp.edition_list.hasDiffs);
+                    diffs.each(function(v){
+                        this.appendDiffLine(v);
+                    }.bind(this));
+                }else{
+                    this.appendDiffLine(this.lp.edition_list.noDiffs);
+                }
+            }else{
+                this.appendDiffLine(this.lp.edition_list.newProcess);
+                this.appendDiffLine(this.getNewProcessInfor());
+            }
+        }.bind(this));
 
-        this.propertyInputNode.addEvents({
-            "change": function(){
-                this.changeText();
-            }.bind(this),
-            "blur": function(){},
-        });
     },
-    changeText: function(){
-        var value = this.propertyInputNode.get("value");
-        if (value){
-            this.textNode.set("text", "\""+value+"\"");
-        }else{
-            this.textNode.set("text", this.json.text);
-        }
-        this.editor.fireEvent("change");
+    appendDiffLine: function(text){
+        new Element("div", {"styles": this.css.diffLine, "html": text}).inject(this.list.diffNode);
     },
-    getData: function(){
-        var value = this.propertyInputNode.get("value");
-        var key = this.key;
-        var script = "return serial.text(\""+value+"\")";
-        return {
-            "key": key,
-            "value": value,
-            "script": script
-        }
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Year = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
-    loadProperty: function(){
-        this.value = "created";
-        var i = Math.random();
-        this.propertyNode = new Element("div", {"styles": this.css.itemPropertyNode}).inject(this.editor.propertyNode);
-        var propertyTitleNode = new Element("div", {"styles": this.css.propertyTitleNode}).inject(this.propertyNode);
-        propertyTitleNode.set("text", MWF.xApplication.process.ProcessDesigner.LP.serialDateTitle);
-        var propertyInputDivNode = new Element("div", {"styles": this.css.propertyInputDivNode}).inject(this.propertyNode);
-
-        var v = (this.data) ? this.data.value: "created";
-        html = "<input name=\"serialDateSelect"+i+"\" "+((v=="created") ? "checked" : "")+" type=\"radio\" value=\"created\"/>" + MWF.xApplication.process.ProcessDesigner.LP.serialCreatedDateTitle;
-        html += "<input name=\"serialDateSelect"+i+"\" "+((v=="current") ? "checked" : "")+" type=\"radio\" value=\"current\"/>" + MWF.xApplication.process.ProcessDesigner.LP.serialCurrentDateTitle;
-        propertyInputDivNode.set("html", html);
-        this.changeText((this.data) ? this.data.value: "created");
-        propertyInputDivNode.getElements("input").addEvent("click", function(e){
-            if (e.target.checked){
-                var v = e.target.get("value");
-                this.changeText(v);
+    getDiffWithProcess: function(process){
+        debugger;
+        var diffs = [];
+        var notDiffFields = ["id", "editionName", "editionEnable", "editionNumber", "createTime", "updateTime", "creatorPerson", "lastUpdateTime", "lastUpdatePerson"];
+        Object.each(process, function(v, k){
+            var t = o2.typeOf(v);
+            if (t!="array" && t!="object"){
+                if (this.edition.fullProcess[k]!=v){
+                    if (notDiffFields.indexOf(k)==-1){
+                        var infor = this.lp.edition_list.modifyProcess;
+                        var oldV = (v.length>60) ? v.substring(0,60)+" ..." : v;
+                        var newV = (this.edition.fullProcess[k].length>60) ? this.edition.fullProcess[k].substring(0,60)+" ..." : this.edition.fullProcess[k];
+                        infor = infor.replace(/\{field\}/, k).replace(/\{old\}/, oldV).replace(/\{new\}/, newV);
+                        diffs.push(infor);
+                    }
+                }
             }
         }.bind(this));
-    },
-    changeText: function(v){
-        var text = MWF.xApplication.process.ProcessDesigner.LP.serialCreated;
-        if (v=="current"){
-            text = MWF.xApplication.process.ProcessDesigner.LP.serialCurrent;
-        }
-        this.value = v;
-        this.textNode.set("text", this.json.text+"("+text+")");
-        this.editor.fireEvent("change");
-    },
-    getData: function(){
-        var key = this.key;
-        var f = (this.value=="current") ? "year" : "createYear";
-        var script = "return serial."+f+"(\"yyyy\")";
-        return {
-            "key": key,
-            "value": this.value,
-            "script": script
-        }
-    }
-});
-
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Month = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Year,
-    getData: function(){
-        var key = this.key;
-        var f = (this.value=="current") ? "month" : "createMonth";
-        var script = "return serial."+f+"(\"MM\")";
-        return {
-            "key": key,
-            "value": this.value,
-            "script": script
-        }
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Day = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Year,
-    getData: function(){
-        var key = this.key;
-        var f = (this.value=="current") ? "day" : "createDay";
-        var script = "return serial."+f+"(\"dd\")";
-        return {
-            "key": key,
-            "value": this.value,
-            "script": script
-        }
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Company = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
-    getData: function(){
-        var key = this.key;
-        var script = "return serial.company()";
-        return {
-            "key": key,
-            "value": "",
-            "script": script
-        }
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Department = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
-    getData: function(){
-        var key = this.key;
-        var script = "return serial.department()";
-        return {
-            "key": key,
-            "value": "",
-            "script": script
-        }
-    }
-});
 
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.CompanyAttribute = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
+        diffs = diffs.concat(this.getDiffActivityListCount(process, diffs));
 
-    loadProperty: function(){
-        this.propertyNode = new Element("div", {"styles": this.css.itemPropertyNode}).inject(this.editor.propertyNode);
-        this.propertyTitleNode = new Element("div", {"styles": this.css.propertyTitleNode}).inject(this.propertyNode);
-        this.propertyTitleNode.set("text", MWF.xApplication.process.ProcessDesigner.LP.serialAttributeTitle);
-        this.propertyInputDivNode = new Element("div", {"styles": this.css.propertyInputDivNode}).inject(this.propertyNode);
-        this.propertyInputNode = new Element("input", {
-            "type": "text",
-            "value": (this.data) ? this.data.value: "",
-            "styles": this.css.propertyInputNode
-        }).inject(this.propertyInputDivNode);
-        this.changeText();
-
-        this.propertyInputNode.addEvents({
-            "change": function(){
-                this.changeText();
-            }.bind(this),
-            "blur": function(){},
-        });
+        return diffs;
     },
-    changeText: function(){
-        var value = this.propertyInputNode.get("value");
-        if (value){
-            this.textNode.set("text", this.json.text+"("+value+")");
-        }else{
-            this.textNode.set("text", this.json.text);
-        }
-        this.editor.fireEvent("change");
+    getDiffActivityListCount: function(process){
+        var diffs = [];
+        diffs = diffs.concat(this.getDiffActivityCount(process.endList, this.edition.fullProcess.endList));
+        diffs = diffs.concat(this.getDiffActivityCount(process.manualList, this.edition.fullProcess.manualList));
+        return diffs;
     },
-    getData: function(){
-        var value = this.propertyInputNode.get("value");
-        var key = this.key;
-        var script = "return serial.companyAttribute(\""+value+"\")";
-        return {
-            "key": key,
-            "value": value,
-            "script": script
-        }
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.DepartmentAttribute = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.CompanyAttribute,
-    getData: function(){
-        var value = this.propertyInputNode.get("value");
-        var key = this.key;
-        var script = "return serial.departmentAttribute(\""+value+"\")";
-        return {
-            "key": key,
-            "value": value,
-            "script": script
-        }
-    }
-});
-
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Number = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
-    loadProperty: function(){
-        this.propertyNode = new Element("div", {"styles": this.css.itemPropertyNode}).inject(this.editor.propertyNode);
-
-        var lineNode = new Element("div", {"styles": this.css.lineNode}).inject(this.propertyNode);
-        var propertyTitleNode = new Element("div", {"styles": this.css.propertyTitleNode}).inject(lineNode);
-        propertyTitleNode.set("text", MWF.xApplication.process.ProcessDesigner.LP.serialNumberByTitle);
-        this.propertyNumberByDivNode = new Element("div", {"styles": this.css.propertyInputDivNode}).inject(lineNode);
-        this.loadNumberBy();
-
-        lineNode = new Element("div", {"styles": this.css.lineNode}).inject(this.propertyNode);
-        propertyTitleNode = new Element("div", {"styles": this.css.propertyTitleNode}).inject(lineNode);
-        propertyTitleNode.set("text", MWF.xApplication.process.ProcessDesigner.LP.serialNumberLongTitle);
-        this.propertyInputDivNode = new Element("div", {"styles": this.css.propertyInputDivNode}).inject(lineNode);
-        this.propertyInputNode = new Element("select").inject(this.propertyInputDivNode);
-        var value = (this.data) ? this.data.value: {};
-        var numberLong = value.lng || 0;
-        var optionsHtml = "<option "+((numberLong==0) ? "selected": "")+" value=\"0\">auto</option>";
-        optionsHtml += "<option "+((numberLong==2) ? "selected": "")+" value=\"2\">2</option>";
-        optionsHtml += "<option "+((numberLong==3) ? "selected": "")+" value=\"3\">3</option>";
-        optionsHtml += "<option "+((numberLong==4) ? "selected": "")+" value=\"4\">4</option>";
-        optionsHtml += "<option "+((numberLong==5) ? "selected": "")+" value=\"5\">5</option>";
-        optionsHtml += "<option "+((numberLong==6) ? "selected": "")+" value=\"6\">6</option>";
-        optionsHtml += "<option "+((numberLong==7) ? "selected": "")+" value=\"7\">7</option>";
-        optionsHtml += "<option "+((numberLong==8) ? "selected": "")+" value=\"8\">8</option>";
-        optionsHtml += "<option "+((numberLong==9) ? "selected": "")+" value=\"9\">9</option>";
-        this.propertyInputNode.set("html", optionsHtml);
-        this.propertyInputNode.addEvents({
-            "change": function(){
-                this.editor.fireEvent("change");
-            }.bind(this)
-        });
-
-    },
-    loadNumberBy: function(){
-        this.propertyNumberByDivNode.empty();
-        var i = Math.random();
-
-        var value = (this.data) ? this.data.value: {};
-        var numberBy = value.by || [];
-
-        var html = "";
-        this.editor.selectedItems.each(function(item, n){
-            if (item.key!="number"){
-                var check = (numberBy.indexOf(n)==-1)? "" : "checked"
-                html += "<input "+check+" name=\"serialNumberBySelect"+i+"\" type=\"checkbox\" value=\""+n+"\"/>" + item.json.text;
+    getDiffActivityCount: function(prevList, currentList){
+        var diffs = [];
+        var prevNames = prevList.map(function(item){ return item.name; });
+        var currentNames = currentList.map(function(item){ return item.name; });
+
+        var deleteNames = prevNames.filter(function(name){
+            var i = currentNames.indexOf(name);
+            if (i!=-1){
+                currentNames.splice(i, 1);
+                return false;
             }
+            return true;
         });
-        this.propertyNumberByDivNode.set("html", html);
-        this.propertyNumberByDivNode.getElements("input").addEvent("click", function(e){
-            this.editor.fireEvent("change");
+        currentNames.each(function(name){
+            var infor = this.lp.edition_list.addActivity;
+            infor = infor.replace(/\{name\}/, name);
+            diffs.push(infor);
         }.bind(this));
-
-    },
-    getData: function(){
-        var numberLong = this.propertyInputNode.options[this.propertyInputNode.selectedIndex].value;
-        var numberBy = [];
-        var inputs = this.propertyNumberByDivNode.getElements("input");
-        inputs.each(function(input){
-            if (input.checked) numberBy.push(input.get("value").toInt());
+        deleteNames.each(function(name){
+            var infor = this.lp.edition_list.deleteActivity;
+            infor = infor.replace(/\{name\}/, name);
+            diffs.push(infor);
         }.bind(this));
-        var value = {"lng": numberLong, "by": numberBy};
-        var code = "return serial.nextSerialNumber("+JSON.encode(numberBy)+", "+numberLong+")"
-
-        return {
-            "key": this.key,
-            "value": value,
-            "script": code
-        }
-    }
-
-});
-
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Script = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
-    loadProperty: function(){
-        debugger;
-        this.code = (this.data) ? this.data.value: "";
-        this.propertyNode = new Element("div", {"styles": this.css.itemPropertyNode}).inject(this.editor.propertyNode);
-        this.scriptNode = new Element("div", {"styles": this.css.scriptNode}).inject(this.propertyNode);
-        this.scriptNode.set("title", MWF.xApplication.process.ProcessDesigner.LP.serialScriptTitle);
+        return diffs;
+    },
 
-        this.scriptArea = new MWF.xApplication.process.ProcessDesigner.widget.ScriptText(this.scriptNode, (this.data) ? this.data.value: "", this.editor.process.designer, {
-            "maskNode": this.editor.process.designer.content,
-            "maxObj": this.editor.process.designer.paperNode,
-            "onChange": function(code){
-                this.code = code;
-                this.editor.fireEvent("change");
-            }.bind(this)
-        });
+    getNewProcessInfor: function(){
+        //this.getFullProcess(function(){
+            var process = this.edition.fullProcess;
+            var activityInfor = "";
+            var an = this.lp.edition_list.an;
+            activityInfor = "1 "+an+this.lp.menu.newActivityType.begin;
+            if (process.endList && process.endList.length) activityInfor += ", "+process.endList.length + " "+an +this.lp.menu.newActivityType.end;
+            if (process.agentList && process.agentList.length) activityInfor += ", "+process.agentList.length + " "+an +this.lp.menu.newActivityType.agent;
+            if (process.manualList && process.manualList.length) activityInfor += ", "+process.manualList.length + " "+an +this.lp.menu.newActivityType.manual;
+            if (process.conditionList && process.conditionList.length) activityInfor += ", "+process.conditionList.length + " "+an +this.lp.menu.newActivityType.condition;
+            if (process.choiceList && process.choiceList.length) activityInfor += ", "+process.choiceList.length + " "+an +this.lp.menu.newActivityType.choice;
+            if (process.parallelList && process.parallelList.length) activityInfor += ", "+process.parallelList.length + " "+an +this.lp.menu.newActivityType.parallel;
+            if (process.splitList && process.splitList.length) activityInfor += ", "+process.splitList.length + " "+an +this.lp.menu.newActivityType.split;
+            if (process.mergeList && process.mergeList.length) activityInfor += ", "+process.mergeList.length + " "+an +this.lp.menu.newActivityType.merge;
+            if (process.embedList && process.embedList.length) activityInfor += ", "+process.embedList.length + " "+an +this.lp.menu.newActivityType.embed;
+            if (process.invokeList && process.invokeList.length) activityInfor += ", "+process.invokeList.length + " "+an +this.lp.menu.newActivityType.invoke;
+            if (process.cancelList && process.cancelList.length) activityInfor += ", "+process.cancelList.length + " "+an +this.lp.menu.newActivityType.cancel;
+            if (process.delayList && process.delayList.length) activityInfor += ", "+process.delayList.length + " "+an +this.lp.menu.newActivityType.delay;
+            if (process.messageList && process.messageList.length) activityInfor += ", "+process.messageList.length + " "+an +this.lp.menu.newActivityType.message;
+            if (process.serviceList && process.serviceList.length) activityInfor += ", "+process.serviceList.length + " "+an +this.lp.menu.newActivityType.service;
+
+            return activityInfor;
+        //}.bind(this));
     },
-    getData: function(){
-        var value = this.code;
-        var key = this.key;
-        return {
-            "key": key,
-            "value": value,
-            "script": value
-        }
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Unit = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
-    getData: function(){
-        var key = this.key;
-        var script = "return serial.unit()";
-        return {
-            "key": key,
-            "value": "",
-            "script": script
-        }
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.Unit = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem,
-    getData: function(){
-        var key = this.key;
-        var script = "return serial.unit()";
-        return {
-            "key": key,
-            "value": "",
-            "script": script
-        }
-    }
-});
-MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.UnitAttribute = new Class({
-    Extends: MWF.xApplication.process.ProcessDesigner.widget.SerialEditor.SelectedItem.CompanyAttribute,
-    getData: function(){
-        var value = this.propertyInputNode.get("value");
-        var key = this.key;
-        var script = "return serial.unitAttribute(\""+value+"\")";
-        return {
-            "key": key,
-            "value": value,
-            "script": script
+    getFullProcess: function(callback){
+        if (this.edition.fullProcess){
+            if (callback) callback();
+        }else{
+            o2.Actions.load("x_processplatform_assemble_designer").ProcessAction.get(this.edition.id, function(json){
+                this.edition.fullProcess = json.data;
+                if (callback) callback();
+            }.bind(this), null, false);
         }
+    },
+    getPrevItem: function(){
+        var idx = this.list.items.indexOf(this);
+        idx++;
+        if (idx<this.list.items.length) return this.list.items[idx];
+        return null;
     }
 });