public/javascripts/WireIt/build/wireit-inputex-editor-grouping.js
function() {
      
      var getDefaultValueForField = function (classObj, paramName) {
         var i, length = classObj.groupOptions.length, f;
         
         for(i = 0 ; i < length ; i++) {
            f = classObj.groupOptions[i];
            
            // Retro-compatibility with deprecated inputParams Object
            if(lang.isObject(f.inputParams) && f.inputParams.name == paramName) {
               return f.inputParams.value;
               
            // New prefered way to use field options
            } else if (f.name == paramName) {
               return f.value;
            }
         }
         return undefined;
      };
      
      
      // The field parameters
      var fieldParams = this.group.getValue();
      var classObj = inputEx.getFieldClass(this.typeSelect.getValue());
      
      // + default values
      for(var key in fieldParams) {
         if( fieldParams.hasOwnProperty(key) ) {
            var value1 = getDefaultValueForField(classObj, key);
            var value2 = fieldParams[key];
            if(value1 == value2) {
               fieldParams[key] = undefined;
            }
         }
      }
      
      // The field type
      fieldParams.type = this.typeSelect.getValue();
      
      // The value defined by the fieldValue
      if(this.fieldValue) fieldParams.value = this.fieldValue.getValue();
      
      return fieldParams;
   }
function() {
      
      var getDefaultValueForField = function (classObj, paramName) {
         var i, length = classObj.groupOptions.length, f;
         
         for(i = 0 ; i < length ; i++) {
            f = classObj.groupOptions[i];
            
            // Retro-compatibility with deprecated inputParams Object
            if(lang.isObject(f.inputParams) && f.inputParams.name == paramName) {
               return f.inputParams.value;
               
            // New prefered way to use field options
            } else if (f.name == paramName) {
               return f.value;
            }
         }
         return undefined;
      };
      
      
      // The field parameters
      var fieldParams = this.group.getValue();
      var classObj = inputEx.getFieldClass(this.typeSelect.getValue());
      
      // + default values
      for(var key in fieldParams) {
         if( fieldParams.hasOwnProperty(key) ) {
            var value1 = getDefaultValueForField(classObj, key);
            var value2 = fieldParams[key];
            if(value1 == value2) {
               fieldParams[key] = undefined;
            }
         }
      }
      
      // The field type
      fieldParams.type = this.typeSelect.getValue();
      
      // The value defined by the fieldValue
      if(this.fieldValue) fieldParams.value = this.fieldValue.getValue();
      
      return fieldParams;
   }
function ( ) { var getDefaultValueForField = function ( classObj , paramName ) { var i , length = classObj . groupOptions . length , f ; for ( i = 0 ; i < length ; i ++ ) { f = classObj . groupOptions [ i ] ; // Retro-compatibility with deprecated inputParams Object if ( lang . isObject ( f . inputParams ) && f . inputParams . name == paramName ) { return f . inputParams . value ; // New prefered way to use field options } else if ( f . name == paramName ) { return f . value ; } } return undefined ; } ; // The field parameters var fieldParams = this . group . getValue ( ) ; var classObj = inputEx . getFieldClass ( this . typeSelect . getValue ( ) ) ; // + default values for ( var key in fieldParams ) { if ( fieldParams . hasOwnProperty ( key ) ) { var value1 = getDefaultValueForField ( classObj , key ) ; var value2 = fieldParams [ key ] ; if ( value1 == value2 ) { fieldParams [ key ] = undefined ; } } } // The field type fieldParams . type = this . typeSelect . getValue ( ) ; // The value defined by the fieldValue if ( this . fieldValue ) fieldParams . value = this . fieldValue . getValue ( ) ; return fieldParams ; }
Return the config for a entry in an Group
@return {Object} Type object configuration
Return the config for a entry in an Group