Results 1 to 2 of 2

Thread: 1.1.0 Ext.List addCls Documentation Error

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User benwhite's Avatar
    Join Date
    Oct 2010
    Location
    Columbus, OH
    Posts
    49

    Default 1.1.0 Ext.List addCls Documentation Error

    The documentation for Ext.List methods addCls and removeCls indicate that they take no parameters.
    Actually, they take n parameters of string classnames.

    *edit: sorry I should have indicated this was an error with Ext.lib.Component documentation

  2. #2
    Sencha User
    Join Date
    Mar 2008
    Posts
    47

    Default

    Yup...

    Code:
    /**
             * Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.
             * @param {String/Array} className The CSS class to add, or an array of classes
             * @return {Ext.Element} this
             */
            addCls: function(className) {
                var me = this,
                    i,
                    len,
                    v,
                    cls = [];
    
                if (!Ext.isArray(className)) {
                    if (className && !this.hasCls(className)) {
                        me.dom.className += " " + className;
                    }
                }
                else {
                    for (i = 0, len = className.length; i < len; i++) {
                        v = className[i];
                        if (v && !me.hasCls(v)) {
                            cls.push(v);
                        }
                    }
                    if (cls.length) {
                        me.dom.className += " " + cls.join(" ");
                    }
                }
                return me;
            },
    line 19736

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •