Poprawiono formatowanie kodu w pliku products-list.php oraz dodano ustawienie wartości bieżącej strony w formularzu.
This commit is contained in:
@@ -851,16 +851,19 @@
|
||||
|
||||
data = jQuery.parseJSON( response );
|
||||
|
||||
if ( data.status == 'ok' ) {
|
||||
if ( data.status == 'ok' )
|
||||
{
|
||||
$( '#table-products tbody' ).html( data.html );
|
||||
$( '.pagination .previous' ).attr( 'page', ( current_page - 1 > 1 ) ? ( current_page - 1 ) : 1 );
|
||||
$( '.pagination .next' ).attr( 'page', ( current_page + 1 < pagination_max ) ? ( current_page + 1 ) : pagination_max );
|
||||
$( '.pagination span' ).html( current_page );
|
||||
if ( data.pagination_max ) {
|
||||
if ( data.pagination_max )
|
||||
{
|
||||
$( '.pagination' ).attr( 'pagination_max', data.pagination_max );
|
||||
$( '.pagination #max_page' ).html( data.pagination_max );
|
||||
$( '.pagination .last' ).attr( 'page', data.pagination_max );
|
||||
}
|
||||
$( '#current-page' ).val( current_page );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user