Skip to content

Instantly share code, notes, and snippets.

@JustLikeIcarus
Created September 12, 2009 02:50
Show Gist options
  • Save JustLikeIcarus/185703 to your computer and use it in GitHub Desktop.
Save JustLikeIcarus/185703 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
$("input[id$='date'], input[id='date_of_birth']").datepicker({
duration: '',
dateFormat: 'yy-mm-dd',
showOn: 'button',
buttonImage: '/img/icons/calendar-month.png',
buttonImageOnly: true
});
$("input[id$='datetime']").datepicker({
duration: '',
showTime: true,
constrainInput: false,
dateFormat: 'yy-mm-dd',
showOn: 'button',
buttonImage: '/img/icons/calendar-month.png',
buttonImageOnly: true
});
$('.sched-fac-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
null,
null,
{ "bSortable": false},
{ "bSortable": false },
{ "bSortable": false }
]
});
$('.team-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
]
});
$('.sc-team-table, .season-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
]
});
$('.reg-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
]
});
$('#reg-member-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
]
});
$('.my-players-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
]
});
$('.facility-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
{ "bSortable": false },
{ "bSortable": false }
]
});
$('.sports-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
{ "bSortable": false },
{ "bSortable": false }
]
});
$('.team-roster').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
null,
{ "bSortable": false }
]
});
$('#team-edit').submit( function() {
$('input:checked', aPlayersTable.fnGetNodes()).appendTo('#form');
});
$('#sc-add').submit( function() {
$('input', scMemberTable.fnGetNodes()).each(function(){
if($(this).is(':checked')){
$('#sc-add').append('<input type="hidden" name="sc[]" value="'+$(this).val()+'" />');
}
});
});
aPlayersTable = $('#available-players-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
null,
{ "bSortable": false, "sType": "html" }
]
});
PlayersTable = $('#team-players-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
null,
{ "bSortable": false, "sType": "html" }
]
});
scMemberTable = $('#sc-member-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
{ "bSortable": false }
]
});
$('.news-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
{ "bSortable": false }
]
});
$('.order-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
null,
null,
{ "bSortable": false }
]
});
$('.my-players-teams-table ').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
null,
null,
null,
{ "bSortable": false },
{ "bSortable": false }
]
});
$('.ad-member-table').dataTable({
"bInfo": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"aoColumns": [
null,
null,
{ "bSortable": false },
{ "bSortable": false },
{ "bSortable": false }
]
});
if($('#age_range_start').length){
$('select#age_range_start, select#age_range_end').selectToUISlider({
labels: 18
}).hide().parent().find('label').hide();
$('select#age_range_end').parents('p').prepend('<b>Age Range</b>');
$('select#grade_range_start, select#grade_range_end').selectToUISlider({
labels: 13
}).hide().parent().find('label').hide();
$('select#grade_range_end').parents('p').prepend('<b>Grade Range</b>');
}
$("#tabs").tabs();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment