Explorar o código

视图上下文修改

unknown %!s(int64=5) %!d(string=hai) anos
pai
achega
966404e5db

+ 4 - 11
o2web/source/o2_core/o2/xScript/ViewEnvironment.js

@@ -755,12 +755,13 @@ MWF.xScript.ViewEnvironment = function (ev) {
         "toPage" : function ( pageNumber, callback ) { return _form.toPage(pageNumber, callback); },
         "selectAll" : function () { return _form.selectAll(); },
         "unSelectAll" : function () { return _form.unSelectAll(); },
+        "getSelectedData" : function () { return _form.getSelectedData(); },
         "switchView" : function ( options ) { return _form.switchView(options); },
 
         // "getInfor": function () { return ev.pageInfor; },
         // "infor": ev.pageInfor,
-        "getApp": function () { return _form.app; },
-        "app": _form.app,
+        // "getApp": function () { return _form.app; },
+        // "app": _form.app,
         "node": function () { return _form.node; },
         // "get": function (name) { return (_form.all) ? _form.all[name] : null; },
         // "getWidgetModule": function (widget, moduleName) {
@@ -1057,15 +1058,7 @@ MWF.xScript.ViewEnvironment = function (ev) {
                     }.bind(this));
                 }
             });
-        },
-        "parameters": _form.options.parameters,
-        "getWidgetPrameters": function () {
-            if (!this.target) return null;
-            if (!this.target.widget) return null;
-            if (!this.widgetParameters) return null;
-            var pageId = this.target.widget.json.id;
-            return this.widgetParameters[pageId];
-        }.bind(this)
+        }
         //"app": _form.app
     };
     // this.form.currentRouteName = _form.json.currentRouteName;

+ 4 - 1
o2web/source/x_component_query_Query/Viewer.js

@@ -683,7 +683,7 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({
             "mouseout": function(){node.setStyles(this.css[out])}.bind(this),
             "mousedown": function(){node.setStyles(this.css[down])}.bind(this),
             "mouseup": function(){node.setStyles(this.css[out])}.bind(this),
-            "click": click,
+            "click": click
         });
     },
     _loadPageNode: function(){
@@ -1044,6 +1044,9 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({
         }
         return (filterData.length) ? filterData : null;
     },
+    getSelectedData : function(){
+        return this.getData();
+    },
     getData: function(){
         if (this.selectedItems.length){
             var arr = [];