Jelajahi Sumber

Merge branch 'fix/form_style' into 'develop'

Merge of fix/form_style to develop 一些表单样式问题修改

See merge request o2oa/o2oa!865
胡起 5 tahun lalu
induk
melakukan
a7fd4a32d2
18 mengubah file dengan 80 tambahan dan 27 penghapusan
  1. 3 3
      o2web/source/x_component_cms_DictionaryDesigner/Dictionary.js
  2. 2 2
      o2web/source/x_component_process_Application/WorkExplorer.js
  3. 3 3
      o2web/source/x_component_process_DictionaryDesigner/Dictionary.js
  4. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_classical.json
  5. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_cms_publish.json
  6. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_common.json
  7. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_file.json
  8. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_project.json
  9. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_project2.json
  10. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_reimbursement.json
  11. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_tab.json
  12. 0 0
      o2web/source/x_component_process_FormDesigner/Module/Form/template/form_tab_red.json
  13. 52 2
      o2web/source/x_component_process_FormDesigner/Module/Iframe.js
  14. 6 7
      o2web/source/x_component_process_FormDesigner/Property.js
  15. 8 6
      o2web/source/x_component_process_ProcessDesigner/Process.js
  16. 1 1
      o2web/source/x_component_process_ProcessManager/Explorer.js
  17. 2 1
      o2web/source/x_component_process_Xform/Button.js
  18. 3 2
      o2web/source/x_component_process_Xform/ViewSelector.js

+ 3 - 3
o2web/source/x_component_cms_DictionaryDesigner/Dictionary.js

@@ -791,7 +791,7 @@ MWF.xApplication.cms.DictionaryDesigner.Dictionary.item = new Class({
             switch(type){
                 case "array":
                     if (this.value!="New Item Value" && this.value!="New Element Value"){
-                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeType, 300, 120, function(){
+                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeType, 300, 120, function(){
                             if (_self.type=="object"){
                                 _self.changeTypeObjectToArray(type);
                             }else{
@@ -814,7 +814,7 @@ MWF.xApplication.cms.DictionaryDesigner.Dictionary.item = new Class({
                     break;
                 case "object":
                     if (this.value!="New Item Value" && this.value!="New Element Value") {
-                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeType, 300, 120, function () {
+                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeType, 300, 120, function () {
                             if (_self.type == "array") {
                                 _self.changeTypeArrayToObject(type);
                             } else {
@@ -837,7 +837,7 @@ MWF.xApplication.cms.DictionaryDesigner.Dictionary.item = new Class({
                     break;
                 default:
                     if (this.value!="New Item Value" && this.value!="New Element Value") {
-                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeTypeDeleteChildren, 300, 120, function () {
+                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeTypeDeleteChildren, 300, 120, function () {
                             if (_self.type == "array") {
                                 _self.changeTypeArrayToPrimitive(type);
                             } else if (_self.type == "object") {

+ 2 - 2
o2web/source/x_component_process_Application/WorkExplorer.js

@@ -621,8 +621,8 @@ MWF.xApplication.process.Application.WorkExplorer = new Class({
     removeWork: function(work, all){
         this.actions.removeWork(work.data.id, this.app.options.id, all, function(json){
             json.data.each(function(item){
-                this.items.erase(this.works[item.id]);
                 this.works[item.id].destroy();
+                this.items.erase(this.works[item.id]);
                 MWF.release(this.works[item.id]);
                 delete this.works[item.id];
             }.bind(this));
@@ -1749,4 +1749,4 @@ MWF.xApplication.process.Application.WorkExplorer.Readed = new Class({
             this.close();
         });
     }
-});
+});

+ 3 - 3
o2web/source/x_component_process_DictionaryDesigner/Dictionary.js

@@ -787,7 +787,7 @@ MWF.xApplication.process.DictionaryDesigner.Dictionary.item = new Class({
             switch(type){
                 case "array":
                     if (this.value!="New Item Value" && this.value!="New Element Value"){
-                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeType, 300, 120, function(){
+                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeType, 300, 120, function(){
                             if (_self.type=="object"){
                                 _self.changeTypeObjectToArray(type);
                             }else{
@@ -810,7 +810,7 @@ MWF.xApplication.process.DictionaryDesigner.Dictionary.item = new Class({
                     break;
                 case "object":
                     if (this.value!="New Item Value" && this.value!="New Element Value") {
-                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeType, 300, 120, function () {
+                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeType, 300, 120, function () {
                             if (_self.type == "array") {
                                 _self.changeTypeArrayToObject(type);
                             } else {
@@ -833,7 +833,7 @@ MWF.xApplication.process.DictionaryDesigner.Dictionary.item = new Class({
                     break;
                 default:
                     if (this.value!="New Item Value" && this.value!="New Element Value") {
-                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeType, this.dictionary.designer.lp.notice.changeTypeDeleteChildren, 300, 120, function () {
+                        this.dictionary.designer.confirm("warn", e, this.dictionary.designer.lp.notice.changeTypeTitle, this.dictionary.designer.lp.notice.changeTypeDeleteChildren, 300, 120, function () {
                             if (_self.type == "array") {
                                 _self.changeTypeArrayToPrimitive(type);
                             } else if (_self.type == "object") {

File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_classical.json


File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_cms_publish.json


File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_common.json


File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_file.json


File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_project.json


File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_project2.json


File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_reimbursement.json


File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_tab.json


File diff ditekan karena terlalu besar
+ 0 - 0
o2web/source/x_component_process_FormDesigner/Module/Form/template/form_tab_red.json


+ 52 - 2
o2web/source/x_component_process_FormDesigner/Module/Iframe.js

@@ -46,6 +46,56 @@ MWF.xApplication.process.FormDesigner.Module.Iframe = MWF.FCIframe = new Class({
 		this.parseModules();
         this.json.moduleName = this.moduleName;
 	},
+	_resetModuleDomNode: function(){
+		// if (this.json.preprocessing){
+		// 	var node = new Element("div", {
+		// 		"MWFType": "iframe",
+		// 		"id": this.json.id,
+		// 		"styles": this.css.moduleNodeMove,
+		// 		"events": {
+		// 			"selectstart": function(){
+		// 				return false;
+		// 			}
+		// 		}
+		// 	}).inject(this.node, "after");
+		// 	this.node.destroy();
+		// 	this._createNode(node);
+		//}
+	},
+	_preprocessingModuleData: function(){
+		// var iframe = new Element("iframe", {
+		// 	"src": src
+		// }).inject(this.node, "after");
+		// iframe.setStyles({
+		// 	"width": "100%",
+		// 	"border": "0"
+		// });
+		// this.recoveryNode = this.node.dispose();
+		//
+		// if (this.json.styles){
+		// 	this.json.recoveryStyles = Object.clone(this.json.styles);
+		// 	if (this.json.recoveryStyles) Object.each(this.json.recoveryStyles, function(value, key){
+		// 		if ((value.indexOf("x_processplatform_assemble_surface")==-1 && value.indexOf("x_portal_assemble_surface")==-1)){
+		// 			iframe.setStyle(key, value);
+		// 			delete this.json.styles[key];
+		// 		}
+		// 	}.bind(this));
+		// }
+		// this.json.preprocessing = "y";
+	},
+	_recoveryModuleData: function(){
+		// if (this.json.recoveryStyles) this.json.styles = this.json.recoveryStyles;
+		//
+		// if (this.recoveryNode) {
+		// 	this.node.empty();
+		// 	this.recoveryTextNode.inject(this.node, "top");
+		// }
+		// if (this.recoveryIconNode) {
+		// 	this.recoveryIconNode.inject(this.node, "top");
+		// }
+		// this.json.recoveryStyles = null;
+		// this.recoveryNode = null;
+	},
 	_createMoveNode: function(){
 		this.moveNode = new Element("div", {
 			"MWFType": "iframe",
@@ -58,8 +108,8 @@ MWF.xApplication.process.FormDesigner.Module.Iframe = MWF.FCIframe = new Class({
 			}
 		}).inject(this.form.container);
 	},
-	_createNode: function(){
-		this.node = this.moveNode.clone(true, true);
+	_createNode: function(node){
+		this.node = node || this.moveNode.clone(true, true);
 		this.node.setStyles(this.css.moduleNode);
 		this.node.set("id", this.json.id);
 		this.node.addEvent("selectstart", function(){

+ 6 - 7
o2web/source/x_component_process_FormDesigner/Property.js

@@ -179,16 +179,15 @@ MWF.xApplication.process.FormDesigner.Property = MWF.FCProperty = new Class({
                                 htmlNode.set("text", html_beautify(copy.outerHTML, {"indent_size":1}));
                             }.bind(this));
 
-
-                            MWF.widget.ace.load(function(){
-                                COMMON.AjaxModule.loadDom("../o2_lib/ace/src-min-noconflict/ext-static_highlight.js", function(){
-                                    var highlight = ace.require("ace/ext/static_highlight");
-                                    highlight(htmlNode, {mode: "ace/mode/html", theme: "ace/theme/eclipse", "fontSize": 16});
+                            o2.require("o2.widget.ace", function(){
+                                MWF.widget.ace.load(function(){
+                                    COMMON.AjaxModule.loadDom("../o2_lib/ace/src-min-noconflict/ext-static_highlight.js", function(){
+                                        var highlight = ace.require("ace/ext/static_highlight");
+                                        highlight(htmlNode, {mode: "ace/mode/html", theme: "ace/theme/eclipse", "fontSize": 16});
+                                    }.bind(this));
                                 }.bind(this));
                             }.bind(this));
 
-
-
 							copy.destroy();
 						}.bind(this)
 					});

+ 8 - 6
o2web/source/x_component_process_ProcessDesigner/Process.js

@@ -1558,12 +1558,14 @@ MWF.xApplication.process.ProcessDesigner.Process.Panel = new Class({
 
         this.jsonStringNode.set("text", JSON.stringify(json,null,2));
 
-        MWF.widget.ace.load(function(){
-            COMMON.AjaxModule.loadDom("../o2_lib/ace/src-min-noconflict/ext-static_highlight.js", function(){
-                var highlight = ace.require("ace/ext/static_highlight");
-                highlight(this.jsonStringNode, {mode: "ace/mode/json", theme: "ace/theme/tomorrow", "fontSize": 16});
-            }.bind(this));
-        }.bind(this));
+		o2.require("o2.widget.ace", function(){
+			MWF.widget.ace.load(function(){
+				COMMON.AjaxModule.loadDom("../o2_lib/ace/src-min-noconflict/ext-static_highlight.js", function(){
+					var highlight = ace.require("ace/ext/static_highlight");
+					highlight(this.jsonStringNode, {mode: "ace/mode/json", theme: "ace/theme/tomorrow", "fontSize": 16});
+				}.bind(this));
+			}.bind(this));
+		}.bind(this));
 	},
 	clearJson: function(){
 		this.json = null;

+ 1 - 1
o2web/source/x_component_process_ProcessManager/Explorer.js

@@ -168,7 +168,7 @@ MWF.xApplication.process.ProcessManager.Explorer = new Class({
         }).inject(this.elementContentNode);
 
         this.setContentSize();
-        this.app.addEvent("resize", function(){this.setContentSize();}.bind(this));
+        this.app.addEvent("resize", this.setContentSize.bind(this));
     },
     setContentSize: function(){
         var toolbarSize = this.toolbarNode.getSize();

+ 2 - 1
o2web/source/x_component_process_Xform/Button.js

@@ -11,7 +11,8 @@ MWF.xApplication.process.Xform.Button = MWF.APPButton =  new Class({
         // this.node = button;
 
         var button = this.node.getElement("button");
-        button.inject(this.node, "after");
+        if (!button) button = new Element("button");
+            button.inject(this.node, "after");
         this.node.destroy();
         this.node = button;
 

+ 3 - 2
o2web/source/x_component_process_Xform/ViewSelector.js

@@ -5,7 +5,8 @@ MWF.xApplication.process.Xform.ViewSelector = MWF.APPViewSelector =  new Class({
 	Extends: MWF.xApplication.process.Xform.Button,
 
 	_loadUserInterface: function(){
-		var button = new Element("button");
+        var button = this.node.getElement("button");
+		if (!button) button = new Element("button");
 		button.inject(this.node, "after");
 		this.node.destroy();
 		this.node = button;
@@ -380,4 +381,4 @@ MWF.xApplication.process.Xform.ViewSelector = MWF.APPViewSelector =  new Class({
         }
     }
 	
-}); 
+}); 

Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini