*/
/**
- * @class Roo.bootstrap.CheckBox
- * @extends Roo.bootstrap.Input
+ * @class Roo.bootstrap.form.CheckBox
+ * @extends Roo.bootstrap.form.Input
* Bootstrap CheckBox class
*
* @cfg {String} valueOff The value that should go into the generated input element's value when unchecked.
* @param {Object} config The config object
*/
-Roo.bootstrap.CheckBox = function(config){
- Roo.bootstrap.CheckBox.superclass.constructor.call(this, config);
+Roo.bootstrap.form.CheckBox = function(config){
+ Roo.bootstrap.form.CheckBox.superclass.constructor.call(this, config);
this.addEvents({
/**
* @event check
* Fires when the element is checked or unchecked.
- * @param {Roo.bootstrap.CheckBox} this This input
+ * @param {Roo.bootstrap.form.CheckBox} this This input
* @param {Boolean} checked The new checked value
*/
check : true,
/**
* @event click
* Fires when the element is click.
- * @param {Roo.bootstrap.CheckBox} this This input
+ * @param {Roo.bootstrap.form.CheckBox} this This input
*/
click : true
});
};
-Roo.extend(Roo.bootstrap.CheckBox, Roo.bootstrap.Input, {
+Roo.extend(Roo.bootstrap.form.CheckBox, Roo.bootstrap.form.Input, {
inputType: 'checkbox',
inputValue: 1,
initEvents : function()
{
-// Roo.bootstrap.CheckBox.superclass.initEvents.call(this);
+// Roo.bootstrap.form.CheckBox.superclass.initEvents.call(this);
this.inputEl().on('click', this.onClick, this);
this.startValue = this.getValue();
if(this.groupId){
- Roo.bootstrap.CheckBox.register(this);
+ Roo.bootstrap.form.CheckBox.register(this);
}
},
//return (this.getValue() == this.inputValue) ? true : false;
}
- var group = Roo.bootstrap.CheckBox.get(this.groupId);
+ var group = Roo.bootstrap.form.CheckBox.get(this.groupId);
if(!group){
return false;
this.fireEvent('valid', this);
- var label = Roo.bootstrap.FieldLabel.get(this.name + '-group');
+ var label = Roo.bootstrap.form.FieldLabel.get(this.name + '-group');
if(this.groupId){
- label = Roo.bootstrap.FieldLabel.get(this.groupId + '-group');
+ label = Roo.bootstrap.form.FieldLabel.get(this.groupId + '-group');
}
if(label){
return;
}
- var group = Roo.bootstrap.CheckBox.get(this.groupId);
+ var group = Roo.bootstrap.form.CheckBox.get(this.groupId);
if(!group){
return;
this.fireEvent('invalid', this, msg);
- var label = Roo.bootstrap.FieldLabel.get(this.name + '-group');
+ var label = Roo.bootstrap.form.FieldLabel.get(this.name + '-group');
if(this.groupId){
- label = Roo.bootstrap.FieldLabel.get(this.groupId + '-group');
+ label = Roo.bootstrap.form.FieldLabel.get(this.groupId + '-group');
}
if(label){
return;
}
- var group = Roo.bootstrap.CheckBox.get(this.groupId);
+ var group = Roo.bootstrap.form.CheckBox.get(this.groupId);
if(!group){
return;
clearInvalid : function()
{
- Roo.bootstrap.Input.prototype.clearInvalid.call(this);
+ Roo.bootstrap.form.Input.prototype.clearInvalid.call(this);
// this.el.findParent('.form-group', false, true).removeClass([this.invalidClass, this.validClass]);
- var label = Roo.bootstrap.FieldLabel.get(this.name + '-group');
+ var label = Roo.bootstrap.form.FieldLabel.get(this.name + '-group');
if (label && label.iconEl) {
label.iconEl.removeClass([ label.validClass, label.invalidClass ]);
disable : function()
{
if(this.inputType != 'radio'){
- Roo.bootstrap.CheckBox.superclass.disable.call(this);
+ Roo.bootstrap.form.CheckBox.superclass.disable.call(this);
return;
}
enable : function()
{
if(this.inputType != 'radio'){
- Roo.bootstrap.CheckBox.superclass.enable.call(this);
+ Roo.bootstrap.form.CheckBox.superclass.enable.call(this);
return;
}
});
-Roo.apply(Roo.bootstrap.CheckBox, {
+Roo.apply(Roo.bootstrap.form.CheckBox, {
groups: {},
/**
* register a CheckBox Group
- * @param {Roo.bootstrap.CheckBox} the CheckBox to add
+ * @param {Roo.bootstrap.form.CheckBox} the CheckBox to add
*/
register : function(checkbox)
{
/**
* fetch a CheckBox Group based on the group ID
* @param {string} the group ID
- * @returns {Roo.bootstrap.CheckBox} the CheckBox group
+ * @returns {Roo.bootstrap.form.CheckBox} the CheckBox group
*/
get: function(groupId) {
if (typeof(this.groups[groupId]) == 'undefined') {