{
Roo.bootstrap.TimeField.superclass.onRender.call(this, ct, position);
-//
-// this.language = this.language || 'en';
-// this.language = this.language in Roo.bootstrap.DateField.dates ? this.language : this.language.split('-')[0];
-// this.language = this.language in Roo.bootstrap.DateField.dates ? this.language : "en";
-//
-// this.isRTL = Roo.bootstrap.DateField.dates[this.language].rtl || false;
-// this.format = this.format || 'm/d/y';
-// this.isInline = false;
-// this.isInput = true;
-// this.component = this.el.select('.add-on', true).first() || false;
-// this.component = (this.component && this.component.length === 0) ? false : this.component;
-// this.hasInput = this.component && this.inputEL().length;
-
-// if (typeof(this.minViewMode === 'string')) {
-// switch (this.minViewMode) {
-// case 'months':
-// this.minViewMode = 2;
-// break;
-// case 'years':
-// this.minViewMode = 3;
-// break;
-// case 'day':
-// this.minViewMode = 1;
-// break;
-// default:
-// this.minViewMode = 0;
-// break;
-// }
-// }
-
-// if (typeof(this.viewMode === 'string')) {
-// switch (this.viewMode) {
-// case 'months':
-// this.viewMode = 2;
-// break;
-// case 'years':
-// this.viewMode = 2;
-// break;
-// case 'day':
-// this.viewMode = 1;
-// break;
-// default:
-// this.viewMode = 0;
-// break;
-// }
-// }
this.el.select('>.input-group', true).first().createChild(Roo.bootstrap.TimeField.template);
this.picker().on('click', this.onClick, this);
this.picker().addClass('datepicker-dropdown');
-
-// this.startViewMode = this.viewMode;
-
-// this.weekEnd = this.weekStart === 0 ? 6 : this.weekStart - 1;
-
-// this.setStartDate(this.startDate);
-// this.setEndDate(this.endDate);
-
-// this.setDaysOfWeekDisabled(this.daysOfWeekDisabled);
-
-// this.fillDow();
-// this.fillMonths();
+
this.fillTime();
this.update();
-// this.showMode();
-
-// if(this.showTime){
-
-// var dayFoot = this.picker().select('>.datepicker-days tfoot th', true).first();
-// var timeFoot = this.picker().select('>.datepicker-time tfoot th', true).first();
-//
-// var dayFootIcon = this.picker().select('>.datepicker-days tfoot span.picker-switch-icon', true).first();
-// var timeFootIcon = this.picker().select('>.datepicker-time tfoot span.picker-switch-icon', true).first();
-//
-// timeFoot.addClass('switch-calendar');
-// dayFoot.addClass('switch-time');
-//
-// timeFootIcon.addClass('switch-calendar');
-// timeFootIcon.addClass('glyphicon-calendar');
-//
-// dayFootIcon.addClass('switch-time');
-// dayFootIcon.addClass('glyphicon-time');
this.pop.select('span.hours-up', true).first().on('click', this.onIncrementHours, this);
this.pop.select('span.hours-down', true).first().on('click', this.onDecrementHours, this);
this.pop.select('span.minutes-down', true).first().on('click', this.onDecrementMinutes, this);
this.pop.select('button', true).first().on('click', this.onTogglePeriod, this);
-// }else{
-// Roo.each(this.picker().select('tfoot th', true).elements, function(v){
-// v.remove();
-// });
-// }
-//
-// if(this.isInline) {
-// this.show();
-// }
},
picker : function()
this.pop.select('button', true).first().dom.innerHTML = period;
},
-//
-// showMode: function(dir) {
-// if (dir) {
-// this.viewMode = Math.max(this.minViewMode, Math.min(3, this.viewMode + dir));
-// }
-//
-// Roo.each(this.picker().select('>div',true).elements, function(v){
-// v.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
-// v.hide();
-// });
-// this.picker().select('>.datepicker-'+Roo.bootstrap.DateField.modes[this.viewMode].clsName, true).first().show();
-//
-// },
place: function()
- {
-// if(this.isInline) return;
-
+ {
this.picker().removeClass(['bottom', 'top']);
if((Roo.lib.Dom.getViewHeight() + Roo.get(document.body).getScroll().top) - (this.inputEl().getBottom() + this.picker().getHeight()) < 0){
this.picker().setTop(this.inputEl().getHeight()).setLeft(this.inputEl().getLeft() - this.el.getLeft());
},
-
-// parseDate : function(value){
-// if(!value || value instanceof Date){
-// return value;
-// }
-// var v = Date.parseDate(value, this.format);
-// if (!v && this.useIso) {
-// v = Date.parseDate(value, 'Y-m-d');
-// }
-// if(!v && this.altFormats){
-// if(!this.altFormatsArray){
-// this.altFormatsArray = this.altFormats.split("|");
-// }
-// for(var i = 0, len = this.altFormatsArray.length; i < len && !v; i++){
-// v = Date.parseDate(value, this.altFormatsArray[i]);
-// }
-// }
-// return v;
-// },
-
-// formatDate : function(date, fmt){
-// return (!date || !(date instanceof Date)) ?
-// date : date.dateFormat(fmt || this.format);
-// },
-
+
onFocus : function()
{
Roo.bootstrap.TimeField.superclass.onFocus.call(this);
e.stopPropagation();
e.preventDefault();
},
-//
-// keyup: function(e){
-// Roo.bootstrap.DateField.superclass.keyup.call(this);
-// this.update();
-//
-// },
-
-// fireKey: function(e){
-// if (!this.picker().isVisible()){
-// if (e.keyCode == 27) // allow escape to hide and re-show picker
-// this.show();
-// return;
-// }
-// var dateChanged = false,
-// dir, day, month,
-// newDate, newViewDate;
-// switch(e.keyCode){
-// case 27: // escape
-// this.hide();
-// e.preventDefault();
-// break;
-// case 37: // left
-// case 39: // right
-// if (!this.keyboardNavigation) break;
-// dir = e.keyCode == 37 ? -1 : 1;
-//
-// if (e.ctrlKey){
-// newDate = this.moveYear(this.date, dir);
-// newViewDate = this.moveYear(this.viewDate, dir);
-// } else if (e.shiftKey){
-// newDate = this.moveMonth(this.date, dir);
-// newViewDate = this.moveMonth(this.viewDate, dir);
-// } else {
-// newDate = new Date(this.date);
-// newDate.setUTCDate(this.date.getUTCDate() + dir);
-// newViewDate = new Date(this.viewDate);
-// newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir);
-// }
-// if (this.dateWithinRange(newDate)){
-// this.date = newDate;
-// this.viewDate = newViewDate;
-// this.setValue(this.formatDate(this.date));
-// this.update();
-// e.preventDefault();
-// dateChanged = true;
-// }
-// break;
-// case 38: // up
-// case 40: // down
-// if (!this.keyboardNavigation) break;
-// dir = e.keyCode == 38 ? -1 : 1;
-// if (e.ctrlKey){
-// newDate = this.moveYear(this.date, dir);
-// newViewDate = this.moveYear(this.viewDate, dir);
-// } else if (e.shiftKey){
-// newDate = this.moveMonth(this.date, dir);
-// newViewDate = this.moveMonth(this.viewDate, dir);
-// } else {
-// newDate = new Date(this.date);
-// newDate.setUTCDate(this.date.getUTCDate() + dir * 7);
-// newViewDate = new Date(this.viewDate);
-// newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir * 7);
-// }
-// if (this.dateWithinRange(newDate)){
-// this.date = newDate;
-// this.viewDate = newViewDate;
-// this.setValue(this.formatDate(this.date));
-// this.update();
-// e.preventDefault();
-// dateChanged = true;
-// }
-// break;
-// case 13: // enter
-// this.setValue(this.formatDate(this.date));
-// this.hide();
-// e.preventDefault();
-// break;
-// case 9: // tab
-// this.setValue(this.formatDate(this.date));
-// this.hide();
-// break;
-// }
-// },
-
-
- onClick: function(e) {
- e.stopPropagation();
- e.preventDefault();
-
- var target = e.getTarget();
-
-// if(target.nodeName.toLowerCase() === 'i'){
-// target = Roo.get(target).dom.parentNode;
-// }
-
- var nodeName = target.nodeName.trim();
- var className = target.className.trim();
- var html = target.innerHTML;
-
- Roo.log('nodeName');
- Roo.log(nodeName);
-
- Roo.log('className');
- Roo.log(className);
-
- Roo.log('html');
- Roo.log(html);
-
-
-// switch(nodeName.toLowerCase()) {
-// case 'th':
-// switch(className) {
-// case 'switch':
-// this.showMode(1);
-// break;
-// case 'prev':
-// case 'next':
-// var dir = Roo.bootstrap.DateField.modes[this.viewMode].navStep * (className == 'prev' ? -1 : 1);
-// switch(this.viewMode){
-// case 0:
-// this.viewDate = this.moveMonth(this.viewDate, dir);
-// break;
-// case 1:
-// case 2:
-// this.viewDate = this.moveYear(this.viewDate, dir);
-// break;
-// }
-// this.fill();
-// break;
-// case 'today':
-// var date = new Date();
-// this.date = this.UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
-// this.fill()
-// this.setValue(this.formatDate(this.date));
-// this.hide();
-// break;
-// case 'switch-time':
-// this.showMode(-1);
-// this.fill();
-// break;
-// case 'switch-calendar':
-// this.showMode(1);
-// this.fill();
-// break;
-// }
-// break;
-// case 'span':
-// if (className.indexOf('disabled') === -1) {
-// this.viewDate.setUTCDate(1);
-// if (className.indexOf('month') !== -1) {
-// this.viewDate.setUTCMonth(Roo.bootstrap.DateField.dates[this.language].monthsShort.indexOf(html));
-// } else if(className.indexOf('picker-switch-icon') !== -1){
-// if(className.indexOf('switch-time') !== -1){
-// this.showMode(-1);
-// this.fill();
-// }else{
-// this.showMode(1);
-// this.fill();
-// }
-//
-// break;
-//
-// } else {
-// var year = parseInt(html, 10) || 0;
-// this.viewDate.setUTCFullYear(year);
-//
-// }
-// this.showMode(-1);
-// this.fill();
-// }
-// break;
-//
-// case 'td':
-// if (className.indexOf('day') !== -1 && className.indexOf('disabled') === -1){
-// var day = parseInt(html, 10) || 1;
-// var year = this.viewDate.getUTCFullYear(),
-// month = this.viewDate.getUTCMonth();
-//
-// if (className.indexOf('old') !== -1) {
-// if(month === 0 ){
-// month = 11;
-// year -= 1;
-// }else{
-// month -= 1;
-// }
-// } else if (className.indexOf('new') !== -1) {
-// if (month == 11) {
-// month = 0;
-// year += 1;
-// } else {
-// month += 1;
-// }
-// }
-// this.date = this.UTCDate(year, month, day,0,0,0,0);
-// this.viewDate = this.UTCDate(year, month, Math.min(28, day),0,0,0,0);
-// this.fill();
-// this.setValue(this.formatDate(this.date));
-// this.hide();
-// }
-// break;
-// }
- },
-
-// setStartDate: function(startDate){
-// this.startDate = startDate || -Infinity;
-// if (this.startDate !== -Infinity) {
-// this.startDate = this.parseDate(this.startDate);
-// }
-// this.update();
-// this.updateNavArrows();
-// },
-//
-// setEndDate: function(endDate){
-// this.endDate = endDate || Infinity;
-// if (this.endDate !== Infinity) {
-// this.endDate = this.parseDate(this.endDate);
-// }
-// this.update();
-// this.updateNavArrows();
-// },
-//
-// setDaysOfWeekDisabled: function(daysOfWeekDisabled){
-// this.daysOfWeekDisabled = daysOfWeekDisabled || [];
-// if (typeof(this.daysOfWeekDisabled) !== 'object') {
-// this.daysOfWeekDisabled = this.daysOfWeekDisabled.split(/,\s*/);
-// }
-// this.daysOfWeekDisabled = this.daysOfWeekDisabled.map(function (d) {
-// return parseInt(d, 10);
-// });
-// this.update();
-// this.updateNavArrows();
-// },
-//
-// updateNavArrows: function() {
-// var d = new Date(this.viewDate),
-// year = d.getUTCFullYear(),
-// month = d.getUTCMonth();
-//
-// Roo.each(this.picker().select('.prev', true).elements, function(v){
-// v.show();
-// switch (this.viewMode) {
-// case 0:
-//
-// if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear() && month <= this.startDate.getUTCMonth()) {
-// v.hide();
-// }
-// break;
-// case 1:
-// case 2:
-// if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear()) {
-// v.hide();
-// }
-// break;
-// }
-// });
-//
-// Roo.each(this.picker().select('.next', true).elements, function(v){
-// v.show();
-// switch (this.viewMode) {
-// case 0:
-//
-// if (this.endDate !== Infinity && year >= this.endDate.getUTCFullYear() && month >= this.endDate.getUTCMonth()) {
-// v.hide();
-// }
-// break;
-// case 1:
-// case 2:
-// if (this.endDate !== Infinity && year >= this.endDate.getUTCFullYear()) {
-// v.hide();
-// }
-// break;
-// }
-// })
-// },
-//
-// moveMonth: function(date, dir){
-// if (!dir) return date;
-// var new_date = new Date(date.valueOf()),
-// day = new_date.getUTCDate(),
-// month = new_date.getUTCMonth(),
-// mag = Math.abs(dir),
-// new_month, test;
-// dir = dir > 0 ? 1 : -1;
-// if (mag == 1){
-// test = dir == -1
-// // If going back one month, make sure month is not current month
-// // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02)
-// ? function(){
-// return new_date.getUTCMonth() == month;
-// }
-// // If going forward one month, make sure month is as expected
-// // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02)
-// : function(){
-// return new_date.getUTCMonth() != new_month;
-// };
-// new_month = month + dir;
-// new_date.setUTCMonth(new_month);
-// // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11
-// if (new_month < 0 || new_month > 11)
-// new_month = (new_month + 12) % 12;
-// } else {
-// // For magnitudes >1, move one month at a time...
-// for (var i=0; i<mag; i++)
-// // ...which might decrease the day (eg, Jan 31 to Feb 28, etc)...
-// new_date = this.moveMonth(new_date, dir);
-// // ...then reset the day, keeping it in the new month
-// new_month = new_date.getUTCMonth();
-// new_date.setUTCDate(day);
-// test = function(){
-// return new_month != new_date.getUTCMonth();
-// };
-// }
-// // Common date-resetting loop -- if date is beyond end of month, make it
-// // end of month
-// while (test()){
-// new_date.setUTCDate(--day);
-// new_date.setUTCMonth(new_month);
-// }
-// return new_date;
-// },
-//
-// moveYear: function(date, dir){
-// return this.moveMonth(date, dir*12);
-// },
-//
-// dateWithinRange: function(date){
-// return date >= this.startDate && date <= this.endDate;
-// },
-
-// remove: function() {
-// this.picker().remove();
-// },
onIncrementHours: function()
{
//Roo/bootstrap/TimeField.js
Roo.bootstrap.TimeField=function(A){Roo.bootstrap.TimeField.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.TimeField,Roo.bootstrap.Input,{format:"H:i",UTCDate:function(){return new Date(Date.UTC.apply(Date,arguments));},UTCTime:function(){return new Date(Date.UTC.apply(Date,arguments));},UTCToday:function(){var A=new Date();return this.UTCDate(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate());},UTCTodayTime:function(){var A=new Date();return this.UTCTime(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate(),A.getUTCHours(),A.getUTCMinutes());},getDate:function(){var d=this.getUTCDate();return new Date(d.getTime()+(d.getTimezoneOffset()*60000));},getUTCDate:function(){return this.date;},setDate:function(d){this.setUTCDate(new Date(d.getTime()-(d.getTimezoneOffset()*60000)));},setUTCDate:function(d){this.date=d;this.setValue(this.formatDate(this.date));},onRender:function(ct,A){Roo.bootstrap.TimeField.superclass.onRender.call(this,ct,A);this.el.select('>.input-group',true).first().createChild(Roo.bootstrap.TimeField.template);this.picker().setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.pop=this.picker().select('>.datepicker-time',true).first();this.pop.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block'this.picker().on('mousedown',this.onMousedown,this);this.picker().on('click',this.onClick,this);this.picker().addClass('datepicker-dropdown');this.fillTime();this.update();this.pop.select('span.hours-up',true).first().on('click',this.onIncrementHours,this);this.pop.select('span.hours-down',true).first().on('click',this.onDecrementHours,this);this.pop.select('span.minutes-up',true).first().on('click',this.onIncrementMinutes,this);this.pop.select('span.minutes-down',true).first().on('click',this.onDecrementMinutes,this);this.pop.select('button',true).first().on('click',this.onTogglePeriod,this);},picker:function(){return this.el.select('.datepicker',true).first();},fillTime:function(){var A=this.pop.select('tbody',true).first();A.dom.innerHTML='';A.createChild({tag:'tr',cn:[{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'hours-up glyphicon glyphicon-chevron-up'}]}]},{tag:'td',cls:'separator'},{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'minutes-up glyphicon glyphicon-chevron-up'}]}]},{tag:'td',cls:'separator'}]});A.createChild({tag:'tr',cn:[{tag:'td',cn:[{tag:'span',cls:'timepicker-hour',html:'00'}]},{tag:'td',cls:'separator',html:':'},{tag:'td',cn:[{tag:'span',cls:'timepicker-minute',html:'00'}]},{tag:'td',cls:'separator'},{tag:'td',cn:[{tag:'button',type:'button',cls:'btn btn-primary',html:'AM'}]}]});A.createChild({tag:'tr',cn:[{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'hours-down glyphicon glyphicon-chevron-down'}]}]},{tag:'td',cls:'separator'},{tag:'td',cn:[{tag:'a',href:'#',cls:'btn',cn:[{tag:'span',cls:'minutes-down glyphicon glyphicon-chevron-down'}]}]},{tag:'td',cls:'separator'}]});},update:function(){this.time=(typeof(this.time)==='undefined')?new Date():this.time;this.fill();},fill:function(){var A=this.time.getHours();var B=this.time.getMinutes();var C='AM';if(A>11){C='PM';}if(A==0){A=12;}if(A>12){A=A-12;}if(A<10){A='0'+A;}if(B<10){B='0'+B;}
this.pop.select('.timepicker-hour',true).first().dom.innerHTML=A;this.pop.select('.timepicker-minute',true).first().dom.innerHTML=B;this.pop.select('button',true).first().dom.innerHTML=C;},place:function(){this.picker().removeClass(['bottom','top']);if((Roo.lib.Dom.getViewHeight()+Roo.get(document.body).getScroll().top)-(this.inputEl().getBottom()+this.picker().getHeight())<0){this.picker().addClass('top');this.picker().setTop(0-this.picker().getHeight()).setLeft(this.inputEl().getLeft()-this.el.getLeft());return;}
-this.picker().addClass('bottom');this.picker().setTop(this.inputEl().getHeight()).setLeft(this.inputEl().getLeft()-this.el.getLeft());},onFocus:function(){Roo.bootstrap.TimeField.superclass.onFocus.call(this);this.show();},onBlur:function(){Roo.bootstrap.TimeField.superclass.onBlur.call(this);this.hide();},show:function(){this.picker().show();this.pop.show();this.update();this.place();},hide:function(){this.picker().hide();this.pop.hide();this.setValue(this.time.format(this.format));},onMousedown:function(e){e.stopPropagation();e.preventDefault();},onClick:function(e){e.stopPropagation();e.preventDefault();var A=e.getTarget();var B=A.nodeName.trim();var C=A.className.trim();var D=A.innerHTML;Roo.log('nodeName');Roo.log(B);Roo.log('className');Roo.log(C);Roo.log('html');Roo.log(D);},onIncrementHours:function(){Roo.log('onIncrementHours');this.time=this.time.add(Date.HOUR,1);this.update();},onDecrementHours:function(){Roo.log('onDecrementHours');this.time=this.time.add(Date.HOUR,-1);this.update();},onIncrementMinutes:function(){Roo.log('onIncrementMinutes');this.time=this.time.add(Date.MINUTE,1);this.update();},onDecrementMinutes:function(){Roo.log('onDecrementMinutes');this.time=this.time.add(Date.MINUTE,-1);this.update();},onTogglePeriod:function(){Roo.log('onTogglePeriod');this.time=this.time.add(Date.HOUR,12);this.update();}});Roo.apply(Roo.bootstrap.TimeField,{content:{tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:'7'}]}]}});Roo.apply(Roo.bootstrap.TimeField,{template:{tag:'div',cls:'datepicker dropdown-menu',cn:[{tag:'div',cls:'datepicker-time',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.DateField.content]}]}]}});
+this.picker().addClass('bottom');this.picker().setTop(this.inputEl().getHeight()).setLeft(this.inputEl().getLeft()-this.el.getLeft());},onFocus:function(){Roo.bootstrap.TimeField.superclass.onFocus.call(this);this.show();},onBlur:function(){Roo.bootstrap.TimeField.superclass.onBlur.call(this);this.hide();},show:function(){this.picker().show();this.pop.show();this.update();this.place();},hide:function(){this.picker().hide();this.pop.hide();this.setValue(this.time.format(this.format));},onMousedown:function(e){e.stopPropagation();e.preventDefault();},onIncrementHours:function(){Roo.log('onIncrementHours');this.time=this.time.add(Date.HOUR,1);this.update();},onDecrementHours:function(){Roo.log('onDecrementHours');this.time=this.time.add(Date.HOUR,-1);this.update();},onIncrementMinutes:function(){Roo.log('onIncrementMinutes');this.time=this.time.add(Date.MINUTE,1);this.update();},onDecrementMinutes:function(){Roo.log('onDecrementMinutes');this.time=this.time.add(Date.MINUTE,-1);this.update();},onTogglePeriod:function(){Roo.log('onTogglePeriod');this.time=this.time.add(Date.HOUR,12);this.update();}});Roo.apply(Roo.bootstrap.TimeField,{content:{tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:'7'}]}]}});Roo.apply(Roo.bootstrap.TimeField,{template:{tag:'div',cls:'datepicker dropdown-menu',cn:[{tag:'div',cls:'datepicker-time',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.DateField.content]}]}]}});
//Roo/bootstrap/CheckBox.js
Roo.bootstrap.CheckBox=function(A){Roo.bootstrap.CheckBox.superclass.constructor.call(this,A);this.addEvents({check:true});};Roo.extend(Roo.bootstrap.CheckBox,Roo.bootstrap.Input,{inputType:'checkbox',value:1,valueOff:0,boxLabel:false,checked:false,getAutoCreate:function(){var A=(!this.labelAlign)?this.parentLabelAlign():this.labelAlign;var id=Roo.id();var B={};B.cls='form-group'var C={tag:'input',id:id,type:this.inputType,value:(!this.checked)?this.valueOff:this.value,cls:'form-box',placeholder:this.placeholder||''};if(this.disabled){C.disabled=true;}if(this.checked){C.checked=this.checked;}if(this.name){C.name=this.name;}if(this.size){C.cls+=' input-'+this.size;}var D=this;['xs','sm','md','lg'].map(function(F){if(D[F]){B.cls+=' col-'+F+'-'+D[F];}});var E=C;if(this.before||this.after){E={cls:'input-group',cn:[]};if(this.before){E.cn.push({tag:'span',cls:'input-group-addon',html:this.before});}
E.cn.push(C);if(this.after){E.cn.push({tag:'span',cls:'input-group-addon',html:this.after});}};if(A==='left'&&this.fieldLabel.length){Roo.log("left and has label");B.cn=[{tag:'label','for':id,cls:'control-label col-md-'+this.labelWidth,html:this.fieldLabel},{cls:"col-md-"+(12-this.labelWidth),cn:[E]}];}else if(this.fieldLabel.length){Roo.log(" label");B.cn=[{tag:'label','for':id,cls:'control-label box-input-label',html:this.fieldLabel},E];}else {Roo.log(" no label && no align");B.cn=[E];};if(this.boxLabel){B.cn.push({tag:'span','for':id,cls:'box-label',html:this.boxLabel})}return B;},inputEl:function(){return this.el.select('input.form-box',true).first();},initEvents:function(){Roo.bootstrap.CheckBox.superclass.initEvents.call(this);this.inputEl().on('click',this.onClick,this);},onClick:function(){this.setChecked(!this.checked);},setChecked:function(A,B){this.checked=A;if(B!==true){this.fireEvent('check',this,A);}