From 81d9d5b76da9943218955976a06231031e6df4d4 Mon Sep 17 00:00:00 2001 From: Xelio Date: Mon, 25 Mar 2013 03:05:28 +0800 Subject: [PATCH] Plugin AP List: Add pagination controls --- plugins/ap-list.css | 55 +++++++++++++++++++++++++++++++++++++++++ plugins/ap-list.user.js | 26 +++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/plugins/ap-list.css b/plugins/ap-list.css index 2e73f3b4..4f4830f4 100644 --- a/plugins/ap-list.css +++ b/plugins/ap-list.css @@ -90,4 +90,59 @@ .ap-list-link-selected { font-style:italic; +} + +.ap-list-center-div { + width: 50%; + margin: 0px auto; + +} + +.ap-list-page-control { + float:left; + padding: 0 5px; +} + +.ap-list-page-text { + float:left; + text-align: center; + color: rgb(32, 168, 177); +} + +#ap-list-current-p { + width: 20px; +} + +#ap-list-total-p { + width: 20px; +} + +.ap-list-triangle { + float:left; + clear:none; + border-style:solid; +} + +.ap-list-triangle-left { + border-color: transparent rgb(32, 168, 177) transparent transparent; +} + +.ap-list-triangle-left-half { + border-width: 7.5px 7.5px 7.5px 0px; +} + +.ap-list-triangle-left-full { + border-width: 7.5px 13px 7.5px 0px; +} + +.ap-list-triangle-right { + border-color: transparent transparent transparent rgb(32, 168, 177); +} + +.ap-list-triangle-right-half { + border-width: 7.5px 0px 7.5px 7.5px; +} + +.ap-list-triangle-right-full { + border-width: 7.5px 0px 7.5px 13px; } \ No newline at end of file diff --git a/plugins/ap-list.user.js b/plugins/ap-list.user.js index 882a4ef9..5ddd7343 100644 --- a/plugins/ap-list.user.js +++ b/plugins/ap-list.user.js @@ -718,12 +718,37 @@ window.plugin.apList.setupList = function() { + 'plugin.apList.hideReloadLabel();return false;">↻ R' + '' + '
' + + '
' + ''; $('#sidebar').append(content); $('#ap-list-reload').hide(); } +window.plugin.apList.setupPagination = function() { + var content = '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
1
' + + '
/
' + + '
1
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
' + + '
'// fix collapsion of parent caused by inner div's float:left + + '
'; + $('#ap-list-pagination').html(content); +} + window.plugin.apList.setupMapEvent = function() { map.on('zoomstart', function() { plugin.apList.setupMapEvent.zoomLevelBefore = map.getZoom(); @@ -758,6 +783,7 @@ var setup = function() { window.plugin.apList.setupTableColumns(); window.plugin.apList.setupCSS(); window.plugin.apList.setupList(); + window.plugin.apList.setupPagination(); window.plugin.apList.setupMapEvent(); window.addHook('requestFinished', window.plugin.apList.handleUpdate); }