This commit is contained in:
TarekNabil 2023-04-21 08:06:06 +02:00
parent 4a52d6b82c
commit e92b607081
2 changed files with 6 additions and 3 deletions

View File

@ -19,6 +19,7 @@
$tbody = $( '#rates' ),
$save_button = $( ':input[name="save"]' ),
$pagination = $( '#rates-pagination' ),
$bottom_pagination = $( '#rates-bottom-pagination' ),
$search_field = $( '#rates-search .wc-tax-rates-search-field' ),
$submit = $( '.submit .button-primary[type=submit]' ),
WCTaxTableModelConstructor = Backbone.Model.extend({
@ -121,8 +122,8 @@
this.listenTo( this.model, 'saved:rates', this.clearUnloadConfirmation );
$tbody.on( 'change autocompletechange', ':input', { view: this }, this.updateModelOnChange );
$search_field.on( 'keyup search', { view: this }, this.onSearchField );
$pagination.on( 'click', 'a', { view: this }, this.onPageChange );
$pagination.on( 'change', 'input', { view: this }, this.onPageChange );
$pagination.add($bottom_pagination).on( 'click', 'a', { view: this }, this.onPageChange );
$pagination.add($bottom_pagination).on( 'change', 'input', { view: this }, this.onPageChange );
$( window ).on( 'beforeunload', { view: this }, this.unloadConfirmation );
$submit.on( 'click', { view: this }, this.onSubmit );
$save_button.prop( 'disabled', true );
@ -173,7 +174,7 @@
if ( qty_pages > 1 ) {
// We've now displayed our initial page, time to render the pagination box.
$pagination.html( paginationTemplate( {
$pagination.add($bottom_pagination).html( paginationTemplate( {
qty_rates: qty_rates,
current_page: this.page,
qty_pages: qty_pages

View File

@ -57,6 +57,8 @@ if ( ! defined( 'ABSPATH' ) ) {
</tbody>
</table>
<div id="rates-bottom-pagination"></div>
<script type="text/html" id="tmpl-wc-tax-table-row">
<tr class="tips" data-tip="<?php printf( esc_attr__( 'Tax rate ID: %s', 'woocommerce' ), '{{ data.tax_rate_id }}' ); ?>" data-id="{{ data.tax_rate_id }}">
<td class="country">