⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkbox-min.js

📁 Ext JS是一个创建丰富互联网应用程序的跨浏览器的JavaScrip库。它包含:高效率
💻 JS
字号:
/*
 * Ext JS Library 3.0 Pre-alpha
 * Copyright(c) 2006-2008, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,defaultAutoCreate:{tag:"input",type:'checkbox',autocomplete:"off"},initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents('check');},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel){this.el.alignTo(this.wrap,'c-c');}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.mon(this.el,'click',this.onClick,this);this.mon(this.el,'change',this.onClick,this);},getResizeEl:function(){return this.wrap;},getPositionEl:function(){return this.wrap;},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(ct,position){Ext.form.Checkbox.superclass.onRender.call(this,ct,position);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue;}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:'label',htmlFor:this.el.id,cls:'x-form-cb-label',html:this.boxLabel});}if(this.checked){this.setValue(true);}else{this.checked=this.el.dom.checked;}},onDestroy:function(){if(this.wrap){this.wrap.remove();}Ext.form.Checkbox.superclass.onDestroy.call(this);},initValue:Ext.emptyFn,getValue:function(){if(this.rendered){return this.el.dom.checked;}return false;},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked);}},setValue:function(v){this.checked=(v===true||v==='true'||v=='1'||String(v).toLowerCase()=='on');if(this.el&&this.el.dom){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked;}this.fireEvent("check",this,this.checked);return this;}});Ext.reg('checkbox',Ext.form.Checkbox);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -