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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
// default options
var defaults = {
search_show: true, // true - show Q search; false - do not show
search_label: 'Filter', // label for search button
search_external: null, // external container id to serialize and send as search parm
search_external_btn: null, // external search button id; to bind to Q search; will try to auto find
nav_first_btn_label: 'First', // label for first page button; null do not display
nav_prev_btn_label: 'Prev', // label for prev page button; null do not display
nav_next_btn_label: 'Next', // label for next page button; null do not display
nav_last_btn_label: 'Last', // label for last page button; null do not display
nav_show_rows: [ 5, 10, 25, 50], // nbr rows allowed to be show
on_nav_rows_scroll_to_top: true,// auto scroll to top of table when nbr rows shown changes
nav_nbr_center_pages: 3, // number of page links to show around current page
nav_nbr_edge_pages: 2, // number pf page links to show at start and end
nav_nbr_page_spacer: '..', // label between edge and center page links
css_even_row: 'even_row', // zebra stripes
css_odd_row: 'odd_row', // zebra stripes
simple_table: false, // false|true; true to hide all the Q (nav, search, pagination, ajax)
// can pass in as table attr data-simple_table="true"
sort_cols: [ 'all'], // array of columns to allow sorting; 0 indexed
id: null, // unique id; in case multiple tables on page
target_name: 't_', // prefix of data sent to server
page: 1, // current page
offset: 0, // current sql offset
rows: 5, // current number of rows to show
search: '', // if Q search, text; if external, json
sort_col: 0, // current column to sort by; 0 indexed
sort_order: 'asc', // sql direction to sort by; asc|desc
total: null, // total number of rows in table; required for pagination
msg_initial_loading: 'Data loading..', // msg if data table empty and fetching data
msg_loading: 'Loading..', // msg for table loading
ajax: { // jquery ajax options
url: null, // required
type: 'POST',
cache: true,
timeout: 120000, // ms; thus 120s
data: {
},
dataType: 'html'
},
initial_load: true, // false|true;
// false if table popuplated on page load;
// true to do ajax call on page load and populate table
'ignore': null
}; // end defaults
|