Procházet zdrojové kódy

设计搜索功能

huqi před 5 roky
rodič
revize
cfcbe289db

+ 97 - 0
o2web/source/o2_core/o2/widget/$Toolbar/findDesigner/css.wcss

@@ -0,0 +1,97 @@
+{
+	"container": {
+		"border": "0px",
+		"word-wrap" : "normal",
+		"word-break" : "keep-all",
+		"cursor": "pointer",
+		"overflow": "hidden",
+		"height": "24px",
+		"display":"block",
+		"font-size": "12px"
+	},
+	"toolbarSeparator": {
+		"display":"block",
+		"float": "left",
+		"margin-bottom": "2px",
+		"margin-top": "2px",
+		"height": "20px",
+		"width": "1px",
+		"background-color": "#888888",
+		"border-right": "1px solid #FFFFFF",
+		"overflow": "hidden"
+	},
+
+	"button": {
+		"display":"block",
+		"position": "static",
+		"float": "left",
+		"border": "1px solid transparent",
+		"background": "transparent",
+		"height": "20px",
+		"margin-right": "5px",
+		"padding-left": "2px",
+		"padding-right": "2px",
+		"cursor": "pointer"
+	},
+	"buttonImgDiv": {
+		"display":"block",
+		"float": "left",
+		"padding-top": "1px",
+		"padding-bottom": "1px",
+		"padding-left": "1px",
+		"padding-right": "1px",
+		"cursor": "pointer"
+	},
+	"buttonImg": {
+		"height": "16px",
+		"width": "16px",
+		"cursor": "pointer",
+		"margin-top": "0px"
+	},
+	"buttonTextDiv": {
+		"display":"block",
+		"float": "left",
+		"height": "20px",
+		"padding-left": "2px",
+		"padding-right": "2px",
+		"line-height": "20px",
+		"cursor": "pointer"
+	},
+
+	"buttonDisable": {
+		"color": "#999"
+	},
+	"buttonImgDivDisable": {
+		"color": "#999"
+	},
+	"buttonTextDivDisable": {
+		"color": "#999"
+	},
+
+	"buttonOver": {
+		"border": "1px solid #000000",
+		"background": "#b5bed6"
+	},
+	"buttonOut": {
+		"border": "1px solid transparent",
+		"background": "transparent"
+	},
+	"buttonDown": {
+		"border": "1px solid #000000",
+		"background": "#8492b5"
+	},
+	"buttonUp": {
+		"border": "1px solid #000000",
+		"background": "#b5bed6"
+	},
+	"toolbarButtonDownNode": {
+		"display":"block",
+		"float": "left",
+		"padding-left": "2px",
+		"padding-right": "2px",
+		"padding-top": "0px",
+		"height": "18px",
+		"color": "#ff0000",
+		"cursor": "pointer"
+	}
+}

binární
o2web/source/o2_core/o2/widget/$Toolbar/findDesigner/downicon.gif


binární
o2web/source/o2_core/o2/widget/$Toolbar/findDesigner/separatorbg.gif


binární
o2web/source/o2_core/o2/widget/$Toolbar/findDesigner/submenu.png


binární
o2web/source/x_component_FindDesigner/$Main/default/icons/open.png


binární
o2web/source/x_component_FindDesigner/$Main/default/icons/open_gray.png


binární
o2web/source/x_component_FindDesigner/$Main/default/icons/save.png


binární
o2web/source/x_component_FindDesigner/$Main/default/icons/save_gray.png


+ 12 - 1
o2web/source/x_component_FindDesigner/$Main/default/style.css

@@ -255,8 +255,9 @@
     overflow: auto;
 }
 .previewNode_title_icon {
+    background: transparent;
     height: 20px;
-    width: 24px;
+    width: 80px;
     background-position: center center;
     background-repeat: no-repeat;
     float: left;
@@ -279,6 +280,16 @@
     background-image: url("../x_component_FindDesigner/$Main/default/icons/dockBottom.png");
     cursor: pointer;
 }
+.previewNode_title_action_l {
+    float:  left;
+    height: 20px;
+    width: 24px;
+    background-position: center center;
+    background-repeat: no-repeat;
+    background-image: url("../x_component_FindDesigner/$Main/default/icons/dockBottom.png");
+    cursor: pointer;
+}
+
 .previewNode_title_content {
     height: 20px;
     line-height: 20px;

+ 4 - 1
o2web/source/x_component_FindDesigner/$Main/default/view.html

@@ -71,7 +71,10 @@
         <div class="previewNode_lr" data-o2-element="previewNode">
             <div class="previewNode_separator_lr" data-o2-element="previewSeparatorNode"></div>
             <div class="previewNode_title_lr" data-o2-element="previewTitleNode">
-                <div class="previewNode_title_icon"></div>
+                <div class="previewNode_title_icon" data-o2-element="previewTitleToolbar">
+                    <span MWFnodetype="MWFToolBarButton" title="{{$.lp.saveDesigner}}" MWFButtonImage="../x_component_FindDesigner/$Main/default/icons/save.png" MWFButtonAction="saveDesigner" MWFButtonText=""></span>
+                    <span MWFnodetype="MWFToolBarButton" title="{{$.lp.openDesigner}}" MWFButtonImage="../x_component_FindDesigner/$Main/default/icons/open.png"  MWFButtonAction="openDesinger" MWFButtonText=""></span>
+                </div>
                 <div class="previewNode_title_action_lr" data-o2-element="previewTitleActionNode" title="{{$.lp.dockToBottom}}" data-o2-events="click:changeLayout"></div>
                 <div class="previewNode_title_content"></div>
             </div>

+ 5 - 5
o2web/source/x_component_FindDesigner/FindWorker.js

@@ -818,11 +818,11 @@ _worker._findProcessPlatformParse_process = function(designer, option, module){
 
 
 
-                elementId: "7ce87b0e-7fa8-4bea-bc4b-bbf816f584e7"
-                elementName: "开始"
-                elementType: "activity"
-                property: "validationScriptText"
-                propertyValue: "路由校验"
+                // elementId: "7ce87b0e-7fa8-4bea-bc4b-bbf816f584e7"
+                // elementName: "开始"
+                // elementType: "activity"
+                // property: "validationScriptText"
+                // propertyValue: "路由校验"
 
 
 

+ 14 - 2
o2web/source/x_component_FindDesigner/Main.js

@@ -38,10 +38,19 @@ MWF.xApplication.FindDesigner.Main = new Class({
 		var url = this.path+this.options.style+"/view.html";
 		this.content.loadHtml(url, {"bind": {"lp": this.lp}, "module": this}, function(){
 			this.setSizeNode();
-
+			this.createToolbar();
 			if (callback) callback();
 		}.bind(this));
 	},
+	createToolbar: function(){
+		o2.require("o2.widget.Toolbar", function(){
+			this.previewToolbar = new o2.widget.Toolbar(this.previewTitleToolbar, {"style": "findDesigner"}, this);
+			this.previewToolbar.load();
+			this.previewToolbar.childrenButton[0].disable();
+			this.previewToolbar.childrenButton[1].disable();
+		}.bind(this));
+
+	},
 	initLayout: function(){
 		this.listNode.set("style", "");
 		this.previewNode.set("style", "");
@@ -596,12 +605,15 @@ debugger;
 	},
 	openProcessPlatformPatternScript: function(data, pattern){
 		o2.require("o2.widget.JavascriptEditor", function(){
-
 			this.editor = new o2.widget.JavascriptEditor(this.previewContentNode, {
 				"option": {"value": data.text}
 			});
 			this.editor.pattern = pattern;
 			this.editor.load(function(){
+				if (this.previewToolbar){
+					this.previewToolbar.childrenButton[0].enable();
+					this.previewToolbar.childrenButton[1].enable();
+				}
 				this.reLocationEditor(pattern);
 			}.bind(this));
 		}.bind(this));

+ 4 - 1
o2web/source/x_component_FindDesigner/lp/zh-cn.js

@@ -38,5 +38,8 @@ MWF.xApplication.FindDesigner.LP = {
 	"readyToFind": "设计元素准备完毕(共{n}个) ...",
 	"findPatternCount": "已找到{n}项匹配",
 
-	"elementPattern": "<b>元素:</b> {element}, <b>属性:</b> {property}: "
+	"elementPattern": "<b>元素:</b> {element}, <b>属性:</b> {property}: ",
+
+	"saveDesigner": "保存设计元素",
+	"openDesigner": "打开应用"
 };