mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-12 23:46:22 +00:00
Updated
Make ellipsis in pagination clickable. It will set focus to the jump to page input, and "select" its value. Allowing user to simply type in any numbers and press Enter to navigate. Bumped v1 version string.
This commit is contained in:
parent
dcc393e7e0
commit
b77d4b7c65
@ -82,6 +82,10 @@ a.pagination-link.is-current:hover {
|
||||
border-color: #60a8dc;
|
||||
}
|
||||
|
||||
li[data-action="page-ellipsis"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #bdc3c7;
|
||||
}
|
||||
|
@ -270,6 +270,8 @@ page.domClick = function (event) {
|
||||
return page.filterUploads(element)
|
||||
case 'view-user-uploads':
|
||||
return page.viewUserUploads(id)
|
||||
case 'page-ellipsis':
|
||||
return page.focusJumpToPage()
|
||||
case 'page-prev':
|
||||
case 'page-next':
|
||||
case 'page-goto':
|
||||
@ -329,6 +331,13 @@ page.switchPage = function (action, element) {
|
||||
}
|
||||
}
|
||||
|
||||
page.focusJumpToPage = function () {
|
||||
const element = document.querySelector('#jumpToPage')
|
||||
if (!element) return
|
||||
element.focus()
|
||||
element.select()
|
||||
}
|
||||
|
||||
page.getUploads = function ({ pageNum, album, all, filters, scroll } = {}, element) {
|
||||
if (element) page.isLoading(element, true)
|
||||
|
||||
@ -2004,12 +2013,12 @@ page.paginate = function (totalItems, itemsPerPage, currentPage) {
|
||||
startDots () {
|
||||
template += `
|
||||
<li><a class="button pagination-link" aria-label="Goto page 1" data-action="page-goto" data-goto="0">1</a></li>
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
<li data-action="page-ellipsis"><span class="pagination-ellipsis">…</span></li>
|
||||
`
|
||||
},
|
||||
endDots () {
|
||||
template += `
|
||||
<li><span class="pagination-ellipsis">…</span></li>
|
||||
<li data-action="page-ellipsis"><span class="pagination-ellipsis">…</span></li>
|
||||
<li><a class="button pagination-link" aria-label="Goto page ${numPages}" data-action="page-goto" data-goto="${numPages - 1}">${numPages}</a></li>
|
||||
`
|
||||
}
|
||||
|
@ -16,7 +16,7 @@
|
||||
v3: CSS and JS files (libs such as bulma, lazyload, etc).
|
||||
v4: Renders in /public/render/* directories (to be used by render.js).
|
||||
#}
|
||||
{% set v1 = "MIxMXR8TwU" %}
|
||||
{% set v1 = "UOoSqCmggh" %}
|
||||
{% set v2 = "hiboQUzAzp" %}
|
||||
{% set v3 = "f0nYw5J15T" %}
|
||||
{% set v4 = "S3TAWpPeFS" %}
|
||||
|
Loading…
Reference in New Issue
Block a user