unknown 5 лет назад
Родитель
Сommit
af098f33c8

+ 1 - 1
o2web/source/x_component_process_FormDesigner/Module/Form/form.html

@@ -74,7 +74,7 @@
 		<div class="MWFMaplist" name="styles" title="样式"></div>
 		<div class="MWFMaplist" name="properties" title="属性"></div>
 
-        <div style="height:24px; text-align: center; line-height: 24px; background-color: #EEE; border-top: 1px solid #eee;font-weight:bold;">加载脚本</div>
+        <div style="height:24px; text-align: center; line-height: 24px; background-color: #EEE; border-top: 1px solid #999;font-weight:bold;">加载脚本</div>
         <div class="MWFScriptIncluder" name="scriptIncluder"></div>
 
         <div class="MWFCssArea" name="css" title="CSS"></div>

+ 2 - 2
o2web/source/x_component_process_FormDesigner/Property.js

@@ -1455,8 +1455,8 @@ debugger;
                 MWF.xDesktop.requireApp("process.FormDesigner", "widget.ScriptIncluder", function(){
                     var scriptIncluder = new MWF.xApplication.process.FormDesigner.widget.ScriptIncluder(node, this.designer, {
                         "onChange": function(){
-                            // var data = validationEditor.getValidationData();
-                            // this.data[name] = data;
+                            var data = scriptIncluder.getData();
+                            this.data[name] = data;
                         }.bind(this)
                     });
                     scriptIncluder.load(this.data[name])

+ 12 - 0
o2web/source/x_component_process_FormDesigner/lp/zh-cn.js

@@ -90,6 +90,18 @@ MWF.xApplication.process.FormDesigner.LP = {
             "selectDefaultTool" : "选择系统操作"
         },
         "isSave": "正在保存,请稍候...",
+        "scriptIncluder" : {
+		    "yes" : "是",
+            "no" : "否",
+		    "selectScript" : "选择脚本:",
+		    "repeatAddScriptNotice" : "请不要重复添加脚本",
+		    "selectScriptNotice" : "请先选择脚本",
+            "asyncLoad" : "异步加载:",
+		    "asyncLoadScript" : "异步加载脚本:",
+            "syncLoadScript" : "同步加载脚本:",
+            "delete_title": "取消加载脚本确认",
+            "delete_text": "您确定要取消加载选择的脚本?"
+        },
         "validation": {
             "validation": "校验",
             "anytime": "任何时候",

+ 5 - 6
o2web/source/x_component_process_FormDesigner/widget/$ScriptIncluder/default/css.wcss

@@ -7,16 +7,15 @@
         "border-top": "1px solid #999"
     },
     "editorNode": {
-        "border-top": "1px solid #999",
+        "border-top": "0px",
         "overflow": "hidden"
     },
     "actionNode":{
-        "border-top": "1px solid #999",
         "height": "30px",
         "text-align": "center"
     },
     "listNode": {
-        "border-top": "1px solid #999",
+        "border-top": "1px solid #bbb",
         "min-height": "60px",
         "padding-top": "2px",
         "overflow": "hidden"
@@ -124,14 +123,14 @@
         "height": "auto",
         "margin": "2px 4px",
         "background-color": "#fff",
-        "border": "1px solid #999999"
+        "border": "1px solid #ddd"
     },
     "itemNode_current": {
         "cursor": "pointer",
         "height": "auto",
         "margin": "2px 4px",
-        "background-color": "#f5f5f5",
-        "border": "1px solid #999999"
+        "background-color": "#eee",
+        "border": "1px solid #bbb"
     },
     "itemDeleteNode": {
         "width": "20px",

+ 12 - 11
o2web/source/x_component_process_FormDesigner/widget/ScriptIncluder.js

@@ -16,6 +16,7 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder = new Class({
 		this.path = "../x_component_process_FormDesigner/widget/$ScriptIncluder/";
 		this.cssPath = "../x_component_process_FormDesigner/widget/$ScriptIncluder/"+this.options.style+"/css.wcss";
 		this._loadCss();
+		this.lp = this.designer.lp.scriptIncluder;
 		
 		this.items = [];
 	},
@@ -30,10 +31,10 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder = new Class({
     loadEditorNode: function(){
 	    debugger;
         var html = "<table width='100%' border='0' cellpadding='5' cellspacing='0' class='editTable'>" +
-            "<tr><td style='width: 60px; '>异步加载:</td><td align='left'>"+
-            "<input type='radio' name='"+(this.designer.appId||"")+"asyncLoadScript' value='true' checked/>"+
-            "<input type='radio' name='"+(this.designer.appId||"")+"asyncLoadScript' value='false'/>"+
-            "</td></tr><tr><td>选择脚本:</td><td><div class='scriptSelectorArea'></div></td></tr></table>";
+            "<tr><td style='width: 60px; '>"+this.lp.asyncLoad+"</td><td align='left'>"+
+            "<input type='radio' name='"+(this.designer.appId||"")+"asyncLoadScript' value='true' checked/>"+this.lp.yes+
+            "<input type='radio' name='"+(this.designer.appId||"")+"asyncLoadScript' value='false'/>"+this.lp.no+
+            "</td></tr><tr><td>"+this.lp.selectScript+"</td><td><div class='scriptSelectorArea'></div></td></tr></table>";
         this.editorNode.set("html", html);
         var tds = this.editorNode.getElements("td").setStyles(this.css.editTableTdValue);
         this.asyncLoadScript = this.editorNode.getElements("[type='radio']");
@@ -97,7 +98,7 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder = new Class({
         var data = this.getCurrentData();
 
         if ( data.scriptList.length === 0 ){
-            this.showErrorNode("请先选择脚本");
+            this.showErrorNode(this.lp.selectScriptNotice);
             return false;
         }
         for( var i=0; i<this.items.length; i++ ){
@@ -105,7 +106,7 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder = new Class({
             for( var j=0; j<scriptList.length; j++ ){
                 for( var k=0; k< data.scriptList.length; k++ )
                 if( scriptList[j].id === data.scriptList[i].id ){
-                    this.showErrorNode("请不要重复添加脚本");
+                    this.showErrorNode(this.lp.repeatAddScriptNotice);
                     return false;
                 }
             }
@@ -141,7 +142,7 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder = new Class({
             var data = this.getCurrentData();
 
             if ( data.scriptList.length === 0 ){
-                this.showErrorNode("请先选择脚本");
+                this.showErrorNode(this.lp.selectScriptNotice);
                 return false;
             }
             for( var i=0; i<this.items.length; i++ ){
@@ -150,7 +151,7 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder = new Class({
                     for( var j=0; j< scriptList.length; j++ ){
                         for( var k=0; k< data.scriptList.length; k++ )
                             if( scriptList[j].id === data.scriptList[i].id ){
-                                this.showErrorNode("请不要重复添加脚本");
+                                this.showErrorNode(this.lp.repeatAddScriptNotice);
                                 return false;
                             }
                     }
@@ -229,7 +230,7 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder.Item = new Class({
 
         this.asyncNode = new Element("div", {"styles": {}}).inject(this.contentNode);
         this.asyncNode.set({
-            "text": this.data.async ? "异步加载脚本:" : "同步加载脚本:"
+            "text": this.data.async ? this.lp.scriptIncluder.asyncLoadScript : this.lp.scriptIncluder.syncLoadScript
         });
         this.scriptNode = new Element("div", {
             styles : this.css.scriptNode
@@ -249,7 +250,7 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder.Item = new Class({
     reload: function(data){
         this.data = data;
         this.asyncNode.set({
-            "text": this.data.async ? "异步加载脚本:" : "同步加载脚本:"
+            "text": this.data.async ? this.lp.scriptIncluder.asyncLoadScript : this.lp.scriptIncluder.syncLoadScript
         });
         this.scriptNode.empty();
         this.data.scriptList.each( function (scipt) {
@@ -271,7 +272,7 @@ MWF.xApplication.process.FormDesigner.widget.ScriptIncluder.Item = new Class({
     },
     deleteItem: function(e){
         var _self = this;
-        this.editor.designer.confirm("warn", e, this.lp.validation.delete_title, this.lp.validation.delete_text, 300, 120, function(){
+        this.editor.designer.confirm("warn", e, this.lp.scriptIncluder.delete_title, this.lp.scriptIncluder.delete_text, 300, 120, function(){
             _self.destroy();
             this.close();
         }, function(){