# var names = data.names; var values = data.values; var keys = data.field.keys; var placeholder = data.field.placeholder || ''; var units = data.field.units; var slider = data.field.slider; var labels = []; var i; /** * We need to handle responsive dimension fields like this for backwards * compatibility with old margin, padding and border fields. If we did not do this * the keys would be margin_medium_top instead of the existing margin_top_medium. */ var responsive = data.name.replace( data.rootName, '' ); /** * Setup keys and labels if custom config doesn't exist. */ if ( 'object' !== typeof keys ) { keys = { top: '', right: '', bottom: '', left: '', }; } for ( i in keys ) { labels.push( keys[ i ] ); } keys = Object.keys( keys ); /** * Setup input names if custom config doesn't exist. */ if ( 'object' !== typeof names ) { names = {}; for ( i in keys ) { names[ keys[ i ] ] = data.rootName + '_' + keys[ i ] + responsive; } } /** * Setup values if custom config doesn't exist. */ if ( 'object' !== typeof values ) { values = {}; for ( i in keys ) { values[ keys[ i ] ] = data.settings[ data.rootName + '_' + keys[ i ] + responsive ]; } } /** * Setup placeholders if custom config doesn't exist. */ if ( 'object' !== typeof placeholder ) { var str = placeholder; placeholder = {}; for ( i in keys ) { placeholder[ keys[ i ] ] = str; } } var labelClass = ''; #>