浏览代码

修改O2Identity,增加脚本、数据字典,增加了一些点击事件

unknown 5 年之前
父节点
当前提交
9effa3ab11
共有 2 个文件被更改,包括 48 次插入7 次删除
  1. 4 1
      o2web/source/o2_core/o2/lp/zh-cn.js
  2. 44 6
      o2web/source/o2_core/o2/widget/O2Identity.js

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

@@ -3,7 +3,10 @@ o2.LP = window.LP || {
     "description": "描述",
     "searchKey": "请输入搜索关键字",
     "desktop_style": "桌面风格",
-    "flat_style": "扁平风格"
+    "flat_style": "扁平风格",
+    "cmsName" : "内容管理",
+    "processName" : "流程管理",
+    "portalName" : "门户管理"
 };
 
 o2.LP.process = {

+ 44 - 6
o2web/source/o2_core/o2/widget/O2Identity.js

@@ -457,12 +457,12 @@ o2.widget.O2QueryView = new Class({
         }
     },
     open : function (e) {
-        if( this.data.id ){
+        if( this.data.id && this.data.query ){
             var appId = "query.ViewDesigner" + this.data.id;
             if (layout.desktop.apps[appId]){
                 layout.desktop.apps[appId].setCurrent();
             }else {
-                var options = {"id": this.data.id, "appId": appId};
+                var options = {"id": this.data.id, "application": this.data.query, "appId": appId};
                 layout.desktop.openApplication(e, "query.ViewDesigner", options);
             }
         }
@@ -483,12 +483,12 @@ o2.widget.O2QueryStat = new Class({
         }
     },
     open : function (e) {
-        if( this.data.id ){
+        if( this.data.id && this.data.query){
             var appId = "query.StatDesigner" + this.data.id;
             if (layout.desktop.apps[appId]){
                 layout.desktop.apps[appId].setCurrent();
             }else {
-                var options = {"id": this.data.id, "appId": appId};
+                var options = {"id": this.data.id,"application": this.data.query, "appId": appId};
                 layout.desktop.openApplication(e, "query.StatDesigner", options);
             }
         }
@@ -509,12 +509,12 @@ o2.widget.O2QueryTable = new Class({
         }
     },
     open : function (e) {
-        if( this.data.id ){
+        if( this.data.id && this.data.query){
             var appId = "query.TableDesigner" + this.data.id;
             if (layout.desktop.apps[appId]){
                 layout.desktop.apps[appId].setCurrent();
             }else {
-                var options = {"id": this.data.id, "appId": appId};
+                var options = {"id": this.data.id,"application": this.data.query, "appId": appId};
                 layout.desktop.openApplication(e, "query.TableDesigner", options);
             }
         }
@@ -572,6 +572,25 @@ o2.widget.O2Script = new Class({
     getPersonData: function(){
         return this.data;
     },
+    createInforNode: function(){
+        if( !this.data.appType )return false;
+
+        this.inforNode = new Element("div", {
+            "styles": this.style.identityInforNode
+        });
+        var nameNode = new Element("div", {
+            "text": o2.LP[this.data.appType+"Name"]
+        }).inject(this.inforNode);
+        var nameTextNode = new Element("div", {
+            "text": this.data.applicationName || this.data.appName
+        }).inject(this.inforNode);
+        this.tooltip = new mBox.Tooltip({
+            content: this.inforNode,
+            setStyles: {content: {padding: 15, lineHeight: 20}},
+            attach: this.node,
+            transition: 'flyin'
+        });
+    },
     open : function (e) {
         if( this.data.id && this.data.appId &&  this.data.appType){
             var appName;
@@ -622,6 +641,25 @@ o2.widget.O2Dictionary = new Class({
     getPersonData: function(){
         return this.data;
     },
+    createInforNode: function(){
+        if( !this.data.appType )return false;
+
+        this.inforNode = new Element("div", {
+            "styles": this.style.identityInforNode
+        });
+        var nameNode = new Element("div", {
+            "text": o2.LP[this.data.appType+"Name"]
+        }).inject(this.inforNode);
+        var nameTextNode = new Element("div", {
+            "text": this.data.applicationName || this.data.appName
+        }).inject(this.inforNode);
+        this.tooltip = new mBox.Tooltip({
+            content: this.inforNode,
+            setStyles: {content: {padding: 15, lineHeight: 20}},
+            attach: this.node,
+            transition: 'flyin'
+        });
+    },
     open : function (e) {
         if( this.data.id && this.data.appId && this.data.appType){
             var appName;