5755bc0d by Jeff Balicki

pagi fix

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent ab3eb9e4
...@@ -15601,21 +15601,21 @@ p.intro { ...@@ -15601,21 +15601,21 @@ p.intro {
15601 content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1369' data-name='Path 1369' d='M7.515 3.553c.52.526 1.03 1.048 1.546 1.564q1.857 1.856 3.718 3.708a.834.834 0 0 0 1.232 0c.236-.242.477-.479.716-.718a.817.817 0 0 0 0-1.222L11.379 3.538Q9.758 1.915 8.138.29A.9.9 0 0 0 7.532 0a.864.864 0 0 0-.667.288Q5.614 1.544 4.363 2.8L.956 6.207c-.232.232-.465.463-.7.7A.812.812 0 0 0 .269 8.1l.71.71a.833.833 0 0 0 1.25 0l3.016-3L7.429 3.634Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important; 15601 content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1369' data-name='Path 1369' d='M7.515 3.553c.52.526 1.03 1.048 1.546 1.564q1.857 1.856 3.718 3.708a.834.834 0 0 0 1.232 0c.236-.242.477-.479.716-.718a.817.817 0 0 0 0-1.222L11.379 3.538Q9.758 1.915 8.138.29A.9.9 0 0 0 7.532 0a.864.864 0 0 0-.667.288Q5.614 1.544 4.363 2.8L.956 6.207c-.232.232-.465.463-.7.7A.812.812 0 0 0 .269 8.1l.71.71a.833.833 0 0 0 1.25 0l3.016-3L7.429 3.634Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important;
15602 } 15602 }
15603 15603
15604 .um-directory .um-members-pagination-box .um-members-pagi .pagi.current { 15604 .um-directory .um-members-pagination-box .um-members-pagi .pagei.current {
15605 border-color: #fff !important; 15605 border-color: #fff !important;
15606 background-color: #fff !important; 15606 background-color: #fff !important;
15607 color: #3eaf49 !important; 15607 color: #3eaf49 !important;
15608 font-weight: 800 !important; 15608 font-weight: 800 !important;
15609 } 15609 }
15610 15610
15611 .um-directory .um-members-pagination-box .um-members-pagi .pagi.current span { 15611 .um-directory .um-members-pagination-box .um-members-pagi .pagei.current span {
15612 border-color: #fff !important; 15612 border-color: #fff !important;
15613 background-color: #fff !important; 15613 background-color: #fff !important;
15614 color: #3eaf49 !important; 15614 color: #3eaf49 !important;
15615 font-weight: 800 !important; 15615 font-weight: 800 !important;
15616 } 15616 }
15617 15617
15618 .pagi span { 15618 .pagei span {
15619 color: #2c2c2c !important; 15619 color: #2c2c2c !important;
15620 } 15620 }
15621 15621
...@@ -15732,4 +15732,59 @@ p.intro { ...@@ -15732,4 +15732,59 @@ p.intro {
15732 box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16); 15732 box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
15733 } 15733 }
15734 15734
15735 .um-directory .um-members-pagination-box .um-members-pagi .pagei {
15736 cursor: pointer;
15737 display: inline-block;
15738 width: auto;
15739 height: 34px;
15740 line-height: 34px;
15741 transition: all 0.2s linear;
15742 padding: 0 14px;
15743 color: #666 !important;
15744 font-weight: normal;
15745 }
15746
15747 .um-directory .um-members-pagination-box .um-members-pagi .pagei {
15748 cursor: pointer;
15749 display: inline-block;
15750 width: auto;
15751 height: 34px;
15752 line-height: 34px;
15753 transition: all 0.2s linear;
15754 padding: 0 14px;
15755 color: #666 !important;
15756 font-weight: normal;
15757 }
15758
15759 .um-directory .um-members-pagination-box .um-members-pagi .pagei.pagi-arrow {
15760 line-height: 38px;
15761 }
15762
15763 .um-directory .um-members-pagination-box .um-members-pagi .pagei.pagi-arrow i:before {
15764 font-size: 20px;
15765 vertical-align: middle !important;
15766 height: 34px;
15767 line-height: 34px;
15768 top: -2px;
15769 position: relative;
15770 }
15771
15772 .um-directory .um-members-pagination-box .um-members-pagi .pagei.current {
15773 cursor: default;
15774 color: #fff !important;
15775 }
15776
15777 .um-directory .um-members-pagination-box .um-members-pagi .pagei.current:hover {
15778 color: #fff !important;
15779 }
15780
15781 .um-directory .um-members-pagination-box .um-members-pagi .pagei.disabled {
15782 cursor: default;
15783 opacity: 0.4;
15784 }
15785
15786 .um-directory .um-members-pagination-box .um-members-pagi .pagei.none {
15787 color: #aaa !important;
15788 }
15789
15735 /*# sourceMappingURL=child-theme.css.map */ 15790 /*# sourceMappingURL=child-theme.css.map */
...\ No newline at end of file ...\ No newline at end of file
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -25052,6 +25052,47 @@ ...@@ -25052,6 +25052,47 @@
25052 directory.find('.um-member-directory-view-type').removeClass('um-disabled'); 25052 directory.find('.um-member-directory-view-type').removeClass('um-disabled');
25053 }); 25053 });
25054 }); 25054 });
25055 jQuery(document.body).on('click', '.um-directory .pagei:not(.current)', function () {
25056 if (jQuery(this).hasClass('disabled')) {
25057 return;
25058 }
25059 var directory = jQuery(this).parents('.um-directory');
25060 if (um_is_directory_busy(directory)) {
25061 return;
25062 }
25063 um_members_show_preloader(directory);
25064 var page;
25065 if ('first' === jQuery(this).data('page')) {
25066 page = 1;
25067 } else if ('prev' === jQuery(this).data('page')) {
25068 page = directory.data('page') * 1 - 1;
25069 } else if ('next' === jQuery(this).data('page')) {
25070 page = directory.data('page') * 1 + 1;
25071 } else if ('last' === jQuery(this).data('page')) {
25072 page = parseInt(directory.data('total_pages'));
25073 } else {
25074 page = parseInt(jQuery(this).data('page'));
25075 }
25076 if (page === 1) {
25077 directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').addClass('disabled');
25078 directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').removeClass('disabled');
25079 } else if (page === parseInt(directory.data('total_pages'))) {
25080 directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').addClass('disabled');
25081 directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').removeClass('disabled');
25082 } else {
25083 directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').removeClass('disabled');
25084 directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').removeClass('disabled');
25085 }
25086 directory.find('.pagi').removeClass('current');
25087 directory.find('.pagi[data-page="' + page + '"]').addClass('current');
25088 directory.data('page', page);
25089 if (page === 1) {
25090 um_set_url_from_data(directory, 'page', '');
25091 } else {
25092 um_set_url_from_data(directory, 'page', page);
25093 }
25094 um_ajax_get_members_new(directory);
25095 });
25055 function um_ajax_get_members_new(directory, args) { 25096 function um_ajax_get_members_new(directory, args) {
25056 /** 25097 /**
25057 * Operates with the next data: 25098 * Operates with the next data:
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -52,6 +52,57 @@ jQuery(document).ready(function($) { ...@@ -52,6 +52,57 @@ jQuery(document).ready(function($) {
52 }); 52 });
53 53
54 54
55
56 jQuery( document.body ).on( 'click', '.um-directory .pagei:not(.current)', function() {
57 if ( jQuery(this).hasClass('disabled') ) {
58 return;
59 }
60
61 var directory = jQuery(this).parents('.um-directory');
62 if ( um_is_directory_busy( directory ) ) {
63 return;
64 }
65
66 um_members_show_preloader( directory );
67
68 var page;
69 if ( 'first' === jQuery(this).data('page') ) {
70 page = 1;
71 } else if ( 'prev' === jQuery(this).data('page') ) {
72 page = directory.data( 'page' )*1 - 1;
73 } else if ( 'next' === jQuery(this).data('page') ) {
74 page = directory.data( 'page' )*1 + 1;
75 } else if ( 'last' === jQuery(this).data('page') ) {
76 page = parseInt( directory.data( 'total_pages' ) );
77 } else {
78 page = parseInt( jQuery(this).data('page') );
79 }
80
81 if ( page === 1 ) {
82 directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').addClass('disabled');
83 directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').removeClass('disabled');
84 } else if ( page === parseInt( directory.data( 'total_pages' ) ) ) {
85 directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').addClass('disabled');
86 directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').removeClass('disabled');
87 } else {
88 directory.find('.pagi[data-page="prev"], .pagi[data-page="last"]').removeClass('disabled');
89 directory.find('.pagi[data-page="first"], .pagi[data-page="prev"]').removeClass('disabled');
90 }
91
92 directory.find('.pagi').removeClass('current');
93 directory.find('.pagi[data-page="' + page + '"]').addClass('current');
94
95 directory.data( 'page', page );
96 if ( page === 1 ) {
97 um_set_url_from_data( directory, 'page', '' );
98 } else {
99 um_set_url_from_data( directory, 'page', page );
100 }
101
102 um_ajax_get_members_new( directory );
103 });
104
105
55 function um_ajax_get_members_new( directory, args ) { 106 function um_ajax_get_members_new( directory, args ) {
56 107
57 /** 108 /**
......
...@@ -79,19 +79,19 @@ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width ...@@ -79,19 +79,19 @@ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width
79 content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1369' data-name='Path 1369' d='M7.515 3.553c.52.526 1.03 1.048 1.546 1.564q1.857 1.856 3.718 3.708a.834.834 0 0 0 1.232 0c.236-.242.477-.479.716-.718a.817.817 0 0 0 0-1.222L11.379 3.538Q9.758 1.915 8.138.29A.9.9 0 0 0 7.532 0a.864.864 0 0 0-.667.288Q5.614 1.544 4.363 2.8L.956 6.207c-.232.232-.465.463-.7.7A.812.812 0 0 0 .269 8.1l.71.71a.833.833 0 0 0 1.25 0l3.016-3L7.429 3.634Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important; 79 content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9.095' height='15' viewBox='0 0 9.095 15'%3E%3Cpath id='Path_1369' data-name='Path 1369' d='M7.515 3.553c.52.526 1.03 1.048 1.546 1.564q1.857 1.856 3.718 3.708a.834.834 0 0 0 1.232 0c.236-.242.477-.479.716-.718a.817.817 0 0 0 0-1.222L11.379 3.538Q9.758 1.915 8.138.29A.9.9 0 0 0 7.532 0a.864.864 0 0 0-.667.288Q5.614 1.544 4.363 2.8L.956 6.207c-.232.232-.465.463-.7.7A.812.812 0 0 0 .269 8.1l.71.71a.833.833 0 0 0 1.25 0l3.016-3L7.429 3.634Z' transform='translate(9.095) rotate(90)' fill='%231A3668'/%3E%3C/svg%3E") !important;
80 } 80 }
81 81
82 .um-directory .um-members-pagination-box .um-members-pagi .pagi.current{ 82 .um-directory .um-members-pagination-box .um-members-pagi .pagei.current{
83 border-color: #fff !important; 83 border-color: #fff !important;
84 background-color: #fff !important; 84 background-color: #fff !important;
85 color: #3eaf49 !important; 85 color: #3eaf49 !important;
86 font-weight: 800 !important; 86 font-weight: 800 !important;
87 } 87 }
88 .um-directory .um-members-pagination-box .um-members-pagi .pagi.current span{ 88 .um-directory .um-members-pagination-box .um-members-pagi .pagei.current span{
89 border-color: #fff !important; 89 border-color: #fff !important;
90 background-color: #fff !important; 90 background-color: #fff !important;
91 color: #3eaf49 !important; 91 color: #3eaf49 !important;
92 font-weight: 800 !important; 92 font-weight: 800 !important;
93 } 93 }
94 .pagi span{ 94 .pagei span{
95 color: #2c2c2c !important; 95 color: #2c2c2c !important;
96 96
97 } 97 }
...@@ -188,4 +188,47 @@ flex-wrap: wrap !important; ...@@ -188,4 +188,47 @@ flex-wrap: wrap !important;
188 .um-directory .um-members-wrapper .um-members .um-member{ 188 .um-directory .um-members-wrapper .um-members .um-member{
189 border-width: 0px !important; 189 border-width: 0px !important;
190 box-shadow: 0 3px 6px rgb(0 0 0 / 16%); 190 box-shadow: 0 3px 6px rgb(0 0 0 / 16%);
191 }
...\ No newline at end of file ...\ No newline at end of file
191 }
192
193 .um-directory .um-members-pagination-box .um-members-pagi .pagei {
194 cursor: pointer;
195 display: inline-block;
196 width: auto;
197 height: 34px;
198 line-height: 34px;
199 transition: all .2s linear;
200 padding: 0 14px;
201 color: #666 !important;
202 font-weight: normal; }
203
204
205
206 .um-directory .um-members-pagination-box .um-members-pagi .pagei {
207 cursor: pointer;
208 display: inline-block;
209 width: auto;
210 height: 34px;
211 line-height: 34px;
212 transition: all .2s linear;
213 padding: 0 14px;
214 color: #666 !important;
215 font-weight: normal; }
216 .um-directory .um-members-pagination-box .um-members-pagi .pagei.pagi-arrow {
217 line-height: 38px; }
218 .um-directory .um-members-pagination-box .um-members-pagi .pagei.pagi-arrow i:before {
219 font-size: 20px;
220 vertical-align: middle !important;
221 height: 34px;
222 line-height: 34px;
223 top: -2px;
224 position: relative; }
225 .um-directory .um-members-pagination-box .um-members-pagi .pagei.current {
226 cursor: default;
227 color: #fff !important; }
228 .um-directory .um-members-pagination-box .um-members-pagi .pagei.current:hover {
229 color: #fff !important; }
230 .um-directory .um-members-pagination-box .um-members-pagi .pagei.disabled {
231 cursor: default;
232 opacity: .4; }
233 .um-directory .um-members-pagination-box .um-members-pagi .pagei.none {
234 color: #aaa !important; }
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 Author: the Understrap Contributors 5 Author: the Understrap Contributors
6 Author URI: https://github.com/understrap/understrap-child/graphs/contributors 6 Author URI: https://github.com/understrap/understrap-child/graphs/contributors
7 Template: understrap 7 Template: understrap
8 Version: 1.2.0050 8 Version: 1.2.0051
9 License: GNU General Public License v2 or later 9 License: GNU General Public License v2 or later
10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html
11 Text Domain: understrap-child 11 Text Domain: understrap-child
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
16 16
17 <div class="um-members-pagi uimob340-hide uimob500-hide"> 17 <div class="um-members-pagi uimob340-hide uimob500-hide">
18 18
19 <span class="pagi pagi-arrow <# if ( data.pagination.current_page == 1 ) { #>disabled<# } #>" data-page="prev" aria-label="<?php esc_attr_e( 'Previous page', 'ultimate-member' ); ?>"> 19 <span class="pagei pagi-arrow <# if ( data.pagination.current_page == 1 ) { #>disabled<# } #>" data-page="prev" aria-label="<?php esc_attr_e( 'Previous page', 'ultimate-member' ); ?>">
20 <i class="um-faicon-angle-left"></i></span> 20 <i class="um-faicon-angle-left"></i></span>
21 21
22 <# _.each( data.pagination.pages_to_show, function( page, key, list ) { #> 22 <# _.each( data.pagination.pages_to_show, function( page, key, list ) { #>
23 <span class="pagi <# if ( page == data.pagination.current_page ) { #>current<# } #>" data-page="{{{page}}}"><span>{{{page}}}</span></span> 23 <span class="pagei <# if ( page == data.pagination.current_page ) { #>current<# } #>" data-page="{{{page}}}"><span>{{{page}}}</span></span>
24 <# }); #> 24 <# }); #>
25 25
26 <span class="pagi pagi-arrow <# if ( data.pagination.current_page == data.pagination.total_pages ) { #>disabled<# } #>" data-page="next" aria-label="<?php esc_attr_e( 'Next page', 'ultimate-member' ); ?>"> 26 <span class="pagei pagi-arrow <# if ( data.pagination.current_page == data.pagination.total_pages ) { #>disabled<# } #>" data-page="next" aria-label="<?php esc_attr_e( 'Next page', 'ultimate-member' ); ?>">
27 <i class="um-faicon-angle-right"></i></span> 27 <i class="um-faicon-angle-right"></i></span>
28 28
29 </div> 29 </div>
......