Fixed some js conding standards

This commit is contained in:
Claudio Sanches 2015-08-05 15:57:15 -03:00
parent 1a2ccd741b
commit b091f12393
2 changed files with 18 additions and 17 deletions

View File

@ -14,7 +14,6 @@ if ( ! defined( 'ABSPATH' ) ) {
</div>
<script type="text/javascript">
jQuery( '.wc-update-now' ).click( 'click', function() {
var answer = confirm( '<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woocommerce' ) ); ?>' );
return answer;
return window.confirm( '<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woocommerce' ) ); ?>' );
});
</script>

View File

@ -809,11 +809,13 @@ class WC_Email extends WC_Settings_API {
jQuery( '.template_plain, .template_html' ).show();
if ( val != 'multipart' && val != 'html' )
if ( val != 'multipart' && val != 'html' ) {
jQuery('.template_html').hide();
}
if ( val != 'multipart' && val != 'plain' )
if ( val != 'multipart' && val != 'plain' ) {
jQuery('.template_plain').hide();
}
}).change();
@ -829,10 +831,9 @@ class WC_Email extends WC_Settings_API {
} );
jQuery( 'a.delete_template' ).click( function() {
var answer = confirm('" . esc_js( __( 'Are you sure you want to delete this template file?', 'woocommerce' ) ) . "');
if (answer)
if ( window.confirm('" . esc_js( __( 'Are you sure you want to delete this template file?', 'woocommerce' ) ) . "') ) {
return true;
}
return false;
});
@ -840,8 +841,9 @@ class WC_Email extends WC_Settings_API {
jQuery( '.editor textarea' ).change( function() {
var name = jQuery( this ).attr( 'data-name' );
if ( name )
if ( name ) {
jQuery( this ).attr( 'name', name );
}
});
" );
}