Fixed some coding standards
This commit is contained in:
parent
4557157890
commit
baf09d4a5e
|
@ -1,4 +1,4 @@
|
|||
/* global shippingZonesLocalizeScript, ajaxurl */
|
||||
/* global wc_enhanced_select_params, shippingZonesLocalizeScript, ajaxurl */
|
||||
( function( $, data, wp, ajaxurl ) {
|
||||
$( function() {
|
||||
var $table = $( '.wc_shipping_zones' ),
|
||||
|
@ -10,9 +10,9 @@
|
|||
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
|
||||
placeholder: $( this ).data( 'placeholder' ),
|
||||
matcher: function( term, text, opt ) {
|
||||
return text.toUpperCase().indexOf( term.toUpperCase() ) >= 0 || opt.attr( "alt" ).toUpperCase().indexOf( term.toUpperCase() ) >= 0;
|
||||
return text.toUpperCase().indexOf( term.toUpperCase() ) >= 0 || opt.attr( 'alt' ).toUpperCase().indexOf( term.toUpperCase() ) >= 0;
|
||||
}
|
||||
}, getEnhancedSelectFormatString() );
|
||||
}, getEnhancedSelectFormatString() ),
|
||||
|
||||
// Backbone model
|
||||
ShippingZone = Backbone.Model.extend({
|
||||
|
@ -45,7 +45,7 @@
|
|||
shippingZone.changes = {};
|
||||
shippingZone.trigger( 'saved:zones' );
|
||||
} else {
|
||||
alert( data.strings.save_failed );
|
||||
window.alert( data.strings.save_failed );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@
|
|||
|
||||
// Select values in region select
|
||||
_.each( rowData.zone_locations, function( location ) {
|
||||
$tr.find( 'option[value="' + location.type + ':' + location.code + '"]' ).prop( "selected", true );
|
||||
$tr.find( 'option[value="' + location.type + ':' + location.code + '"]' ).prop( 'selected', true );
|
||||
} );
|
||||
|
||||
// Editing?
|
||||
|
@ -103,7 +103,7 @@
|
|||
this.$el.find('.editing .wc-shipping-zone-edit').trigger('click');
|
||||
|
||||
// Stripe
|
||||
if ( _.size(zones) % 2 == 0 ) {
|
||||
if ( 0 === _.size( zones ) % 2) {
|
||||
$table.find( 'tbody.wc-shipping-zone-rows' ).next( 'tbody' ).find( 'tr' ).addClass( 'odd' );
|
||||
} else {
|
||||
$table.find( 'tbody.wc-shipping-zone-rows' ).next( 'tbody' ).find( 'tr' ).removeClass( 'odd' );
|
||||
|
|
Loading…
Reference in New Issue