Skip to content

Commit fe04691

Browse files
committed
Merge branch 'develop' of github.com:olton/Metro-UI-CSS into develop
2 parents f1fddbd + 13c2d17 commit fe04691

9 files changed

Lines changed: 176 additions & 8 deletions

File tree

css/modern.css

Lines changed: 36 additions & 3 deletions
Large diffs are not rendered by default.

javascript/pagelist.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Author: Kation
22
* Description: Function to create page list.
3-
* Version: 0.1
3+
* Version: 0.1.1
44
*
55
* Tutorial:
66
* var page = $("#page").pagelist();
@@ -45,7 +45,7 @@
4545
//Each Page Item Template, 1,2,3,4...
4646
this.pageItemTemplate = '<a class="tool-button">{page}</a>';
4747
//Current Page Item Template
48-
this.pageCurrentTemplate = '<a class="pagecurrent tool-button">{page}</a>';
48+
this.pageCurrentTemplate = '<a class="pageCurrent tool-button">{page}</a>';
4949
//'...' Template
5050
this.pageMoreTemplate = '<span>...</span>';
5151
//Jump Template

less/modern.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@
3636
@import "dialog.less";
3737
@import "calendar.less";
3838
@import "contextmenu.less";
39+
@import "pagelist.less";
3940
}

less/pagelist.less

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/*
2+
* Metro UI CSS
3+
* (c) 2012-2013 by Sergey Pimenov
4+
* Licensed under the MIT License and Commercial
5+
*
6+
* Pagelist.less
7+
*
8+
*/
9+
10+
.pagelist {
11+
padding-bottom: 10px;
12+
text-align: center;
13+
14+
.pagePrevious,
15+
.pageNext,
16+
.pageContent,
17+
.pageJump {
18+
display: inline-block;
19+
20+
input {
21+
width: 32px;
22+
height: 32px;
23+
top: 1px;
24+
position: relative;
25+
border: 1px #bababa solid;
26+
}
27+
28+
#pageGo {
29+
margin: 0px;
30+
}
31+
}
32+
33+
.pageContent a {
34+
padding-top: 4px;
35+
}
36+
37+
.pagePrevious {
38+
text-align: right;
39+
}
40+
41+
.pageNext {
42+
text-align: left;
43+
}
44+
45+
a {
46+
margin: 4px;
47+
cursor: pointer;
48+
}
49+
50+
.pageCurrent {
51+
font-weight: bold;
52+
}
53+
}

public/css/modern.css

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7310,4 +7310,39 @@ License: CC BY-SA 3.0 -- http://creativecommons.org/licenses/by-sa/3.0/
73107310
.metrouicss .datepicker {
73117311
position: relative;
73127312
}
7313-
>>>>>>> d5a744fed11827773116666532f38bab2d7a7a81
7313+
.metrouicss .pagelist {
7314+
padding-bottom: 10px;
7315+
text-align: center;
7316+
}
7317+
.metrouicss .pagelist .pagePrevious,
7318+
.metrouicss .pagelist .pageNext,
7319+
.metrouicss .pagelist .pageContent,
7320+
.metrouicss .pagelist .pageJump {
7321+
display: inline-block;
7322+
}
7323+
.metrouicss .pagelist .pageJump input {
7324+
width: 32px;
7325+
height: 32px;
7326+
top: 1px;
7327+
position: relative;
7328+
border: 1px #bababa solid;
7329+
}
7330+
.metrouicss .pagelist .pageJump #pageGo {
7331+
margin: 0px;
7332+
}
7333+
.metrouicss .pagelist .pageContent a {
7334+
padding-top: 4px;
7335+
}
7336+
.metrouicss .pagelist .pagePrevious {
7337+
text-align: right;
7338+
}
7339+
.metrouicss .pagelist .pageNext {
7340+
text-align: left;
7341+
}
7342+
.metrouicss .pagelist a {
7343+
margin: 4px;
7344+
cursor: pointer;
7345+
}
7346+
.metrouicss .pagelist .pageCurrent {
7347+
font-weight: bold;
7348+
}

public/js/modern/pagelist.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* Author: Kation
22
* Description: Function to create page list.
3-
* Version: 0.1
3+
* Version: 0.1.1
44
*
55
* Tutorial:
66
* var page = $("#page").pagelist();
@@ -45,7 +45,7 @@
4545
//Each Page Item Template, 1,2,3,4...
4646
this.pageItemTemplate = '<a class="tool-button">{page}</a>';
4747
//Current Page Item Template
48-
this.pageCurrentTemplate = '<a class="pagecurrent tool-button">{page}</a>';
48+
this.pageCurrentTemplate = '<a class="pageCurrent tool-button">{page}</a>';
4949
//'...' Template
5050
this.pageMoreTemplate = '<span>...</span>';
5151
//Jump Template

public/navigation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<li><a href="dialog.php">Dialog box</a></li>
5151
<li><a href="ajax.php">Ajax reinit</a></li>
5252
<li><a href="calendar.php">Calendar</a></li>
53+
<li><a href="pagelist.php">Calendar</a></li>
5354
<li class="divider"></li>
5455
<li><a href="notices.php">Notices and Replies</a></li>
5556
<li class="divider"></li>

public/pagelist.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php include("header.php")?>
2+
<div class="page secondary">
3+
<div class="page-header">
4+
<div class="page-header-content">
5+
<h1>Pagelist<small>demo</small></h1>
6+
<a href="/" class="back-button big page-back"></a>
7+
</div>
8+
</div>
9+
<div class="page-region">
10+
<div class="page-region-content">
11+
<div id="pageContent">This is the page of 1</div>
12+
<div id="pageDiv"></div>
13+
<script type="text/javascript" src="js/modern/pagelist.js"></script>
14+
<script type="text/javascript">
15+
$(document).ready(function(){
16+
var page = $("#pageDiv").pagelist();
17+
page.total = 10;
18+
page.current = 1;
19+
page.url = "pagelistresult.php?page={page}";
20+
page.ajax = "#pageContent";
21+
page.create();
22+
});
23+
</script>
24+
<h2>Component usage</h2>
25+
<pre class="prettyprint linenums span10">
26+
var page = $("#page").pagelist();
27+
page.total = 10; //Total pages
28+
page.current = 1; //Current page
29+
page.showcount = 2; //Default is 2
30+
page.url = "pagelistresult.php?page={page}"; //Jump url
31+
page.ajax = "#contnet"; //if you want to use ajax, set value to target element, defaul is null
32+
//If you want to use your own template
33+
//page.pageTemplate = '...';
34+
//page.pageSideTemplate = '...';
35+
//page.pageItemTemplate = '...';
36+
//page.pageCurrentTemplate = '...';
37+
//page.pageMoreTemplate = '...';
38+
//page.pageJumpTemplate = '...';
39+
page.create(); //Create page list
40+
</pre>
41+
</div>
42+
</div>
43+
</div>
44+
<?php include("footer.php")?>

public/pagelistresult.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is the page of <?php echo $_GET["page"] ?>

0 commit comments

Comments
 (0)