123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- if(!dojo._hasResource["dojox.grid.enhanced._Plugin"]){
- dojo._hasResource["dojox.grid.enhanced._Plugin"] = true;
- dojo.provide("dojox.grid.enhanced._Plugin");
- dojo.require("dojox.grid.EnhancedGrid");
- dojo.declare("dojox.grid.enhanced._Plugin", null, {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- name: 'plugin',
-
-
-
- grid: null,
-
-
-
- option: {},
-
-
- _connects: [],
-
-
-
- _subscribes: [],
-
-
- privates: {},
-
- constructor: function(inGrid, option){
- this.grid = inGrid;
- this.option = option;
- this._connects = [];
- this._subscribes = [];
- this.privates = dojo.mixin({},dojox.grid.enhanced._Plugin.prototype);
- this.init();
- },
-
- init: function(){},
-
- onPreInit: function(){},
-
- onPostInit: function(){},
-
- onStartUp: function(){},
-
- connect: function(obj, event, method){
-
-
-
-
-
-
-
-
- var conn = dojo.connect(obj, event, this, method);
- this._connects.push(conn);
- return conn;
- },
- disconnect: function(handle){
-
-
- dojo.some(this._connects, function(conn, i, conns){
- if(conn == handle){
- dojo.disconnect(handle);
- conns.splice(i, 1);
- return true;
- }
- return false;
- });
- },
- subscribe: function(topic, method){
-
-
-
-
-
-
-
-
-
-
- var subscribe = dojo.subscribe(topic, this, method);
- this._subscribes.push(subscribe);
- return subscribe;
- },
- unsubscribe: function(handle){
-
-
- dojo.some(this._subscribes, function(subscribe, i, subscribes){
- if(subscribe == handle){
- dojo.unsubscribe(handle);
- subscribes.splice(i, 1);
- return true;
- }
- return false;
- });
- },
- onSetStore: function(store){
-
-
- },
- destroy: function(){
-
-
- dojo.forEach(this._connects, dojo.disconnect);
- dojo.forEach(this._subscribes, dojo.unsubscribe);
- delete this._connects;
- delete this._subscribes;
- delete this.option;
- delete this.privates;
-
- }
- });
- }
|