The code is base on great work of Condor and other developers who posted at http://www.extjs.com/forum/showthrea...ht=tricheckbox
tricheckbox.png
The code is base on great work of Condor and other developers who posted at http://www.extjs.com/forum/showthrea...ht=tricheckbox
tricheckbox.png
Thank you!![]()
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
Touch 2.3.1
XPsp3/W7sp1
IE8/9/10
FF
Chrome
Thanks!
Thanks a lot !
Is it possible to trigger any action when the user clicks on one tri-state checkbox ?
Regards,
Xavier
Is it possible like this :
PHP Code:
{
xtype: 'tricheckbox',
name: 'tri-check2',
fieldLabel: 'Checked',
checked: true,
disabled: true,
listeners: {
check: function() {
// write your code here
}
}
}
Thanks, j.bruni for making this. It was working fantastically in ExtJS 3.x
Do you have any plan to make this work on 4.x?
I seem to have an issue where the checkbox never receives focus. I am trying to tab through the form, but it always skips the tri-state checkbox.
Does anyone else have this issue?
Thanks
I fix little bug: if try to set the initial value at null, the component don't set the right class.
i just change the follow condition:
new setRawValue:Code:if (inputEl) { inputEl.dom.setAttribute('aria-checked', me.value == '1' ? true : false); } me['removeCls'](me.checkedClasses[oldCheck]) me['addCls'](me.checkedClasses[this.currentCheck]); //}
Regards,Code:setRawValue: function (v) { var me = this; if (v === false) v = '0'; if (v === true) v = '1'; if (v == null || v == '' || v === undefined) { if (!this.triState) v = '0'; else v = 'null'; } var oldCheck = me.currentCheck; me.currentCheck = me.getCheckIndex(v); me.value = me.rawValue = me.values[me.currentCheck]; // Update classes var inputEl = me.inputEl; if (inputEl) { inputEl.dom.setAttribute('aria-checked', me.value == '1' ? true : false); } me['removeCls'](me.checkedClasses[oldCheck]) me['addCls'](me.checkedClasses[this.currentCheck]); },
Claudio.
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
Touch 2.3.1
XPsp3/W7sp1
IE8/9/10
FF
Chrome