//>>built define("dojox/grid/cells/_base",["dojo/_base/kernel","dojo/_base/declare","dojo/_base/lang","dojo/_base/event","dojo/_base/connect","dojo/_base/array","dojo/_base/sniff","dojo/dom","dojo/dom-attr","dojo/dom-construct","dijit/_Widget","../util"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c){ var _d=_2("dojox.grid._DeferredTextWidget",_b,{deferred:null,_destroyOnRemove:true,postCreate:function(){ if(this.deferred){ this.deferred.addBoth(_3.hitch(this,function(_e){ if(this.domNode){ this.domNode.innerHTML=_e; } })); } }}); var _f=function(_10){ try{ _c.fire(_10,"focus"); _c.fire(_10,"select"); } catch(e){ } }; var _11=function(){ setTimeout(_3.hitch.apply(_1,arguments),0); }; var _12=_2("dojox.grid.cells._Base",null,{styles:"",classes:"",editable:false,alwaysEditing:false,formatter:null,defaultValue:"...",value:null,hidden:false,noresize:false,draggable:true,_valueProp:"value",_formatPending:false,constructor:function(_13){ this._props=_13||{}; _3.mixin(this,_13); if(this.draggable===undefined){ this.draggable=true; } },_defaultFormat:function(_14,_15){ var s=this.grid.formatterScope||this; var f=this.formatter; if(f&&s&&typeof f=="string"){ f=this.formatter=s[f]; } var v=(_14!=this.defaultValue&&f)?f.apply(s,_15):_14; if(typeof v=="undefined"){ return this.defaultValue; } if(v&&v.addBoth){ v=new _d({deferred:v},_a.create("span",{innerHTML:this.defaultValue})); } if(v&&v.declaredClass&&v.startup){ return "
"+this.defaultValue+"
"; } return v; },format:function(_16,_17){ var f,i=this.grid.edit.info,d=this.get?this.get(_16,_17):(this.value||this.defaultValue); d=(d&&d.replace&&this.grid.escapeHTMLInData)?d.replace(/&/g,"&").replace(/"; },formatNode:function(_44,_45,_46){ this.inherited(arguments); this.registerOnBlur(_44,_46); },doKey:function(e){ if(this.keyFilter){ var key=String.fromCharCode(e.charCode); if(key.search(this.keyFilter)==-1){ _4.stop(e); } } },_finish:function(_47){ this.inherited(arguments); var n=this.getEditNode(_47); try{ _c.fire(n,"blur"); } catch(e){ } }}); _41.markupFactory=function(_48,_49){ _12.markupFactory(_48,_49); var _4a=_3.trim(_9.get(_48,"keyFilter")||""); if(_4a){ _49.keyFilter=new RegExp(_4a); } }; var _4b=_2("dojox.grid.cells.RowIndex",_41,{name:"Row",postscript:function(){ this.editable=false; },get:function(_4c){ return _4c+1; }}); _4b.markupFactory=function(_4d,_4e){ _41.markupFactory(_4d,_4e); }; var _4f=_2("dojox.grid.cells.Select",_41,{options:null,values:null,returnIndex:-1,constructor:function(_50){ this.values=this.values||this.options; },formatEditing:function(_51,_52){ this.needFormatNode(_51,_52); var h=[""); return h.join(""); },_defaultFormat:function(_53,_54){ var v=this.inherited(arguments); if(!this.formatter&&this.values&&this.options){ var i=_6.indexOf(this.values,v); if(i>=0){ v=this.options[i]; } } return v; },getValue:function(_55){ var n=this.getEditNode(_55); if(n){ var i=n.selectedIndex,o=n.options[i]; return this.returnIndex>-1?i:o.value||o.innerHTML; } }}); _4f.markupFactory=function(_56,_57){ _41.markupFactory(_56,_57); var _58=_3.trim(_9.get(_56,"options")||""); if(_58){ var o=_58.split(","); if(o[0]!=_58){ _57.options=o; } } var _59=_3.trim(_9.get(_56,"values")||""); if(_59){ var v=_59.split(","); if(v[0]!=_59){ _57.values=v; } } }; var _5a=_2("dojox.grid.cells.AlwaysEdit",_41,{alwaysEditing:true,_formatNode:function(_5b,_5c){ this.formatNode(this.getEditNode(_5c),_5b,_5c); },applyStaticValue:function(_5d){ var e=this.grid.edit; e.applyCellEdit(this.getValue(_5d),this,_5d); e.start(this,_5d,true); }}); _5a.markupFactory=function(_5e,_5f){ _41.markupFactory(_5e,_5f); }; var _60=_2("dojox.grid.cells.Bool",_5a,{_valueProp:"checked",formatEditing:function(_61,_62){ return ""; },doclick:function(e){ if(e.target.tagName=="INPUT"){ this.applyStaticValue(e.rowIndex); } }}); _60.markupFactory=function(_63,_64){ _5a.markupFactory(_63,_64); }; return _12; });