| New file |
| | |
| | | /** |
| | | * control基类 |
| | | * @author Wenyb |
| | | * @date 2015/10/30 |
| | | */ |
| | | define([ |
| | | "dojo/_base/declare", |
| | | "dijit/_WidgetBase", |
| | | "dijit/_TemplatedMixin", |
| | | "base/AppEvent", |
| | | "dojo/domReady!" |
| | | ], function ( |
| | | declare, |
| | | _WidgetBase, |
| | | _TemplatedMixin, |
| | | AppEvent |
| | | ){ |
| | | var Widget = declare([_WidgetBase,_TemplatedMixin |
| | | ], |
| | | { |
| | | _config: null, |
| | | _loaded:false, |
| | | cssPathsIndex:{}, |
| | | label:"控件基类", |
| | | id:"", |
| | | /** |
| | | * 挂接的父级control的Id |
| | | */ |
| | | hockId:"", |
| | | /** |
| | | * 挂接的Map控件 |
| | | */ |
| | | map:null, |
| | | constructor:function(options) |
| | | { |
| | | declare.safeMixin(this, options); |
| | | if(this.cssPath&&!this.cssPathsIndex[this.cssPath]) |
| | | { |
| | | dojo.create("link", { |
| | | href: require.toUrl(this.cssPath), |
| | | type: 'text/css', |
| | | rel: 'stylesheet' |
| | | }, |
| | | document.getElementsByTagName('head')[0]); |
| | | this.cssPathsIndex[this.cssPath]=true; |
| | | } |
| | | this._loaded=false; |
| | | }, |
| | | startup:function() |
| | | { |
| | | this._loaded = true; |
| | | }, |
| | | loaded:function() |
| | | { |
| | | return this._loaded; |
| | | }, |
| | | /** |
| | | * 显示控件 |
| | | * @return |
| | | */ |
| | | show:function() |
| | | { |
| | | }, |
| | | /** |
| | | * 隐藏控件 |
| | | * @return boolean |
| | | */ |
| | | hide:function() |
| | | { |
| | | } |
| | | }); |
| | | return Widget; |
| | | }); |