diff --git a/ui/js/fields.js b/ui/js/fields.js index 51d720d..40f926e 100644 --- a/ui/js/fields.js +++ b/ui/js/fields.js @@ -378,8 +378,6 @@ window.fakerpress.fields.range = function( $, _ ){ $template = $( '.fp-template-' + type ).filter( '[data-rel="' + fieldset.$.container.attr( 'id' ) + '"]' ).filter( '[data-callable]' ); template = $template.html(); - console.log( template ); - // Only place if there is a template if ( template && type !== $conf_container.data( 'type' ) ) { $conf_container.data( 'type', type ); @@ -419,12 +417,6 @@ window.fakerpress.fields.range = function( $, _ ){ index = name.length - 1, key = name[ index ]; - if ( 'undefined' === typeof config[ key ] ) { - return; - } - - $field.val( config[ key ] ); - var $field = $( this ), $label = $field.next( window.fakerpress.fieldset.selector.label ), $internal_label = $field.next( window.fakerpress.fieldset.selector.internal_label ), @@ -462,6 +454,13 @@ window.fakerpress.fields.range = function( $, _ ){ if ( 0 !== name.length ){ $field.attr( 'name', window.fakerpress.fieldName( name ) ); } + + + if ( 'undefined' === typeof config || 'undefined' === typeof config[ key ] ) { + return; + } + + $field.val( config[ key ] ); } ); }, diff --git a/ui/js/module.js b/ui/js/module.js index 1a6f1b9..98a078d 100644 --- a/ui/js/module.js +++ b/ui/js/module.js @@ -17,8 +17,6 @@ if ( 'undefined' === typeof window.fakerpress ){ attrClass = 'notice is-dismissible ' + attrClass; } - console.log( data, html ); - var noticeContent = _.template( html )( data ), templateVars = { 'attrClass': attrClass,