-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
44 lines (44 loc) · 1.39 KB
/
main.js
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
window.hth = {
init: function(options) {
this.options = options;
this.setupBrowseTabs();
this.animateFlash();
this.setupDatatables();
$.datepicker.setDefaults( $.datepicker.regional[ "en-GB" ] );
$('#date').datepicker();
$('#dob').datepicker();
},
setupBrowseTabs: function(event) {
$('#uitabs').tabs({
selected : 0,
});
// for forward and back
$.address.change(function(event){
$("#uitabs").tabs( {
"show": function(event, ui) {
var oTable = $('div.dataTables_scrollBody>table.tabular', ui.panel).dataTable();
if ( oTable.length > 0 ) {
oTable.fnAdjustColumnSizing();
}
}
}
/*"select", window.location.hash*/
)
});
// when the tab is selected update the url with the hash
$("#uitabs").bind("tabsselect", function(event, ui) {
window.location.hash = ui.tab.hash;
})
},
animateFlash: function() {
var flash = $('#flash');
window.setTimeout("$('#flash').slideUp()", 5000);
},
setupDatatables: function() {
$('.tabular').dataTable( {
"sScrollY": "300px",
"bScrollCollapse": true,
"bPaginate": false,
});
}
};