src/aria/widgets/AriaSkinNormalization.js
function (widgetName, widgetSkinObj) {
            if (!this.skinnableClasses.hasOwnProperty(widgetName)) {
                this.$logError(this.INVALID_SKINNABLE_CLASS, [widgetName]);
                return null;
            }
            if (widgetSkinObj == null) {
                widgetSkinObj = {};
            }
            var widgetNormalizer = this._getWidgetNormalizer(widgetName);
            var beanName = "aria.widgets.AriaSkinBeans." + widgetName + "Cfg";
            var std = widgetSkinObj.std;
            if (std == null) {
                this.$logWarn(this.MISSING_STD_SKINCLASS, [widgetName]);
                std = {};
                widgetSkinObj.std = std;
            }
            var result = true;
            var logs = ariaCoreLog;
            var msgs = [];
            var checkRes;
            // Note that the order of this process is very important (std must be normalized at the end only)
            for (var skinClassName in widgetSkinObj) {
                if (widgetSkinObj.hasOwnProperty(skinClassName) && skinClassName != "std") {
                    var skinClass = widgetSkinObj[skinClassName];
                    widgetNormalizer.normSkinClass(skinClassName, skinClass, std);
                    checkRes = this._check(skinClass, beanName);
                    if (!checkRes.result) {
                        result = false;
                    }
                    if (logs && checkRes.message) {
                        msgs.push(logs.prepareLoggedMessage("In skin class %1:\n %2", [skinClassName,
                                checkRes.message.replace(/\n/g, "\n ")]));
                    }
                }
            }
            widgetNormalizer.normSkinClass("std", std, {});
            checkRes = this._check(std, beanName);
            if (!checkRes.result) {
                result = false;
            }
            if (logs && checkRes.message) {
                msgs.push(logs.prepareLoggedMessage("In skin class %1:\n %2", ["std",
                        checkRes.message.replace(/\n/g, "\n ")]));
            }
            if (!result) {
                this.$logWarn(this.WIDGET_NORMALIZATION_ERROR, [widgetName, msgs.join('\n').replace(/\n/g, "\n ")]);
            }
            widgetSkinObj['aria:skinNormalized'] = true;
            return widgetSkinObj;
        }
function (widgetName, widgetSkinObj) {
            if (!this.skinnableClasses.hasOwnProperty(widgetName)) {
                this.$logError(this.INVALID_SKINNABLE_CLASS, [widgetName]);
                return null;
            }
            if (widgetSkinObj == null) {
                widgetSkinObj = {};
            }
            var widgetNormalizer = this._getWidgetNormalizer(widgetName);
            var beanName = "aria.widgets.AriaSkinBeans." + widgetName + "Cfg";
            var std = widgetSkinObj.std;
            if (std == null) {
                this.$logWarn(this.MISSING_STD_SKINCLASS, [widgetName]);
                std = {};
                widgetSkinObj.std = std;
            }
            var result = true;
            var logs = ariaCoreLog;
            var msgs = [];
            var checkRes;
            // Note that the order of this process is very important (std must be normalized at the end only)
            for (var skinClassName in widgetSkinObj) {
                if (widgetSkinObj.hasOwnProperty(skinClassName) && skinClassName != "std") {
                    var skinClass = widgetSkinObj[skinClassName];
                    widgetNormalizer.normSkinClass(skinClassName, skinClass, std);
                    checkRes = this._check(skinClass, beanName);
                    if (!checkRes.result) {
                        result = false;
                    }
                    if (logs && checkRes.message) {
                        msgs.push(logs.prepareLoggedMessage("In skin class %1:\n %2", [skinClassName,
                                checkRes.message.replace(/\n/g, "\n ")]));
                    }
                }
            }
            widgetNormalizer.normSkinClass("std", std, {});
            checkRes = this._check(std, beanName);
            if (!checkRes.result) {
                result = false;
            }
            if (logs && checkRes.message) {
                msgs.push(logs.prepareLoggedMessage("In skin class %1:\n %2", ["std",
                        checkRes.message.replace(/\n/g, "\n ")]));
            }
            if (!result) {
                this.$logWarn(this.WIDGET_NORMALIZATION_ERROR, [widgetName, msgs.join('\n').replace(/\n/g, "\n ")]);
            }
            widgetSkinObj['aria:skinNormalized'] = true;
            return widgetSkinObj;
        }
function ( widgetName , widgetSkinObj ) { if ( ! this . skinnableClasses . hasOwnProperty ( widgetName ) ) { this . $logError ( this . INVALID_SKINNABLE_CLASS , [ widgetName ] ) ; return null ; } if ( widgetSkinObj == null ) { widgetSkinObj = { } ; } var widgetNormalizer = this . _getWidgetNormalizer ( widgetName ) ; var beanName = "aria.widgets.AriaSkinBeans." + widgetName + "Cfg" ; var std = widgetSkinObj . std ; if ( std == null ) { this . $logWarn ( this . MISSING_STD_SKINCLASS , [ widgetName ] ) ; std = { } ; widgetSkinObj . std = std ; } var result = true ; var logs = ariaCoreLog ; var msgs = [ ] ; var checkRes ; // Note that the order of this process is very important (std must be normalized at the end only) for ( var skinClassName in widgetSkinObj ) { if ( widgetSkinObj . hasOwnProperty ( skinClassName ) && skinClassName != "std" ) { var skinClass = widgetSkinObj [ skinClassName ] ; widgetNormalizer . normSkinClass ( skinClassName , skinClass , std ) ; checkRes = this . _check ( skinClass , beanName ) ; if ( ! checkRes . result ) { result = false ; } if ( logs && checkRes . message ) { msgs . push ( logs . prepareLoggedMessage ( "In skin class %1:\n %2" , [ skinClassName , checkRes . message . replace ( / \n / g , "\n " ) ] ) ) ; } } } widgetNormalizer . normSkinClass ( "std" , std , { } ) ; checkRes = this . _check ( std , beanName ) ; if ( ! checkRes . result ) { result = false ; } if ( logs && checkRes . message ) { msgs . push ( logs . prepareLoggedMessage ( "In skin class %1:\n %2" , [ "std" , checkRes . message . replace ( / \n / g , "\n " ) ] ) ) ; } if ( ! result ) { this . $logWarn ( this . WIDGET_NORMALIZATION_ERROR , [ widgetName , msgs . join ( '\n' ) . replace ( / \n / g , "\n " ) ] ) ; } widgetSkinObj [ 'aria:skinNormalized' ] = true ; return widgetSkinObj ; }
Returns the normalized widget skin configuration.
@param {String} widgetName name of the widget (in fact, the skinnable class, which may not correspond exactly
to widgets)
@param {Object} widgetSkinObj object whose properties are all the skin classes for the widget. If it is not
null, and widgetName is correct, this method returns this object, after normalization.
@return {Object}
Returns the normalized widget skin configuration .