|
199 | 199 | <!-- pagination
|
200 | 200 | totalRows in v-if is used to not hide page input during loading when user puts cursor into it and edit directly (rows gets null there during edit)
|
201 | 201 | -->
|
202 |
| - <div class="flex flex-row items-center mt-4 xs:flex-row xs:justify-between xs:items-center gap-3"> |
| 202 | + <div class="af-pagination-container flex flex-row items-center mt-4 xs:flex-row xs:justify-between xs:items-center gap-3"> |
203 | 203 |
|
204 |
| - <div class="inline-flex " |
| 204 | + <div class="af-pagination-buttons-container inline-flex " |
205 | 205 | v-if="(rows || totalRows) && totalRows >= pageSize && totalRows > 0"
|
206 | 206 | >
|
207 | 207 | <!-- Buttons -->
|
208 | 208 | <button
|
209 |
| - class="flex items-center py-1 px-3 gap-1 text-sm font-medium text-gray-900 focus:outline-none bg-white border-r-0 rounded-s border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50" |
| 209 | + class="af-pagination-prev-button flex items-center py-1 px-3 gap-1 text-sm font-medium text-gray-900 focus:outline-none bg-white border-r-0 rounded-s border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50" |
210 | 210 | @click="page--; pageInput = page.toString();" :disabled="page <= 1">
|
211 | 211 | <svg class="w-3.5 h-3.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none"
|
212 | 212 | viewBox="0 0 14 10">
|
|
218 | 218 | </span>
|
219 | 219 | </button>
|
220 | 220 | <button
|
221 |
| - class="flex items-center py-1 px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white border-r-0 border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50" |
| 221 | + class="af-pagination-first-page-button flex items-center py-1 px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white border-r-0 border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50" |
222 | 222 | @click="page = 1; pageInput = page.toString();" :disabled="page <= 1">
|
223 | 223 | <!-- <IconChevronDoubleLeftOutline class="w-4 h-4" /> -->
|
224 | 224 | 1
|
225 | 225 | </button>
|
226 | 226 | <div
|
227 | 227 | contenteditable="true"
|
228 |
| - class="min-w-10 outline-none inline-block w-auto min-w-10 py-1.5 px-3 text-sm text-center text-gray-700 border border-gray-300 dark:border-gray-700 dark:text-gray-400 dark:bg-gray-800 z-10" |
| 228 | + class="af-pagination-input min-w-10 outline-none inline-block w-auto min-w-10 py-1.5 px-3 text-sm text-center text-gray-700 border border-gray-300 dark:border-gray-700 dark:text-gray-400 dark:bg-gray-800 z-10" |
229 | 229 | @keydown="onPageKeydown($event)"
|
230 | 230 | @input="onPageInput($event)"
|
231 | 231 | @blur="validatePageInput()"
|
|
234 | 234 | </div>
|
235 | 235 |
|
236 | 236 | <button
|
237 |
| - class="flex items-center py-1 px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white border-l-0 border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50" |
| 237 | + class="af-pagination-last-page-button flex items-center py-1 px-3 text-sm font-medium text-gray-900 focus:outline-none bg-white border-l-0 border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50" |
238 | 238 | @click="page = totalPages; pageInput = page.toString();" :disabled="page >= totalPages">
|
239 | 239 | {{ totalPages }}
|
240 | 240 |
|
241 | 241 | <!-- <IconChevronDoubleRightOutline class="w-4 h-4" /> -->
|
242 | 242 | </button>
|
243 | 243 | <button
|
244 |
| - class="flex items-center py-1 px-3 gap-1 text-sm font-medium text-gray-900 focus:outline-none bg-white border-l-0 rounded-e border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50" |
| 244 | + class="af-pagination-next-button flex items-center py-1 px-3 gap-1 text-sm font-medium text-gray-900 focus:outline-none bg-white border-l-0 rounded-e border border-gray-300 hover:bg-gray-100 hover:text-lightPrimary focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 disabled:opacity-50" |
245 | 245 | @click="page++; pageInput = page.toString();" :disabled="page >= totalPages">
|
246 | 246 | <span class="hidden sm:inline">{{ $t('Next') }}</span>
|
247 | 247 | <svg class="w-3.5 h-3.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none"
|
|
257 | 257 | <span v-if="((page || 1) - 1) * pageSize + 1 > totalRows">{{ $t('Wrong Page') }} </span>
|
258 | 258 | <template v-else>
|
259 | 259 |
|
260 |
| - <span class="hidden sm:inline"> |
| 260 | + <span class="af-pagination-info hidden sm:inline"> |
261 | 261 | <i18n-t keypath="Showing {from} to {to} of {total} Entries" tag="p" >
|
262 | 262 | <template v-slot:from>
|
263 | 263 | <strong>{{ from }}</strong>
|
|
0 commit comments