Checkbox.js 896 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. Ext.define('Ext.theme.triton.form.field.Checkbox', {
  2. override: 'Ext.form.field.Checkbox',
  3. compatibility: Ext.isIE8,
  4. initComponent: function() {
  5. this.callParent();
  6. Ext.on({
  7. show: 'onGlobalShow',
  8. scope: this
  9. });
  10. },
  11. onFocus: function(e) {
  12. var focusClsEl;
  13. this.callParent([e]);
  14. focusClsEl = this.getFocusClsEl();
  15. if (focusClsEl) {
  16. focusClsEl.syncRepaint();
  17. }
  18. },
  19. onBlur: function(e) {
  20. var focusClsEl;
  21. this.callParent([e]);
  22. focusClsEl = this.getFocusClsEl();
  23. if (focusClsEl) {
  24. focusClsEl.syncRepaint();
  25. }
  26. },
  27. onGlobalShow: function(cmp) {
  28. if (cmp.isAncestor(this)) {
  29. this.getFocusClsEl().syncRepaint();
  30. }
  31. }
  32. });