My favorites
▼
|
Sign in
jquery-jtps
jTPS - animated scrolling, sortable, and pretty datagrid table modifier
Project Home
Downloads
Wiki
Issues
Source
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
9
attachment: jTPS.js.patch
(1.3 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- trunk/jTPS.js
+++ trunk/jTPS.js
@@ -6,10 +6,8 @@
*/
(function($) {
- // apply table controls + setup initial jTPS namespace within jQuery
- $.fn.jTPS = function ( opt ) {
-
- $(this).data('tableSettings', $.extend({
+ $.jTPS = {
+ defaultOpt: {
perPages: [5, 6, 10, 20, 50, 'ALL'], // the "show per page" selection
perPageText: 'Show per page:', // text that appears before perPages links
perPageDelim: '<span style="color:#ccc;">|</span>', // text or dom node that deliminates each perPage link
@@ -18,7 +16,13 @@
scrollStep: 2, // how many tr's are scrolled per step in the animated vertical pagination scrolling
fixedLayout: true, // autoset the width/height on each cell and set table-layout to fixed after auto layout
clickCallback: function () {} // callback function after clicks on sort, perpage and pagination
- }, opt));
+ }
+ };
+
+ // apply table controls + setup initial jTPS namespace within jQuery
+ $.fn.jTPS = function ( opt ) {
+
+ $(this).data('tableSettings', $.extend({}, $.jTPS.defaultOpt, opt));
// generic pass-through object + other initial variables
var pT = $(this), page = page || 1, perPages = $(this).data('tableSettings').perPages, perPage = perPage || perPages[0],
Powered by
Google Project Hosting