Browse Source

Merge branch 'wrdp' into 'release'

Wrdp

See merge request o2oa/o2oa!2223
胡起 5 years ago
parent
commit
e21c713d9d
32 changed files with 711 additions and 272 deletions
  1. 17 3
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/bean/WrapCopier.java
  2. 11 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/utils/time/BaseWorkTime.java
  3. 26 0
      o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/jaxrs/worktime/ActionInDefinedHoliday.java
  4. 26 0
      o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/jaxrs/worktime/ActionInDefinedWorkDay.java
  5. 36 0
      o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/jaxrs/worktime/WorkTimeAction.java
  6. 0 34
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/BaseAction.java
  7. 35 0
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2Get.java
  8. 35 0
      o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2GetMobile.java
  9. 3 1
      o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Reroute.java
  10. 13 6
      o2web/source/o2_core/o2/xDesktop/WebSocket.js
  11. 1 0
      o2web/source/o2_core/o2/xScript/CMSEnvironment.js
  12. 1 0
      o2web/source/o2_core/o2/xScript/Environment.js
  13. 1 0
      o2web/source/o2_core/o2/xScript/PageEnvironment.js
  14. 84 73
      o2web/source/x_component_cms_FormDesigner/Module/Actionbar.js
  15. 3 2
      o2web/source/x_component_cms_FormDesigner/Module/Actionbar/actionbar.html
  16. 18 0
      o2web/source/x_component_cms_FormDesigner/ModuleImplements.js
  17. 17 0
      o2web/source/x_component_cms_FormDesigner/Property.js
  18. 4 3
      o2web/source/x_component_cms_FormDesigner/widget/ActionsEditor.js
  19. 28 16
      o2web/source/x_component_cms_Xform/Actionbar.js
  20. 2 2
      o2web/source/x_component_portal_PageDesigner/Main.js
  21. 5 2
      o2web/source/x_component_portal_Portal/Main.js
  22. 76 42
      o2web/source/x_component_process_FormDesigner/Module/Actionbar.js
  23. 3 2
      o2web/source/x_component_process_FormDesigner/Module/Actionbar/actionbar.html
  24. 17 0
      o2web/source/x_component_process_FormDesigner/Property.js
  25. 4 3
      o2web/source/x_component_process_FormDesigner/widget/ActionsEditor.js
  26. 20 7
      o2web/source/x_component_query_Query/Viewer.js
  27. 2 1
      o2web/source/x_component_query_StatementDesigner/$Statement/actionbar.html
  28. 93 0
      o2web/source/x_component_query_StatementDesigner/Property.js
  29. 13 0
      o2web/source/x_component_query_StatementDesigner/Statement.js
  30. 3 2
      o2web/source/x_component_query_ViewDesigner/$View/actionbar.html
  31. 20 0
      o2web/source/x_component_query_ViewDesigner/Property.js
  32. 94 71
      o2web/source/x_component_query_ViewDesigner/View.js

+ 17 - 3
o2server/x_base_core_project/src/main/java/com/x/base/core/project/bean/WrapCopier.java

@@ -1,11 +1,15 @@
 package com.x.base.core.project.bean;
 package com.x.base.core.project.bean;
 
 
+import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
+import java.util.Objects;
 
 
 import org.apache.commons.beanutils.PropertyUtilsBean;
 import org.apache.commons.beanutils.PropertyUtilsBean;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.apache.commons.lang3.reflect.FieldUtils;
 
 
+import com.x.base.core.entity.JpaObject;
 import com.x.base.core.project.tools.ListTools;
 import com.x.base.core.project.tools.ListTools;
 
 
 public class WrapCopier<T, W> {
 public class WrapCopier<T, W> {
@@ -46,9 +50,19 @@ public class WrapCopier<T, W> {
 		}
 		}
 		copyFields.stream().forEach(f -> {
 		copyFields.stream().forEach(f -> {
 			try {
 			try {
-				Object o = propertyUtilsBean.getProperty(orig, f);
-				if (null != o || (!ignoreNull)) {
-					propertyUtilsBean.setProperty(dest, f, o);
+				if (StringUtils.equals(f, JpaObject.IDCOLUMN)) {
+					Field field = FieldUtils.getField(orig.getClass(), f, true);
+					if (null != field) {
+						Object o = FieldUtils.readField(field, orig, true);
+						if (null != o || (!ignoreNull)) {
+							propertyUtilsBean.setProperty(dest, f, o);
+						}
+					}
+				} else {
+					Object o = propertyUtilsBean.getProperty(orig, f);
+					if (null != o || (!ignoreNull)) {
+						propertyUtilsBean.setProperty(dest, f, o);
+					}
 				}
 				}
 			} catch (Exception e) {
 			} catch (Exception e) {
 				e.printStackTrace();
 				e.printStackTrace();

+ 11 - 2
o2server/x_base_core_project/src/main/java/com/x/base/core/project/utils/time/BaseWorkTime.java

@@ -2,6 +2,7 @@ package com.x.base.core.project.utils.time;
 
 
 import java.text.ParseException;
 import java.text.ParseException;
 import java.util.Calendar;
 import java.util.Calendar;
+import java.util.Date;
 import java.util.HashSet;
 import java.util.HashSet;
 import java.util.Set;
 import java.util.Set;
 
 
@@ -196,7 +197,11 @@ public class BaseWorkTime {
 		return false;
 		return false;
 	}
 	}
 
 
-	private boolean inDefinedHoliday(Calendar c) {
+	public boolean inDefinedHoliday(Date d) {
+		return this.inDefinedHoliday(DateUtils.toCalendar(d));
+	}
+
+	public boolean inDefinedHoliday(Calendar c) {
 		if (ArrayUtils.isNotEmpty(this.definedHolidays)) {
 		if (ArrayUtils.isNotEmpty(this.definedHolidays)) {
 			if (ArrayUtils.indexOf(this.definedHolidays,
 			if (ArrayUtils.indexOf(this.definedHolidays,
 					DateFormatUtils.format(c, DATEPARTFORMATPATTERN[0])) > ArrayUtils.INDEX_NOT_FOUND) {
 					DateFormatUtils.format(c, DATEPARTFORMATPATTERN[0])) > ArrayUtils.INDEX_NOT_FOUND) {
@@ -206,7 +211,11 @@ public class BaseWorkTime {
 		return false;
 		return false;
 	}
 	}
 
 
-	private boolean inDefinedWorkday(Calendar c) {
+	public boolean inDefinedWorkday(Date d) {
+		return this.inDefinedWorkday(DateUtils.toCalendar(d));
+	}
+
+	public boolean inDefinedWorkday(Calendar c) {
 		if (ArrayUtils.isNotEmpty(this.definedWorkdays)) {
 		if (ArrayUtils.isNotEmpty(this.definedWorkdays)) {
 			if (ArrayUtils.indexOf(this.definedWorkdays,
 			if (ArrayUtils.indexOf(this.definedWorkdays,
 					DateFormatUtils.format(c, DATEPARTFORMATPATTERN[0])) > ArrayUtils.INDEX_NOT_FOUND) {
 					DateFormatUtils.format(c, DATEPARTFORMATPATTERN[0])) > ArrayUtils.INDEX_NOT_FOUND) {

+ 26 - 0
o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/jaxrs/worktime/ActionInDefinedHoliday.java

@@ -0,0 +1,26 @@
+package com.x.general.assemble.control.jaxrs.worktime;
+
+import java.util.Date;
+
+import com.x.base.core.project.config.Config;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WrapBoolean;
+import com.x.base.core.project.tools.DateTools;
+
+public class ActionInDefinedHoliday extends BaseAction {
+
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String date) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Date value = DateTools.parse(date);
+		Wo wo = new Wo();
+		wo.setValue(Config.workTime().inDefinedHoliday(value));
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapBoolean {
+
+	}
+
+}

+ 26 - 0
o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/jaxrs/worktime/ActionInDefinedWorkDay.java

@@ -0,0 +1,26 @@
+package com.x.general.assemble.control.jaxrs.worktime;
+
+import java.util.Date;
+
+import com.x.base.core.project.config.Config;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WrapBoolean;
+import com.x.base.core.project.tools.DateTools;
+
+public class ActionInDefinedWorkDay extends BaseAction {
+
+	ActionResult<Wo> execute(EffectivePerson effectivePerson, String date) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Date value = DateTools.parse(date);
+		Wo wo = new Wo();
+		wo.setValue(Config.workTime().inDefinedWorkday(value));
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapBoolean {
+
+	}
+
+}

+ 36 - 0
o2server/x_general_assemble_control/src/main/java/com/x/general/assemble/control/jaxrs/worktime/WorkTimeAction.java

@@ -156,4 +156,40 @@ public class WorkTimeAction extends StandardJaxrsAction {
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
 	}
 	}
 
 
+	@JaxrsMethodDescribe(value = "返回指定时间是否定义为节假日.", action = ActionInDefinedHoliday.class)
+	@GET
+	@Path("indefinedholiday/{date}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void inDefinedHoliday(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("指定日期") @PathParam("date") String date) {
+		ActionResult<ActionInDefinedHoliday.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionInDefinedHoliday().execute(effectivePerson, date);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "返回指定时间是否定义为工作日.", action = ActionInDefinedWorkDay.class)
+	@GET
+	@Path("indefinedworkday/{date}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void inDefinedWorkDay(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("指定日期") @PathParam("date") String date) {
+		ActionResult<ActionInDefinedWorkDay.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionInDefinedWorkDay().execute(effectivePerson, date);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
 }
 }

+ 0 - 34
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/BaseAction.java

@@ -27,7 +27,6 @@ abstract class BaseAction extends StandardJaxrsAction {
 
 
 	private static Logger logger = LoggerFactory.getLogger(BaseAction.class);
 	private static Logger logger = LoggerFactory.getLogger(BaseAction.class);
 
 
-	
 	CacheCategory cacheCategory = new CacheCategory(Form.class, Script.class, com.x.portal.core.entity.Script.class,
 	CacheCategory cacheCategory = new CacheCategory(Form.class, Script.class, com.x.portal.core.entity.Script.class,
 			com.x.cms.core.entity.element.Script.class);
 			com.x.cms.core.entity.element.Script.class);
 
 
@@ -67,38 +66,6 @@ abstract class BaseAction extends StandardJaxrsAction {
 
 
 	}
 	}
 
 
-	protected Map<String, RelatedScript> convertScript(Business bus, FormProperties properties) throws Exception {
-		Map<String, RelatedScript> map = new TreeMap<>();
-		for (Entry<String, String> entry : properties.getMobileRelatedScriptMap().entrySet()) {
-			switch (entry.getValue()) {
-			case WorkCompletedProperties.RelatedScript.TYPE_PROCESSPLATFORM:
-				Script pp = bus.script().pick(entry.getKey());
-				if (null != pp) {
-					map.put(entry.getKey(),
-							new RelatedScript(pp.getId(), pp.getName(), pp.getAlias(), pp.getText(), entry.getValue()));
-				}
-				break;
-			case WorkCompletedProperties.RelatedScript.TYPE_CMS:
-				com.x.cms.core.entity.element.Script cms = bus.cms().script().pick(entry.getKey());
-				if (null != cms) {
-					map.put(entry.getKey(), new RelatedScript(cms.getId(), cms.getName(), cms.getAlias(), cms.getText(),
-							entry.getValue()));
-				}
-				break;
-			case WorkCompletedProperties.RelatedScript.TYPE_PORTAL:
-				com.x.portal.core.entity.Script p = bus.portal().script().pick(entry.getKey());
-				if (null != p) {
-					map.put(entry.getKey(),
-							new RelatedScript(p.getId(), p.getName(), p.getAlias(), p.getText(), entry.getValue()));
-				}
-				break;
-			default:
-				break;
-			}
-		}
-		return map;
-	}
-
 	protected List<String> convertScriptToCacheTag(Business business, Map<String, String> map) throws Exception {
 	protected List<String> convertScriptToCacheTag(Business business, Map<String, String> map) throws Exception {
 		List<String> list = new ArrayList<>();
 		List<String> list = new ArrayList<>();
 		for (Entry<String, String> entry : map.entrySet()) {
 		for (Entry<String, String> entry : map.entrySet()) {
@@ -128,5 +95,4 @@ abstract class BaseAction extends StandardJaxrsAction {
 		return list;
 		return list;
 	}
 	}
 
 
-
 }
 }

+ 35 - 0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2Get.java

@@ -3,6 +3,7 @@ package com.x.processplatform.assemble.surface.jaxrs.form;
 import java.util.Map;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Optional;
 import java.util.TreeMap;
 import java.util.TreeMap;
+import java.util.Map.Entry;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeUnit;
 
 
@@ -17,10 +18,12 @@ import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.tools.ListTools;
 import com.x.base.core.project.tools.ListTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.assemble.surface.Business;
+import com.x.processplatform.core.entity.content.WorkCompletedProperties;
 import com.x.processplatform.core.entity.content.WorkCompletedProperties.RelatedForm;
 import com.x.processplatform.core.entity.content.WorkCompletedProperties.RelatedForm;
 import com.x.processplatform.core.entity.content.WorkCompletedProperties.RelatedScript;
 import com.x.processplatform.core.entity.content.WorkCompletedProperties.RelatedScript;
 import com.x.processplatform.core.entity.element.Form;
 import com.x.processplatform.core.entity.element.Form;
 import com.x.processplatform.core.entity.element.FormProperties;
 import com.x.processplatform.core.entity.element.FormProperties;
+import com.x.processplatform.core.entity.element.Script;
 
 
 class V2Get extends BaseAction {
 class V2Get extends BaseAction {
 
 
@@ -93,6 +96,38 @@ class V2Get extends BaseAction {
 		});
 		});
 	}
 	}
 
 
+	private Map<String, RelatedScript> convertScript(Business bus, FormProperties properties) throws Exception {
+		Map<String, RelatedScript> map = new TreeMap<>();
+		for (Entry<String, String> entry : properties.getRelatedScriptMap().entrySet()) {
+			switch (entry.getValue()) {
+			case WorkCompletedProperties.RelatedScript.TYPE_PROCESSPLATFORM:
+				Script pp = bus.script().pick(entry.getKey());
+				if (null != pp) {
+					map.put(entry.getKey(),
+							new RelatedScript(pp.getId(), pp.getName(), pp.getAlias(), pp.getText(), entry.getValue()));
+				}
+				break;
+			case WorkCompletedProperties.RelatedScript.TYPE_CMS:
+				com.x.cms.core.entity.element.Script cms = bus.cms().script().pick(entry.getKey());
+				if (null != cms) {
+					map.put(entry.getKey(), new RelatedScript(cms.getId(), cms.getName(), cms.getAlias(), cms.getText(),
+							entry.getValue()));
+				}
+				break;
+			case WorkCompletedProperties.RelatedScript.TYPE_PORTAL:
+				com.x.portal.core.entity.Script p = bus.portal().script().pick(entry.getKey());
+				if (null != p) {
+					map.put(entry.getKey(),
+							new RelatedScript(p.getId(), p.getName(), p.getAlias(), p.getText(), entry.getValue()));
+				}
+				break;
+			default:
+				break;
+			}
+		}
+		return map;
+	}
+
 	public static class Wo extends AbstractWo {
 	public static class Wo extends AbstractWo {
 
 
 		private static final long serialVersionUID = 2776033956637839042L;
 		private static final long serialVersionUID = 2776033956637839042L;

+ 35 - 0
o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/jaxrs/form/V2GetMobile.java

@@ -3,6 +3,7 @@ package com.x.processplatform.assemble.surface.jaxrs.form;
 import java.util.Map;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Optional;
 import java.util.TreeMap;
 import java.util.TreeMap;
+import java.util.Map.Entry;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeUnit;
 
 
@@ -17,10 +18,12 @@ import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.tools.ListTools;
 import com.x.base.core.project.tools.ListTools;
 import com.x.processplatform.assemble.surface.Business;
 import com.x.processplatform.assemble.surface.Business;
+import com.x.processplatform.core.entity.content.WorkCompletedProperties;
 import com.x.processplatform.core.entity.content.WorkCompletedProperties.RelatedForm;
 import com.x.processplatform.core.entity.content.WorkCompletedProperties.RelatedForm;
 import com.x.processplatform.core.entity.content.WorkCompletedProperties.RelatedScript;
 import com.x.processplatform.core.entity.content.WorkCompletedProperties.RelatedScript;
 import com.x.processplatform.core.entity.element.Form;
 import com.x.processplatform.core.entity.element.Form;
 import com.x.processplatform.core.entity.element.FormProperties;
 import com.x.processplatform.core.entity.element.FormProperties;
+import com.x.processplatform.core.entity.element.Script;
 
 
 class V2GetMobile extends BaseAction {
 class V2GetMobile extends BaseAction {
 
 
@@ -93,6 +96,38 @@ class V2GetMobile extends BaseAction {
 			return map;
 			return map;
 		});
 		});
 	}
 	}
+	
+	private Map<String, RelatedScript> convertScript(Business bus, FormProperties properties) throws Exception {
+		Map<String, RelatedScript> map = new TreeMap<>();
+		for (Entry<String, String> entry : properties.getMobileRelatedScriptMap().entrySet()) {
+			switch (entry.getValue()) {
+			case WorkCompletedProperties.RelatedScript.TYPE_PROCESSPLATFORM:
+				Script pp = bus.script().pick(entry.getKey());
+				if (null != pp) {
+					map.put(entry.getKey(),
+							new RelatedScript(pp.getId(), pp.getName(), pp.getAlias(), pp.getText(), entry.getValue()));
+				}
+				break;
+			case WorkCompletedProperties.RelatedScript.TYPE_CMS:
+				com.x.cms.core.entity.element.Script cms = bus.cms().script().pick(entry.getKey());
+				if (null != cms) {
+					map.put(entry.getKey(), new RelatedScript(cms.getId(), cms.getName(), cms.getAlias(), cms.getText(),
+							entry.getValue()));
+				}
+				break;
+			case WorkCompletedProperties.RelatedScript.TYPE_PORTAL:
+				com.x.portal.core.entity.Script p = bus.portal().script().pick(entry.getKey());
+				if (null != p) {
+					map.put(entry.getKey(),
+							new RelatedScript(p.getId(), p.getName(), p.getAlias(), p.getText(), entry.getValue()));
+				}
+				break;
+			default:
+				break;
+			}
+		}
+		return map;
+	}
 
 
 	public static class Wo extends AbstractWo {
 	public static class Wo extends AbstractWo {
 
 

+ 3 - 1
o2server/x_processplatform_service_processing/src/main/java/com/x/processplatform/service/processing/jaxrs/work/V2Reroute.java

@@ -67,8 +67,10 @@ class V2Reroute extends BaseAction {
 				emc.beginTransaction(Task.class);
 				emc.beginTransaction(Task.class);
 				emc.beginTransaction(Read.class);
 				emc.beginTransaction(Read.class);
 				emc.beginTransaction(WorkLog.class);
 				emc.beginTransaction(WorkLog.class);
-				/** 重新设置表单 */
+				// 重新设置表单
 				setForm(business, work, activity);
 				setForm(business, work, activity);
+				// 调度强制把这个标志设置为true,这样可以避免在拟稿状态就调度,系统认为是拟稿状态,默认不创建待办.
+				work.setWorkThroughManual(true);
 				work.setDestinationActivity(activity.getId());
 				work.setDestinationActivity(activity.getId());
 				work.setDestinationActivityType(activity.getActivityType());
 				work.setDestinationActivityType(activity.getActivityType());
 				work.setDestinationRoute("");
 				work.setDestinationRoute("");

+ 13 - 6
o2web/source/o2_core/o2/xDesktop/WebSocket.js

@@ -447,12 +447,19 @@ MWF.xDesktop.WebSocket = new Class({
         var tooltipItem = layout.desktop.message.addTooltip(msg, ((data.body) ? data.body.createTime : ""));
         var tooltipItem = layout.desktop.message.addTooltip(msg, ((data.body) ? data.body.createTime : ""));
         tooltipItem.contentNode.addEvent("click", function(e){
         tooltipItem.contentNode.addEvent("click", function(e){
             layout.desktop.message.hide();
             layout.desktop.message.hide();
-            layout.desktop.openApplication(e, "File", null, {
-                "status": {
-                    "tab": "share",
-                    "node": data.person
-                }
-            });
+            //应用市场中的云文件,门户cloudFile
+            o2.Actions.load("x_portal_assemble_surface").PortalAction.get("cloudFile", function () {
+                layout.desktop.openApplication(e, "portal.Portal", {
+                    portalId : "cloudFile"
+                });
+            }, function(){
+                layout.desktop.openApplication(e, "File", null, {
+                    "status": {
+                        "tab": "share",
+                        "node": data.person
+                    }
+                });
+            })
         });
         });
 
 
         messageItem.contentNode.addEvent("click", function(e){
         messageItem.contentNode.addEvent("click", function(e){

+ 1 - 0
o2web/source/o2_core/o2/xScript/CMSEnvironment.js

@@ -1873,6 +1873,7 @@ MWF.xScript.CMSJSONData = function(data, callback, key, parent){
         var o = {};
         var o = {};
         for (var k in data) o[k] = {"configurable": true, "enumerable": true, "get": getter.apply(this, [data, callback, k, this]),"set": setter.apply(this, [data, callback, k, this])};
         for (var k in data) o[k] = {"configurable": true, "enumerable": true, "get": getter.apply(this, [data, callback, k, this]),"set": setter.apply(this, [data, callback, k, this])};
         o["length"] = {"get": function(){return Object.keys(data).length;}};
         o["length"] = {"get": function(){return Object.keys(data).length;}};
+        o["some"] = {"get": function(){return data.some;}};
         MWF.defineProperties(this, o);
         MWF.defineProperties(this, o);
 
 
         var methods = {
         var methods = {

+ 1 - 0
o2web/source/o2_core/o2/xScript/Environment.js

@@ -1993,6 +1993,7 @@ MWF.xScript.JSONData = function(data, callback, key, parent, _form){
         var o = {};
         var o = {};
         for (var k in data) o[k] = {"configurable": true, "enumerable": true, "get": getter.apply(this, [data, callback, k, this]),"set": setter.apply(this, [data, callback, k, this])};
         for (var k in data) o[k] = {"configurable": true, "enumerable": true, "get": getter.apply(this, [data, callback, k, this]),"set": setter.apply(this, [data, callback, k, this])};
         o["length"] = {"get": function(){return Object.keys(data).length;}};
         o["length"] = {"get": function(){return Object.keys(data).length;}};
+        o["some"] = {"get": function(){return data.some;}};
         MWF.defineProperties(this, o);
         MWF.defineProperties(this, o);
 
 
         var methods = {
         var methods = {

+ 1 - 0
o2web/source/o2_core/o2/xScript/PageEnvironment.js

@@ -1839,6 +1839,7 @@ MWF.xScript.JSONData = function(data, callback, key, parent, _form){
         var o = {};
         var o = {};
         for (var k in data) o[k] = {"configurable": true, "enumerable": true, "get": getter.apply(this, [data, callback, k, this]),"set": setter.apply(this, [data, callback, k, this])};
         for (var k in data) o[k] = {"configurable": true, "enumerable": true, "get": getter.apply(this, [data, callback, k, this]),"set": setter.apply(this, [data, callback, k, this])};
         o["length"] = {"get": function(){return Object.keys(data).length;}};
         o["length"] = {"get": function(){return Object.keys(data).length;}};
+        o["some"] = {"get": function(){return data.some;}};
         MWF.defineProperties(this, o);
         MWF.defineProperties(this, o);
 
 
         var methods = {
         var methods = {

+ 84 - 73
o2web/source/x_component_cms_FormDesigner/Module/Actionbar.js

@@ -24,6 +24,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
 		this.containerNode = null;
 		this.containerNode = null;
 		this.systemTools = [];
 		this.systemTools = [];
 		this.customTools = [];
 		this.customTools = [];
+        this.multiTools = [];
 	},
 	},
 	setTemplateStyles: function(styles){
 	setTemplateStyles: function(styles){
 		this.json.style = styles.style;
 		this.json.style = styles.style;
@@ -60,7 +61,8 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
 			this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);
 			this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);
 
 
 			MWF.getJSON(this.path+"toolbars.json", function(json){
 			MWF.getJSON(this.path+"toolbars.json", function(json){
-			    this.json.defaultTools = json;
+			    //this.json.defaultTools = json;
+			    this.json.multiTools = json.map( function (d) { d.system = true; return d; });
 				this.setToolbars(json, this.toolbarNode);
 				this.setToolbars(json, this.toolbarNode);
 				this.toolbarWidget.load();
 				this.toolbarWidget.load();
 				this._setEditStyle_custom( "hideSystemTools" );
 				this._setEditStyle_custom( "hideSystemTools" );
@@ -90,63 +92,34 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
             if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             this.toolbarWidget.css = this.json.actionStyles;
             this.toolbarWidget.css = this.json.actionStyles;
 
 
-			if (this.json.defaultTools){
-				var json = Array.clone(this.json.defaultTools);
-				this.setToolbars(json, this.toolbarNode);
-				//if (this.json.tools) json.append(this.json.tools);
-				//this.setToolbars(json, this.toolbarNode);
-				if (this.json.tools){
-					this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-				}
-				this.toolbarWidget.load();
-				this._setEditStyle_custom( "hideSystemTools" );
-				this._setEditStyle_custom( "hideSetPopularDocumentTool" );
-				//json = null;
-			}else{
-				MWF.getJSON(this.path+"toolbars.json", function(json){
-					this.json.defaultTools = json;
-					var json = Array.clone(this.json.defaultTools);
-					this.setToolbars(json, this.toolbarNode);
-					//if (this.json.tools) json.append(this.json.tools);
-					//this.setToolbars(json, this.toolbarNode);
-					if (this.json.tools){
-						this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-					}
-					this.toolbarWidget.load();
-					this._setEditStyle_custom( "hideSystemTools" );
-					this._setEditStyle_custom( "hideSetPopularDocumentTool" );
-					//json = null;
-				}.bind(this), false);
-			}
+            this.loadMultiToolbar();
 
 
-			//   if (this.json.sysTools.editTools){
-			//       this.setToolbars(this.json.sysTools.editTools, this.toolbarNode);
-			////       this.setToolbars(this.json.tools.editTools, this.toolbarNode);
-			//   }else{
-			//       this.setToolbars(this.json.sysTools, this.toolbarNode);
-			////       this.setToolbars(this.json.tools, this.toolbarNode);
-			//   }
+			// if (this.json.defaultTools){
+			// 	var json = Array.clone(this.json.defaultTools);
+			// 	this.setToolbars(json, this.toolbarNode);
+			// 	if (this.json.tools){
+			// 		this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+			// 	}
+			// 	this.toolbarWidget.load();
+			// 	this._setEditStyle_custom( "hideSystemTools" );
+			// 	this._setEditStyle_custom( "hideSetPopularDocumentTool" );
+			// }else{
+			// 	MWF.getJSON(this.path+"toolbars.json", function(json){
+			// 		this.json.defaultTools = json;
+			// 		var json = Array.clone(this.json.defaultTools);
+			// 		this.setToolbars(json, this.toolbarNode);
+			// 		if (this.json.tools){
+			// 			this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+			// 		}
+			// 		this.toolbarWidget.load();
+			// 		this._setEditStyle_custom( "hideSystemTools" );
+			// 		this._setEditStyle_custom( "hideSetPopularDocumentTool" );
+			// 	}.bind(this), false);
+			// }
 
 
 		}
 		}
 
 
 	},
 	},
-	//_refreshActionbar: function(){
-	//	if (this.form.options.mode == "Mobile"){
-	//		this.node.set("text", MWF.APPFD.LP.notice.notUseModuleInMobile+"("+this.moduleName+")");
-	//		this.node.setStyles({"height": "24px", "line-height": "24px", "background-color": "#999"});
-	//	}else{
-	//		this.toolbarNode = this.node.getFirst("div");
-	//		this.toolbarNode.empty();
-	//		this.toolbarWidget = new MWF.widget.SimpleToolbar(this.toolbarNode, {"style": this.json.style}, this);
-    //
-	//		MWF.getJSON(this.path+"toolbars.json", function(json){
-	//			this.setToolbars(json, this.toolbarNode);
-	//			this.toolbarWidget.load();
-	//			this._setEditStyle_custom( "hideSetPopularDocumentTool" );
-	//		}.bind(this), false);
-	//	}
-    //
-	//},
 	_resetActionbar: function(){
 	_resetActionbar: function(){
         if (this.form.options.mode == "Mobile"){
         if (this.form.options.mode == "Mobile"){
             this.node.set("text", MWF.APPFD.LP.notice.notUseModuleInMobile+"("+this.moduleName+")");
             this.node.set("text", MWF.APPFD.LP.notice.notUseModuleInMobile+"("+this.moduleName+")");
@@ -163,30 +136,66 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
                 this.json.actionStyles = Object.clone(this.toolbarWidget.css);
                 this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             }
             }
 
 
-            if (this.json.defaultTools){
-                var json = Array.clone(this.json.defaultTools);
-                //if (this.json.tools) json.append(this.json.tools);
-                this.setToolbars(json, this.toolbarNode);
+            this.loadMultiToolbar();
+
+            // if (this.json.defaultTools){
+            //     var json = Array.clone(this.json.defaultTools);
+            //     this.setToolbars(json, this.toolbarNode);
+            //     if (this.json.tools){
+            //         this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //     }
+            //     this.toolbarWidget.load();
+            // }else{
+            //     MWF.getJSON(this.path+"toolbars.json", function(json){
+            //         this.json.defaultTools = json;
+            //         var json = Array.clone(this.json.defaultTools);
+            //         this.setToolbars(json, this.toolbarNode);
+            //         if (this.json.tools){
+            //             this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //         }
+            //         this.toolbarWidget.load();
+            //     }.bind(this), false);
+            // }
+        }
+    },
+    loadMultiToolbar : function(){
+        if( this.json.multiTools ){
+            var json = Array.clone(this.json.multiTools);
+            this.setMultiToolbars(json, this.toolbarNode);
+            this.toolbarWidget.load();
+			this._setEditStyle_custom( "hideSystemTools" );
+			this._setEditStyle_custom( "hideSetPopularDocumentTool" );
+        }else if( this.json.defaultTools ){
+            this.json.multiTools = this.json.defaultTools.map( function (d) { d.system = true; return d; });
+            if (this.json.tools){
+                this.json.multiTools = this.json.multiTools.concat( this.json.tools )
+            }
+            this.setMultiToolbars( Array.clone(this.json.multiTools), this.toolbarNode);
+            this.toolbarWidget.load();
+			this._setEditStyle_custom( "hideSystemTools" );
+			this._setEditStyle_custom( "hideSetPopularDocumentTool" );
+        }else{
+            MWF.getJSON(this.path+"toolbars.json", function(json){
+                this.json.multiTools = json.map( function (d) { d.system = true; return d; });
                 if (this.json.tools){
                 if (this.json.tools){
-                    this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+                    this.json.multiTools = this.json.multiTools.concat( this.json.tools )
                 }
                 }
+                this.setMultiToolbars(Array.clone(this.json.multiTools), this.toolbarNode);
                 this.toolbarWidget.load();
                 this.toolbarWidget.load();
-                //json = null;
-            }else{
-                MWF.getJSON(this.path+"toolbars.json", function(json){
-                    this.json.defaultTools = json;
-                    var json = Array.clone(this.json.defaultTools);
-                    //if (this.json.tools) json.append(this.json.tools);
-                    this.setToolbars(json, this.toolbarNode);
-                    if (this.json.tools){
-                        this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-                    }
-                    this.toolbarWidget.load();
-                    //json = null;
-                }.bind(this), false);
-            }
+				this._setEditStyle_custom( "hideSystemTools" );
+				this._setEditStyle_custom( "hideSetPopularDocumentTool" );
+            }.bind(this), false);
         }
         }
     },
     },
+	setMultiToolbars: function(tools, node){
+		tools.each(function(tool){
+			if( tool.system ){
+				this.setToolbars( [tool], node );
+			}else{
+				this.setCustomToolbars( [tool], node );
+			}
+		}.bind(this));
+	},
 	setToolbars: function(tools, node){
 	setToolbars: function(tools, node){
 		tools.each(function(tool){
 		tools.each(function(tool){
 			var actionNode = new Element("div", {
 			var actionNode = new Element("div", {
@@ -198,6 +207,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
 				"MWFButtonText": tool.text
 				"MWFButtonText": tool.text
 			}).inject(node);
 			}).inject(node);
 			this.systemTools.push(actionNode);
 			this.systemTools.push(actionNode);
+			this.multiTools.push( actionNode );
 			if (tool.sub){
 			if (tool.sub){
 				var subNode = node.getLast();
 				var subNode = node.getLast();
 				this.setToolbars(tool.sub, subNode);
 				this.setToolbars(tool.sub, subNode);
@@ -223,6 +233,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
 				"MWFButtonText": tool.text
 				"MWFButtonText": tool.text
 			}).inject(node);
 			}).inject(node);
 			this.customTools.push(actionNode);
 			this.customTools.push(actionNode);
+			this.multiTools.push( actionNode );
 			if (tool.sub){
 			if (tool.sub){
 				var subNode = node.getLast();
 				var subNode = node.getLast();
 				this.setToolbars(tool.sub, subNode);
 				this.setToolbars(tool.sub, subNode);
@@ -256,7 +267,7 @@ MWF.xApplication.cms.FormDesigner.Module.Actionbar = MWF.CMSFCActionbar = new Cl
 				});
 				});
 			}
 			}
 		}
 		}
-		if (name=="defaultTools" || name=="tools" || name==="actionStyles"){
+		if (name=="defaultTools" || name=="tools" || name=="multiTools" || name==="actionStyles"){
 			this._refreshActionbar();
 			this._refreshActionbar();
 		}
 		}
 	}
 	}

+ 3 - 2
o2web/source/x_component_cms_FormDesigner/Module/Actionbar/actionbar.html

@@ -30,8 +30,9 @@
 		</table>
 		</table>
 	</div>
 	</div>
 	<div title="操作"  class="MWFTab" style="overflow: hidden">
 	<div title="操作"  class="MWFTab" style="overflow: hidden">
-		<div class="MWFDefaultActionArea" name="defaultTools"></div>
-		<div class="MWFActionArea" name="tools"></div>
+<!--		<div class="MWFDefaultActionArea" name="defaultTools"></div>-->
+<!--		<div class="MWFActionArea" name="tools"></div>-->
+		<div class="MWFMultiActionArea" name="multiTools"></div>
 	</div>
 	</div>
 	<div title="样式"  class="MWFTab">
 	<div title="样式"  class="MWFTab">
         <div class="MWFActionStylesArea" name="actionStyles"></div>
         <div class="MWFActionStylesArea" name="actionStyles"></div>

+ 18 - 0
o2web/source/x_component_cms_FormDesigner/ModuleImplements.js

@@ -125,6 +125,24 @@ if( !MWF.CMSProperty_Process ){
         },
         },
         loadActionArea_Process : MWF.CMSProperty_Process.loadActionArea,
         loadActionArea_Process : MWF.CMSProperty_Process.loadActionArea,
         loadActionArea_CMS: function(){
         loadActionArea_CMS: function(){
+
+            var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
+            multiActionArea.each(function(node){
+                var name = node.get("name");
+                var actionContent = this.data[name];
+                MWF.xDesktop.requireApp("cms.FormDesigner", "widget.ActionsEditor", function(){
+                    var actionEditor = new MWF.xApplication.cms.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
+                        "maxObj": this.propertyNode.parentElement.parentElement.parentElement,
+                        "isSystemTool" : true,
+                        "onChange": function(){
+                            this.data[name] = actionEditor.data;
+                            this.changeData(name);
+                        }.bind(this)
+                    });
+                    actionEditor.load(actionContent);
+                }.bind(this));
+            }.bind(this));
+
             var actionAreas = this.propertyContent.getElements(".MWFActionArea");
             var actionAreas = this.propertyContent.getElements(".MWFActionArea");
             actionAreas.each(function(node){
             actionAreas.each(function(node){
                 var name = node.get("name");
                 var name = node.get("name");

+ 17 - 0
o2web/source/x_component_cms_FormDesigner/Property.js

@@ -38,6 +38,23 @@ MWF.xApplication.cms.FormDesigner.Property = MWF.CMSFCProperty = new Class({
         }
         }
     },
     },
     loadActionArea: function(){
     loadActionArea: function(){
+        var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
+        multiActionArea.each(function(node){
+            var name = node.get("name");
+            var actionContent = this.data[name];
+            MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){
+                var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
+                    "maxObj": this.propertyNode.parentElement.parentElement.parentElement,
+                    "isSystemTool" : true,
+                    "onChange": function(){
+                        this.data[name] = actionEditor.data;
+                        this.changeData(name);
+                    }.bind(this)
+                });
+                actionEditor.load(actionContent);
+            }.bind(this));
+        }.bind(this));
+
         var actionAreas = this.propertyContent.getElements(".MWFActionArea");
         var actionAreas = this.propertyContent.getElements(".MWFActionArea");
         actionAreas.each(function(node){
         actionAreas.each(function(node){
             var name = node.get("name");
             var name = node.get("name");

+ 4 - 3
o2web/source/x_component_cms_FormDesigner/widget/ActionsEditor.js

@@ -75,6 +75,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor = new Class({
                 array.each( function(tool){
                 array.each( function(tool){
                     for( var i=0; i<list.length; i++ ){
                     for( var i=0; i<list.length; i++ ){
                         if( list[i].id === tool.data.id ){
                         if( list[i].id === tool.data.id ){
+                            list[i].system = true;
                             this.data.push( list[i] );
                             this.data.push( list[i] );
                             var action = new MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction(this);
                             var action = new MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction(this);
                             action.load(list[i]);
                             action.load(list[i]);
@@ -139,7 +140,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
             this.conditionButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/code_empty.png)");
             this.conditionButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/code_empty.png)");
         }
         }
 
 
-        if (!this.editor.options.noEditShow){
+        if (!this.editor.options.noEditShow && !this.data.system){
             this.editButton = new Element("div", {"styles": this.css.actionEditButtonNode, "title": this.editor.designer.lp.actionbar.edithide}).inject(this.titleNode);
             this.editButton = new Element("div", {"styles": this.css.actionEditButtonNode, "title": this.editor.designer.lp.actionbar.edithide}).inject(this.titleNode);
             if (this.data.editShow){
             if (this.data.editShow){
                 this.editButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/edit.png)");
                 this.editButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/edit.png)");
@@ -148,7 +149,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
             }
             }
         }
         }
 
 
-        if (!this.editor.options.noReadShow){
+        if (!this.editor.options.noReadShow && !this.data.system){
             this.readButton = new Element("div", {"styles": this.css.actionReadButtonNode, "title": this.editor.designer.lp.actionbar.readhide}).inject(this.titleNode);
             this.readButton = new Element("div", {"styles": this.css.actionReadButtonNode, "title": this.editor.designer.lp.actionbar.readhide}).inject(this.titleNode);
             if (this.data.readShow){
             if (this.data.readShow){
                 this.readButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/read.png)");
                 this.readButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/read.png)");
@@ -162,7 +163,7 @@ MWF.xApplication.cms.FormDesigner.widget.ActionsEditor.ButtonAction = new Class(
         var icon = this.editor.path+this.editor.options.style+"/tools/"+this.data.img;
         var icon = this.editor.path+this.editor.options.style+"/tools/"+this.data.img;
         this.iconNode.setStyle("background-image", "url("+icon+")");
         this.iconNode.setStyle("background-image", "url("+icon+")");
 
 
-        if (!this.editor.options.noCode) {
+        if (!this.editor.options.noCode && !this.data.system ) {
             this.scriptNode = new Element("div", {"styles": this.css.actionScriptNode}).inject(this.node);
             this.scriptNode = new Element("div", {"styles": this.css.actionScriptNode}).inject(this.node);
             this.scriptArea = new MWF.widget.ScriptArea(this.scriptNode, {
             this.scriptArea = new MWF.widget.ScriptArea(this.scriptNode, {
                 "title": this.editor.designer.lp.actionbar.editScript,
                 "title": this.editor.designer.lp.actionbar.editScript,

+ 28 - 16
o2web/source/x_component_cms_Xform/Actionbar.js

@@ -36,31 +36,43 @@ MWF.xApplication.cms.Xform.Actionbar = MWF.CMSActionbar =  new Class({
             //this.setCustomToolbars(this.json.tools, this.toolbarNode);
             //this.setCustomToolbars(this.json.tools, this.toolbarNode);
             //
             //
             //this.toolbarWidget.load();
             //this.toolbarWidget.load();
-            if (this.json.hideSystemTools){
-                this.setCustomToolbars(this.json.tools, this.toolbarNode);
+            if( this.json.multiTools ){
+                this.json.multiTools.each( function (tool) {
+                    if( tool.system ){
+                        if( !this.json.hideSystemTools ){
+                            this.setToolbars( [tool], this.toolbarNode, this.readonly);
+                        }
+                    }else{
+                        this.setCustomToolbars([tool], this.toolbarNode);
+                    }
+                }.bind(this));
                 this.toolbarWidget.load();
                 this.toolbarWidget.load();
             }else{
             }else{
-                if (this.json.defaultTools){
-                    this.setToolbars(this.json.defaultTools, this.toolbarNode, this.readonly);
+                if (this.json.hideSystemTools){
                     this.setCustomToolbars(this.json.tools, this.toolbarNode);
                     this.setCustomToolbars(this.json.tools, this.toolbarNode);
                     this.toolbarWidget.load();
                     this.toolbarWidget.load();
                 }else{
                 }else{
-                    MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
-                        this.setToolbars(json, this.toolbarNode, this.readonly, true);
+                    if (this.json.defaultTools){
+                        this.setToolbars(this.json.defaultTools, this.toolbarNode, this.readonly);
                         this.setCustomToolbars(this.json.tools, this.toolbarNode);
                         this.setCustomToolbars(this.json.tools, this.toolbarNode);
-
                         this.toolbarWidget.load();
                         this.toolbarWidget.load();
-                    }.bind(this), false);
-                }
+                    }else{
+                        MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
+                            this.setToolbars(json, this.toolbarNode, this.readonly, true);
+                            this.setCustomToolbars(this.json.tools, this.toolbarNode);
 
 
-                //MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
-                //    this.setToolbars(json, this.toolbarNode, this.readonly);
-                //    this.setCustomToolbars(this.json.tools, this.toolbarNode);
-                //
-                //    this.toolbarWidget.load();
-                //}.bind(this), false);
-            }
+                            this.toolbarWidget.load();
+                        }.bind(this), false);
+                    }
 
 
+                    //MWF.getJSON("../x_component_cms_Xform/$Form/toolbars.json", function(json){
+                    //    this.setToolbars(json, this.toolbarNode, this.readonly);
+                    //    this.setCustomToolbars(this.json.tools, this.toolbarNode);
+                    //
+                    //    this.toolbarWidget.load();
+                    //}.bind(this), false);
+                }
+            }
         }.bind(this));
         }.bind(this));
         //}
         //}
     },
     },

+ 2 - 2
o2web/source/x_component_portal_PageDesigner/Main.js

@@ -1391,8 +1391,8 @@ MWF.xApplication.portal.PageDesigner.Main = new Class({
         widgetList = [];
         widgetList = [];
 
 
         Object.each(data.moduleList, function(moudle){
         Object.each(data.moduleList, function(moudle){
-            if (moudle.moduleName.toLowerCase()=="widget"){
-                if (moudle.widgetType == "select"){
+            if (moudle.type.toLowerCase()=="widget"){
+                if (moudle.widgetType == "select" && moudle.widgetSelected ){
                     widgetList.push(moudle.widgetSelected);
                     widgetList.push(moudle.widgetSelected);
                 }
                 }
             }
             }

+ 5 - 2
o2web/source/x_component_portal_Portal/Main.js

@@ -91,6 +91,7 @@ MWF.xApplication.portal.Portal.Main = new Class({
         var loadModuleFlag = false;
         var loadModuleFlag = false;
         var check = function(){
         var check = function(){
             if (!!pageJson && loadModuleFlag){
             if (!!pageJson && loadModuleFlag){
+                this.pageJson = pageJson;
                 layout.sessionPromise.finally(function(){
                 layout.sessionPromise.finally(function(){
                     this.pageInfor = pageJson.data;
                     this.pageInfor = pageJson.data;
                     this.setTitle(this.portal.name+"-"+pageJson.data.name);
                     this.setTitle(this.portal.name+"-"+pageJson.data.name);
@@ -156,8 +157,9 @@ MWF.xApplication.portal.Portal.Main = new Class({
         var loadModuleFlag = false;
         var loadModuleFlag = false;
         var check = function(){
         var check = function(){
             if (!!pageJson && loadModuleFlag){
             if (!!pageJson && loadModuleFlag){
+                this.pageJson = pageJson;
                 layout.sessionPromise.finally(function(){
                 layout.sessionPromise.finally(function(){
-                    this.setTitle(pageJson.data.name);
+                    this.setTitle((this.portal.name) ? this.portal.name+"-"+pageJson.data.page.name : pageJson.data.page.name);
                     if (pageJson.data.page){
                     if (pageJson.data.page){
                         this.page = (pageJson.data.page.data) ? JSON.decode(MWF.decodeJsonString(pageJson.data.page.data)): null;
                         this.page = (pageJson.data.page.data) ? JSON.decode(MWF.decodeJsonString(pageJson.data.page.data)): null;
                         this.relatedFormMap = pageJson.data.relatedWidgetMap;
                         this.relatedFormMap = pageJson.data.relatedWidgetMap;
@@ -197,7 +199,8 @@ MWF.xApplication.portal.Portal.Main = new Class({
         }
         }
         this.action.getApplication(this.options.portalId, function(json){
         this.action.getApplication(this.options.portalId, function(json){
             this.portal = json.data;
             this.portal = json.data;
-            this.setTitle(this.portal.name);
+            if (this.pageJson) this.setTitle(this.portal.name+"-"+this.pageJson.data.page.name);
+
             if (this.portal.icon){
             if (this.portal.icon){
                 if (this.taskitem){
                 if (this.taskitem){
                     this.taskitem.iconNode.setStyles({
                     this.taskitem.iconNode.setStyles({

+ 76 - 42
o2web/source/x_component_process_FormDesigner/Module/Actionbar.js

@@ -28,6 +28,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
         this.containerNode = null;
         this.containerNode = null;
         this.systemTools = [];
         this.systemTools = [];
         this.customTools = [];
         this.customTools = [];
+        this.multiTools = [];
         //this.containers = [];
         //this.containers = [];
         //this.elements = [];
         //this.elements = [];
 	},
 	},
@@ -79,7 +80,8 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
             this.toolbarWidget = new MWF.widget.Toolbar(this.toolbarNode, {"style": this.json.style}, this);
             this.toolbarWidget = new MWF.widget.Toolbar(this.toolbarNode, {"style": this.json.style}, this);
 
 
             MWF.getJSON(this.path+"toolbars.json", function(json){
             MWF.getJSON(this.path+"toolbars.json", function(json){
-                this.json.defaultTools = json;
+                // this.json.defaultTools = json;
+                this.json.multiTools = json.map( function (d) { d.system = true; return d; });
                 this.setToolbars(json, this.toolbarNode);
                 this.setToolbars(json, this.toolbarNode);
                 this.toolbarWidget.load();
                 this.toolbarWidget.load();
             }.bind(this), false);
             }.bind(this), false);
@@ -119,28 +121,26 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
             if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             this.toolbarWidget.css = this.json.actionStyles;
             this.toolbarWidget.css = this.json.actionStyles;
 
 
-            if (this.json.defaultTools){
-                var json = Array.clone(this.json.defaultTools);
-                //if (this.json.tools) json.append(this.json.tools);
-                this.setToolbars(json, this.toolbarNode);
-                if (this.json.tools){
-                    this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-                }
-                this.toolbarWidget.load();
-                //json = null;
-            }else{
-                MWF.getJSON(this.path+"toolbars.json", function(json){
-                    this.json.defaultTools = json;
-                    var json = Array.clone(this.json.defaultTools);
-                    //if (this.json.tools) json.append(this.json.tools);
-                    this.setToolbars(json, this.toolbarNode);
-                    if (this.json.tools){
-                        this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-                    }
-                    this.toolbarWidget.load();
-                    //json = null;
-                }.bind(this), false);
-            }
+            this.loadMultiToolbar();
+
+            // if (this.json.defaultTools){
+            //     var json = Array.clone(this.json.defaultTools);
+            //     this.setToolbars(json, this.toolbarNode);
+            //     if (this.json.tools){
+            //         this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //     }
+            //     this.toolbarWidget.load();
+            // }else{
+            //     MWF.getJSON(this.path+"toolbars.json", function(json){
+            //         this.json.defaultTools = json;
+            //         var json = Array.clone(this.json.defaultTools);
+            //         this.setToolbars(json, this.toolbarNode);
+            //         if (this.json.tools){
+            //             this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //         }
+            //         this.toolbarWidget.load();
+            //     }.bind(this), false);
+            // }
         }
         }
 
 
     },
     },
@@ -159,29 +159,60 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
                 this.json.actionStyles = Object.clone(this.toolbarWidget.css);
                 this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             }
             }
 
 
-            if (this.json.defaultTools){
-                var json = Array.clone(this.json.defaultTools);
-                //if (this.json.tools) json.append(this.json.tools);
-                this.setToolbars(json, this.toolbarNode);
+            this.loadMultiToolbar();
+
+            // if (this.json.defaultTools){
+            //     var json = Array.clone(this.json.defaultTools);
+            //     this.setToolbars(json, this.toolbarNode);
+            //     if (this.json.tools){
+            //         this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //     }
+            //     this.toolbarWidget.load();
+            // }else{
+            //     MWF.getJSON(this.path+"toolbars.json", function(json){
+            //         this.json.defaultTools = json;
+            //         var json = Array.clone(this.json.defaultTools);
+            //         this.setToolbars(json, this.toolbarNode);
+            //         if (this.json.tools){
+            //             this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //         }
+            //         this.toolbarWidget.load();
+            //         //json = null;
+            //     }.bind(this), false);
+            // }
+        }
+    },
+    loadMultiToolbar : function(){
+        if( this.json.multiTools ){
+            var json = Array.clone(this.json.multiTools);
+            this.setMultiToolbars(json, this.toolbarNode);
+            this.toolbarWidget.load();
+        }else if( this.json.defaultTools ){
+            this.json.multiTools = this.json.defaultTools.map( function (d) { d.system = true; return d; });
+            if (this.json.tools){
+                this.json.multiTools = this.json.multiTools.concat( this.json.tools )
+            }
+            this.setMultiToolbars( Array.clone(this.json.multiTools), this.toolbarNode);
+            this.toolbarWidget.load();
+        }else{
+            MWF.getJSON(this.path+"toolbars.json", function(json){
+                this.json.multiTools = json.map( function (d) { d.system = true; return d; });
                 if (this.json.tools){
                 if (this.json.tools){
-                    this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+                    this.json.multiTools = this.json.multiTools.concat( this.json.tools )
                 }
                 }
+                this.setMultiToolbars(Array.clone(this.json.multiTools), this.toolbarNode);
                 this.toolbarWidget.load();
                 this.toolbarWidget.load();
-                //json = null;
+            }.bind(this), false);
+        }
+    },
+    setMultiToolbars: function(tools, node){
+        tools.each(function(tool){
+            if( tool.system ){
+                this.setToolbars( [tool], node );
             }else{
             }else{
-                MWF.getJSON(this.path+"toolbars.json", function(json){
-                    this.json.defaultTools = json;
-                    var json = Array.clone(this.json.defaultTools);
-                    //if (this.json.tools) json.append(this.json.tools);
-                    this.setToolbars(json, this.toolbarNode);
-                    if (this.json.tools){
-                        this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-                    }
-                    this.toolbarWidget.load();
-                    //json = null;
-                }.bind(this), false);
+                this.setCustomToolbars( [tool], node );
             }
             }
-        }
+        }.bind(this));
     },
     },
     setToolbars: function(tools, node){
     setToolbars: function(tools, node){
         tools.each(function(tool){
         tools.each(function(tool){
@@ -195,7 +226,9 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
             if( this.json.iconOverStyle ){
             if( this.json.iconOverStyle ){
                 actionNode.set("MWFButtonImageOver" , this.path+""+this.options.style+"/tools/"+this.json.iconOverStyle+"/"+tool.img );
                 actionNode.set("MWFButtonImageOver" , this.path+""+this.options.style+"/tools/"+this.json.iconOverStyle+"/"+tool.img );
             }
             }
+            actionNode.isSystemTool = true;
             this.systemTools.push(actionNode);
             this.systemTools.push(actionNode);
+            this.multiTools.push( actionNode );
             if (tool.sub){
             if (tool.sub){
                 var subNode = node.getLast();
                 var subNode = node.getLast();
                 this.setToolbars(tool.sub, subNode);
                 this.setToolbars(tool.sub, subNode);
@@ -221,6 +254,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
                 actionNode.set("MWFButtonImageOver" , this.path+""+this.options.style +"/custom/"+this.json.customIconOverStyle+ "/" +tool.img );
                 actionNode.set("MWFButtonImageOver" , this.path+""+this.options.style +"/custom/"+this.json.customIconOverStyle+ "/" +tool.img );
             }
             }
             this.customTools.push(actionNode);
             this.customTools.push(actionNode);
+            this.multiTools.push( actionNode );
             if (tool.sub){
             if (tool.sub){
                 var subNode = node.getLast();
                 var subNode = node.getLast();
                 this.setToolbars(tool.sub, subNode);
                 this.setToolbars(tool.sub, subNode);
@@ -239,7 +273,7 @@ MWF.xApplication.process.FormDesigner.Module.Actionbar = MWF.FCActionbar = new C
                 });
                 });
             }
             }
         }
         }
-        if (name=="defaultTools" || name=="tools" || name==="actionStyles"){
+        if (name=="defaultTools" || name=="tools" || name=="multiTools" || name==="actionStyles"){
             this._refreshActionbar();
             this._refreshActionbar();
         }
         }
 
 

+ 3 - 2
o2web/source/x_component_process_FormDesigner/Module/Actionbar/actionbar.html

@@ -30,8 +30,9 @@
 		</table>
 		</table>
 	</div>
 	</div>
     <div title="操作"  class="MWFTab" style="overflow: hidden">
     <div title="操作"  class="MWFTab" style="overflow: hidden">
-		<div class="MWFDefaultActionArea" name="defaultTools"></div>
-        <div class="MWFActionArea" name="tools"></div>
+<!--		<div class="MWFDefaultActionArea" name="defaultTools"></div>-->
+<!--        <div class="MWFActionArea" name="tools"></div>-->
+		<div class="MWFMultiActionArea" name="multiTools"></div>
     </div>
     </div>
     <div title="样式"  class="MWFTab">
     <div title="样式"  class="MWFTab">
         <div class="MWFActionStylesArea" name="actionStyles"></div>
         <div class="MWFActionStylesArea" name="actionStyles"></div>

+ 17 - 0
o2web/source/x_component_process_FormDesigner/Property.js

@@ -1862,6 +1862,23 @@ debugger;
         }.bind(this));
         }.bind(this));
     },
     },
     loadActionArea: function(){
     loadActionArea: function(){
+	    var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
+        multiActionArea.each(function(node){
+            var name = node.get("name");
+            var actionContent = this.data[name];
+            MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){
+                var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
+                    "maxObj": this.propertyNode.parentElement.parentElement.parentElement,
+                    "isSystemTool" : true,
+                    "onChange": function(){
+                        this.data[name] = actionEditor.data;
+                        this.changeData(name);
+                    }.bind(this)
+                });
+                actionEditor.load(actionContent);
+            }.bind(this));
+        }.bind(this));
+
         var actionAreas = this.propertyContent.getElements(".MWFActionArea");
         var actionAreas = this.propertyContent.getElements(".MWFActionArea");
         actionAreas.each(function(node){
         actionAreas.each(function(node){
             var name = node.get("name");
             var name = node.get("name");

+ 4 - 3
o2web/source/x_component_process_FormDesigner/widget/ActionsEditor.js

@@ -169,6 +169,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor = new Class({
                 array.each( function(tool){
                 array.each( function(tool){
                     for( var i=0; i<list.length; i++ ){
                     for( var i=0; i<list.length; i++ ){
                         if( list[i].id === tool.data.id ){
                         if( list[i].id === tool.data.id ){
+                            list[i].system = true;
                             this.data.push( list[i] );
                             this.data.push( list[i] );
                             var action = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction(this);
                             var action = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction(this);
                             action.load(list[i]);
                             action.load(list[i]);
@@ -261,7 +262,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
             this.conditionButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/code_empty.png)");
             this.conditionButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/code_empty.png)");
         }
         }
 
 
-        if (!this.editor.options.noEditShow){
+        if (!this.editor.options.noEditShow && !this.data.system){
             this.editButton = new Element("div", {"styles": this.css.actionEditButtonNode, "title": this.editor.designer.lp.actionbar.edithide}).inject(this.titleNode);
             this.editButton = new Element("div", {"styles": this.css.actionEditButtonNode, "title": this.editor.designer.lp.actionbar.edithide}).inject(this.titleNode);
             if (this.data.editShow){
             if (this.data.editShow){
                 this.editButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/edit.png)");
                 this.editButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/edit.png)");
@@ -270,7 +271,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
             }
             }
         }
         }
 
 
-        if (!this.editor.options.noReadShow){
+        if (!this.editor.options.noReadShow && !this.data.system){
             this.readButton = new Element("div", {"styles": this.css.actionReadButtonNode, "title": this.editor.designer.lp.actionbar.readhide}).inject(this.titleNode);
             this.readButton = new Element("div", {"styles": this.css.actionReadButtonNode, "title": this.editor.designer.lp.actionbar.readhide}).inject(this.titleNode);
             if (this.data.readShow){
             if (this.data.readShow){
                 this.readButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/read.png)");
                 this.readButton.setStyle("background-image", "url("+this.editor.path+this.editor.options.style+"/icon/read.png)");
@@ -282,7 +283,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor.ButtonAction = new Cl
         var icon = this.editor.path+this.editor.options.style+"/tools/"+this.data.img;
         var icon = this.editor.path+this.editor.options.style+"/tools/"+this.data.img;
         this.iconNode.setStyle("background-image", "url("+icon+")");
         this.iconNode.setStyle("background-image", "url("+icon+")");
 
 
-        if (!this.editor.options.noCode){
+        if (!this.editor.options.noCode && !this.data.system ){
             this.scriptNode = new Element("div", {"styles": this.css.actionScriptNode}).inject(this.node);
             this.scriptNode = new Element("div", {"styles": this.css.actionScriptNode}).inject(this.node);
             this.scriptArea = new MWF.widget.ScriptArea(this.scriptNode, {
             this.scriptArea = new MWF.widget.ScriptArea(this.scriptNode, {
                 "title": this.editor.designer.lp.actionbar.editScript,
                 "title": this.editor.designer.lp.actionbar.editScript,

+ 20 - 7
o2web/source/x_component_query_Query/Viewer.js

@@ -2459,20 +2459,33 @@ MWF.xApplication.query.Query.Viewer.Actionbar = new Class({
             if (this.json.actionStyles) this.toolbarWidget.css = this.json.actionStyles;
             if (this.json.actionStyles) this.toolbarWidget.css = this.json.actionStyles;
             //alert(this.readonly)
             //alert(this.readonly)
 
 
-            if (this.json.hideSystemTools){
-                this.setCustomToolbars(this.json.tools, this.toolbarNode);
+            if( this.json.multiTools ){
+                this.json.multiTools.each( function (tool) {
+                    if( tool.system ){
+                        if( !this.json.hideSystemTools ){
+                            this.setToolbars([tool], this.toolbarNode, this.readonly);
+                        }
+                    }else{
+                        this.setCustomToolbars([tool], this.toolbarNode);
+                    }
+                }.bind(this));
                 this.toolbarWidget.load();
                 this.toolbarWidget.load();
             }else{
             }else{
-                if (this.json.defaultTools){
-                    this.setToolbars(this.json.defaultTools, this.toolbarNode, this.readonly);
+                if (this.json.hideSystemTools){
                     this.setCustomToolbars(this.json.tools, this.toolbarNode);
                     this.setCustomToolbars(this.json.tools, this.toolbarNode);
                     this.toolbarWidget.load();
                     this.toolbarWidget.load();
                 }else{
                 }else{
-                    MWF.getJSON(this.form.path+"toolbars.json", function(json){
-                        this.setToolbars(json, this.toolbarNode, this.readonly, true);
+                    if (this.json.defaultTools){
+                        this.setToolbars(this.json.defaultTools, this.toolbarNode, this.readonly);
                         this.setCustomToolbars(this.json.tools, this.toolbarNode);
                         this.setCustomToolbars(this.json.tools, this.toolbarNode);
                         this.toolbarWidget.load();
                         this.toolbarWidget.load();
-                    }.bind(this), null);
+                    }else{
+                        MWF.getJSON(this.form.path+"toolbars.json", function(json){
+                            this.setToolbars(json, this.toolbarNode, this.readonly, true);
+                            this.setCustomToolbars(this.json.tools, this.toolbarNode);
+                            this.toolbarWidget.load();
+                        }.bind(this), null);
+                    }
                 }
                 }
             }
             }
 
 

+ 2 - 1
o2web/source/x_component_query_StatementDesigner/$Statement/actionbar.html

@@ -25,7 +25,8 @@
 	</div>
 	</div>
     <div title="操作"  class="MWFTab" style="overflow: hidden">
     <div title="操作"  class="MWFTab" style="overflow: hidden">
 <!--		<div class="MWFDefaultActionArea" name="defaultTools"></div>-->
 <!--		<div class="MWFDefaultActionArea" name="defaultTools"></div>-->
-        <div class="MWFActionArea" name="tools"></div>
+<!--        <div class="MWFActionArea" name="tools"></div>-->
+		<div class="MWFMultiActionArea" name="multiTools"></div>
     </div>
     </div>
     <div title="样式"  class="MWFTab">
     <div title="样式"  class="MWFTab">
         <div class="MWFActionStylesArea" name="actionStyles"></div>
         <div class="MWFActionStylesArea" name="actionStyles"></div>

+ 93 - 0
o2web/source/x_component_query_StatementDesigner/Property.js

@@ -75,5 +75,98 @@ MWF.xApplication.query.StatementDesigner.Property = MWF.SDProperty = new Class({
                 });
                 });
             }.bind(this));
             }.bind(this));
         }.bind(this));
         }.bind(this));
+    },
+    loadActionArea: function () {
+        debugger;
+        MWF.xApplication.process = MWF.xApplication.process || {};
+        MWF.APPFD = MWF.xApplication.process.FormDesigner = MWF.xApplication.process.FormDesigner || {};
+        MWF.xDesktop.requireApp("process.FormDesigner", "lp." + o2.language, null, false);
+
+        var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
+        multiActionArea.each(function(node){
+            debugger;
+            var name = node.get("name");
+            var actionContent = this.data[name];
+            MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){
+                var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
+                    "maxObj": this.propertyNode.parentElement.parentElement.parentElement,
+                    "systemToolsAddress": "../x_component_query_StatementDesigner/$Statement/toolbars.json",
+                    "isSystemTool" : false,
+                    "noEditShow": true,
+                    "noReadShow": true,
+                    "onChange": function(){
+                        this.data[name] = actionEditor.data;
+                        this.changeData(name);
+                    }.bind(this)
+                });
+                actionEditor.load(actionContent);
+            }.bind(this));
+        }.bind(this));
+
+        var actionAreas = this.propertyContent.getElements(".MWFActionArea");
+        actionAreas.each(function (node) {
+            var name = node.get("name");
+            var actionContent = this.data[name];
+            MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function () {
+
+                // debugger;
+                // var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, {
+                //     "maxObj": this.propertyNode.parentElement.parentElement.parentElement,
+                //     "noCreate": true,
+                //     "noDelete": true,
+                //     "noCode": true,
+                //     "onChange": function(){
+                //         this.data[name] = actionEditor.data;
+                //     }.bind(this)
+                // });
+                // actionEditor.load(this.module.defaultToolBarsData);
+
+                var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
+                    "maxObj": this.propertyNode.parentElement.parentElement,
+                    "noEditShow": true,
+                    "noReadShow": true,
+                    "onChange": function () {
+                        this.data[name] = actionEditor.data;
+                        this.changeData(name);
+                    }.bind(this)
+                });
+                actionEditor.load(actionContent);
+            }.bind(this));
+
+        }.bind(this));
+
+        var actionAreas = this.propertyContent.getElements(".MWFDefaultActionArea");
+        actionAreas.each(function (node) {
+            var name = node.get("name");
+            var actionContent = this.data[name] || this.module.defaultToolBarsData;
+            MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function () {
+
+                var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
+                    "maxObj": this.propertyNode.parentElement.parentElement,
+                    "isSystemTool": true,
+                    "systemToolsAddress": "../x_component_query_StatementDesigner/$Statement/toolbars.json",
+                    "noCreate": true,
+                    "noDelete": false,
+                    "noCode": true,
+                    "noReadShow": true,
+                    "noEditShow": true,
+                    "onChange": function () {
+                        this.data[name] = actionEditor.data;
+                        this.changeData(name);
+                    }.bind(this)
+                });
+                actionEditor.load(actionContent);
+
+                // var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, {
+                //     "maxObj": this.propertyNode.parentElement.parentElement.parentElement,
+                //     "onChange": function(){
+                //         this.data[name] = actionEditor.data;
+                //     }.bind(this)
+                // });
+                // actionEditor.load(actionContent);
+            }.bind(this));
+
+        }.bind(this));
+
     }
     }
 });
 });

+ 13 - 0
o2web/source/x_component_query_StatementDesigner/Statement.js

@@ -1828,6 +1828,19 @@ MWF.xApplication.query.StatementDesigner.View.Actionbar = new Class({
         //this._hideActions();
         //this._hideActions();
         this.hideProperty();
         this.hideProperty();
     },
     },
+    showProperty: function(){
+        if (!this.property){
+            this.property = new MWF.xApplication.query.StatementDesigner.Property(this, this.view.designer.propertyContentArea, this.view.designer, {
+                "path": this.propertyPath,
+                "onPostLoad": function(){
+                    this.property.show();
+                }.bind(this)
+            });
+            this.property.load();
+        }else{
+            this.property.show();
+        }
+    }
 });
 });
 
 
 MWF.xApplication.query.StatementDesigner.View.Paging = new Class({
 MWF.xApplication.query.StatementDesigner.View.Paging = new Class({

+ 3 - 2
o2web/source/x_component_query_ViewDesigner/$View/actionbar.html

@@ -24,8 +24,9 @@
 		</table>
 		</table>
 	</div>
 	</div>
     <div title="操作"  class="MWFTab" style="overflow: hidden">
     <div title="操作"  class="MWFTab" style="overflow: hidden">
-		<div class="MWFDefaultActionArea" name="defaultTools"></div>
-        <div class="MWFActionArea" name="tools"></div>
+<!--		<div class="MWFDefaultActionArea" name="defaultTools"></div>-->
+<!--        <div class="MWFActionArea" name="tools"></div>-->
+		<div class="MWFMultiActionArea" name="multiTools"></div>
     </div>
     </div>
     <div title="样式"  class="MWFTab">
     <div title="样式"  class="MWFTab">
         <div class="MWFActionStylesArea" name="actionStyles"></div>
         <div class="MWFActionStylesArea" name="actionStyles"></div>

+ 20 - 0
o2web/source/x_component_query_ViewDesigner/Property.js

@@ -934,6 +934,26 @@ MWF.xApplication.query.ViewDesigner.Property = MWF.FVProperty = new Class({
         MWF.APPFD = MWF.xApplication.process.FormDesigner = MWF.xApplication.process.FormDesigner || {};
         MWF.APPFD = MWF.xApplication.process.FormDesigner = MWF.xApplication.process.FormDesigner || {};
         MWF.xDesktop.requireApp("process.FormDesigner", "lp." + o2.language, null, false);
         MWF.xDesktop.requireApp("process.FormDesigner", "lp." + o2.language, null, false);
 
 
+        var multiActionArea = this.propertyContent.getElements(".MWFMultiActionArea");
+        multiActionArea.each(function(node){
+            var name = node.get("name");
+            var actionContent = this.data[name];
+            MWF.xDesktop.requireApp("process.FormDesigner", "widget.ActionsEditor", function(){
+                var actionEditor = new MWF.xApplication.process.FormDesigner.widget.ActionsEditor(node, this.designer, this.data, {
+                    "maxObj": this.propertyNode.parentElement.parentElement.parentElement,
+                    "systemToolsAddress": "../x_component_query_ViewDesigner/$View/toolbars.json",
+                    "isSystemTool" : true,
+                    "noEditShow": true,
+                    "noReadShow": true,
+                    "onChange": function(){
+                        this.data[name] = actionEditor.data;
+                        this.changeData(name);
+                    }.bind(this)
+                });
+                actionEditor.load(actionContent);
+            }.bind(this));
+        }.bind(this));
+
         var actionAreas = this.propertyContent.getElements(".MWFActionArea");
         var actionAreas = this.propertyContent.getElements(".MWFActionArea");
         actionAreas.each(function (node) {
         actionAreas.each(function (node) {
             var name = node.get("name");
             var name = node.get("name");

+ 94 - 71
o2web/source/x_component_query_ViewDesigner/View.js

@@ -1883,36 +1883,28 @@ MWF.xApplication.query.ViewDesigner.View.Actionbar = new Class({
             this.toolbarWidget.css = Object.clone(this.json.actionStyles);
             this.toolbarWidget.css = Object.clone(this.json.actionStyles);
         }
         }
 
 
-        //MWF.getJSON(this.path+"toolbars.json", function(json){
-        //    this.json.defaultTools = json;
-        //    this.setToolbars(json, this.toolbarNode);
-        //    debugger;
-        //    this.toolbarWidget.load();
-        //}.bind(this), false);
-        if (this.json.defaultTools){
-            var json = Array.clone(this.json.defaultTools);
-            //if (this.json.tools) json.append(this.json.tools);
-            this.setToolbars(json, this.toolbarNode);
-            if (this.json.tools){
-                this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-            }
-            this.toolbarWidget.load();
-            this._setEditStyle_custom("hideSystemTools");
-            //json = null;
-        }else{
-            MWF.getJSON( this.getJsonPath(), function(json){
-                this.json.defaultTools = json;
-                var json = Array.clone(this.json.defaultTools);
-                //if (this.json.tools) json.append(this.json.tools);
-                this.setToolbars(json, this.toolbarNode);
-                if (this.json.tools){
-                    this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-                }
-                this.toolbarWidget.load();
-                this._setEditStyle_custom("hideSystemTools");
-                //json = null;
-            }.bind(this), false);
-        }
+        this.loadMultiToolbar();
+
+        // if (this.json.defaultTools){
+        //     var json = Array.clone(this.json.defaultTools);
+        //     this.setToolbars(json, this.toolbarNode);
+        //     if (this.json.tools){
+        //         this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+        //     }
+        //     this.toolbarWidget.load();
+        //     this._setEditStyle_custom("hideSystemTools");
+        // }else{
+        //     MWF.getJSON( this.getJsonPath(), function(json){
+        //         this.json.defaultTools = json;
+        //         var json = Array.clone(this.json.defaultTools);
+        //         this.setToolbars(json, this.toolbarNode);
+        //         if (this.json.tools){
+        //             this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+        //         }
+        //         this.toolbarWidget.load();
+        //         this._setEditStyle_custom("hideSystemTools");
+        //     }.bind(this), false);
+        // }
     },
     },
 
 
     _refreshActionbar: function(){
     _refreshActionbar: function(){
@@ -1926,28 +1918,26 @@ MWF.xApplication.query.ViewDesigner.View.Actionbar = new Class({
             if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             if (!this.json.actionStyles) this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             this.toolbarWidget.css = this.json.actionStyles;
             this.toolbarWidget.css = this.json.actionStyles;
 
 
-            if (this.json.defaultTools){
-                var json = Array.clone(this.json.defaultTools);
-                //if (this.json.tools) json.append(this.json.tools);
-                this.setToolbars(json, this.toolbarNode);
-                if (this.json.tools){
-                    this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-                }
-                this.toolbarWidget.load();
-                //json = null;
-            }else{
-                MWF.getJSON( this.getJsonPath(), function(json){
-                    this.json.defaultTools = json;
-                    var json = Array.clone(this.json.defaultTools);
-                    //if (this.json.tools) json.append(this.json.tools);
-                    this.setToolbars(json, this.toolbarNode);
-                    if (this.json.tools){
-                        this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-                    }
-                    this.toolbarWidget.load();
-                    //json = null;
-                }.bind(this), false);
-            }
+            this.loadMultiToolbar();
+
+            // if (this.json.defaultTools){
+            //     var json = Array.clone(this.json.defaultTools);
+            //     this.setToolbars(json, this.toolbarNode);
+            //     if (this.json.tools){
+            //         this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //     }
+            //     this.toolbarWidget.load();
+            // }else{
+            //     MWF.getJSON( this.getJsonPath(), function(json){
+            //         this.json.defaultTools = json;
+            //         var json = Array.clone(this.json.defaultTools);
+            //         this.setToolbars(json, this.toolbarNode);
+            //         if (this.json.tools){
+            //             this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //         }
+            //         this.toolbarWidget.load();
+            //     }.bind(this), false);
+            // }
         //}
         //}
 
 
     },
     },
@@ -1966,29 +1956,62 @@ MWF.xApplication.query.ViewDesigner.View.Actionbar = new Class({
                 this.json.actionStyles = Object.clone(this.toolbarWidget.css);
                 this.json.actionStyles = Object.clone(this.toolbarWidget.css);
             }
             }
 
 
-            if (this.json.defaultTools){
-                var json = Array.clone(this.json.defaultTools);
-                //if (this.json.tools) json.append(this.json.tools);
-                this.setToolbars(json, this.toolbarNode);
+            this.loadMultiToolbar();
+
+            // if (this.json.defaultTools){
+            //     var json = Array.clone(this.json.defaultTools);
+            //     this.setToolbars(json, this.toolbarNode);
+            //     if (this.json.tools){
+            //         this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //     }
+            //     this.toolbarWidget.load();
+            // }else{
+            //     MWF.getJSON(this.path+"toolbars.json", function(json){
+            //         this.json.defaultTools = json;
+            //         var json = Array.clone(this.json.defaultTools);
+            //         this.setToolbars(json, this.toolbarNode);
+            //         if (this.json.tools){
+            //             this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+            //         }
+            //         this.toolbarWidget.load();
+            //     }.bind(this), false);
+            // }
+        //}
+    },
+    loadMultiToolbar : function(){
+        if( this.json.multiTools ){
+            var json = Array.clone(this.json.multiTools);
+            this.setMultiToolbars(json, this.toolbarNode);
+            this.toolbarWidget.load();
+            this._setEditStyle_custom("hideSystemTools");
+        }else if( this.json.defaultTools ){
+            this.json.multiTools = this.json.defaultTools.map( function (d) { d.system = true; return d; });
+            if (this.json.tools){
+                this.json.multiTools = this.json.multiTools.concat( this.json.tools )
+            }
+            this.setMultiToolbars( Array.clone(this.json.multiTools), this.toolbarNode);
+            this.toolbarWidget.load();
+            this._setEditStyle_custom("hideSystemTools");
+        }else{
+            MWF.getJSON(this.path+"toolbars.json", function(json){
+                this.json.multiTools = json.map( function (d) { d.system = true; return d; });
                 if (this.json.tools){
                 if (this.json.tools){
-                    this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
+                    this.json.multiTools = this.json.multiTools.concat( this.json.tools )
                 }
                 }
+                this.setMultiToolbars(Array.clone(this.json.multiTools), this.toolbarNode);
                 this.toolbarWidget.load();
                 this.toolbarWidget.load();
-                //json = null;
+                this._setEditStyle_custom("hideSystemTools");
+            }.bind(this), false);
+        }
+    },
+    setMultiToolbars: function(tools, node){
+        tools.each(function(tool){
+            if( tool.system ){
+                this.setToolbars( [tool], node );
             }else{
             }else{
-                MWF.getJSON(this.path+"toolbars.json", function(json){
-                    this.json.defaultTools = json;
-                    var json = Array.clone(this.json.defaultTools);
-                    //if (this.json.tools) json.append(this.json.tools);
-                    this.setToolbars(json, this.toolbarNode);
-                    if (this.json.tools){
-                        this.setCustomToolbars(Array.clone(this.json.tools), this.toolbarNode);
-                    }
-                    this.toolbarWidget.load();
-                    //json = null;
-                }.bind(this), false);
+                this.setCustomToolbars( [tool], node );
             }
             }
-        //}
+        }.bind(this));
     },
     },
     setToolbars: function(tools, node){
     setToolbars: function(tools, node){
         tools.each(function(tool){
         tools.each(function(tool){
@@ -2046,7 +2069,7 @@ MWF.xApplication.query.ViewDesigner.View.Actionbar = new Class({
                 });
                 });
             }
             }
         }
         }
-        if (name=="defaultTools" || name=="tools" || name==="actionStyles"){
+        if (name=="defaultTools" || name=="tools" || name=="multiTools" || name==="actionStyles"){
             this._refreshActionbar();
             this._refreshActionbar();
         }
         }