• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Simple RSS Reader inspired by Gxxgle Reader


Commit MetaInfo

Revisióne92710676746060a66d27c6a9fefe1bbf1f79b4b (tree)
Tiempo2014-08-06 01:27:03
Autorhylom <hylom@hylo...>
Commiterhylom

Log Message

add pager above article list

Cambiar Resumen

Diferencia incremental

--- a/client/public/css/style.css
+++ b/client/public/css/style.css
@@ -40,4 +40,16 @@ a {
4040 font-size: 150%;
4141 margin: 0;
4242 padding: 0;
43-}
\ No newline at end of file
43+}
44+
45+#page-navigation-top {
46+ margin-top: 8px;
47+ margin-bottom: 8px;
48+}
49+
50+#page-navigation-bottom {
51+ margin-top: 8px;
52+ margin-bottom: 8px;
53+}
54+
55+
--- a/client/public/js/grdc.js
+++ b/client/public/js/grdc.js
@@ -4,7 +4,7 @@
44 (function () {
55 // private functions
66
7- function updatePager(total, skip, count) {
7+ function updatePager(total, skip, count, pager) {
88 var totalPage = Math.floor((total - 1) / count + 1);
99 var currentPage = Math.floor((skip - 1) / count + 1);
1010 var pane = $('#contentsPane');
@@ -35,11 +35,10 @@
3535 }
3636 }
3737
38- var paging = $('#page-navigation');
39- paging.empty();
38+ pager.empty();
4039
4140 if (pagerStart != 0) {
42- paging.append($('<li class="disabled"><a href="#">...</a></li>'));
41+ pager.append($('<li class="disabled"><a href="#">...</a></li>'));
4342 }
4443 for (var i = pagerStart; i < pagerEnd; i++) {
4544 anchor = $('<a href="#">');
@@ -50,10 +49,10 @@
5049 if (i == currentPage) {
5150 elem.addClass('disabled');
5251 }
53- paging.append(elem);
52+ pager.append(elem);
5453 }
5554 if (pagerEnd != totalPage) {
56- paging.append($('<li class="disabled"><a href="#">...</a></li>'));
55+ pager.append($('<li class="disabled"><a href="#">...</a></li>'));
5756 }
5857 }
5958
@@ -85,7 +84,10 @@
8584 pane.attr('skip', data.skip);
8685 pane.attr('count', data.count);
8786 pane.attr('feedId', data.feedId);
88- updatePager(data.total, data.skip, data.count);
87+ var pagingTop = $('#page-navigation-top');
88+ var pagingBottom = $('#page-navigation-bottom');
89+ updatePager(data.total, data.skip, data.count, pagingTop);
90+ updatePager(data.total, data.skip, data.count, pagingBottom);
8991 }
9092
9193 function showFeed(feedId, skip, count) {
--- a/client/views/index.jade
+++ b/client/views/index.jade
@@ -12,6 +12,8 @@ block content
1212 li: a.feedItem(href='#', feed-id=feed.feed_id) #{feed.title}
1313 .col-md-9
1414 h4#feedTitle All Feeds:
15+ .paging
16+ ul#page-navigation-top.pagination
1517 table.table#contentsPane
16- #paging
17- ul#page-navigation.pagination
18+ .paging
19+ ul#page-navigation-bottom.pagination