Skip to content

Commit

Permalink
Fix one more Problem on Field/Module JS
Browse files Browse the repository at this point in the history
  • Loading branch information
bordoni committed Jul 18, 2017
1 parent 15b5dd3 commit 261316e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 7 additions & 8 deletions ui/js/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 ),
Expand Down Expand Up @@ -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 ] );
} );
},

Expand Down
2 changes: 0 additions & 2 deletions ui/js/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 261316e

Please sign in to comment.