Button.js 839 B

123456789101112131415161718192021222324252627282930313233
  1. Ext.define('Ext.theme.material.Button', {
  2. override: 'Ext.Button',
  3. config: {
  4. ripple: {
  5. delegate: '.' + Ext.baseCSSPrefix + 'inner-el'
  6. }
  7. },
  8. materialIconRe: /^md-icon[-|_](.*)/,
  9. applyIconCls: function (classList) {
  10. if (classList) {
  11. classList = Ext.dom.Element.splitCls(classList);
  12. var len = classList.length,
  13. i, cls, materialMatch;
  14. for (i = 0; i < len; i++) {
  15. cls = classList[i];
  16. materialMatch = cls && cls.match(this.materialIconRe);
  17. if (materialMatch && materialMatch.length > 1) {
  18. classList.unshift('md-icon');
  19. break;
  20. }
  21. }
  22. return classList.join(' ');
  23. }
  24. return classList;
  25. }
  26. });