// Success bar $('.success_bar').animate({ 'top' : 32, 'background-color' : 'rgba(176, 255, 190, 1.0)'}, 1600, 'easeOutQuad', function () { $(this).delay(6000).fadeOut(4000); $(this).hover(function () { $(this).stop(true).css('opacity', '1.0'); }, function () { $(this).fadeOut(4000); }) }); $('#large_content').removeAttr('style'); $('.tabs').tabs(); (function () { var division = '6A/5A/4A/3A/2A/1A'; var i = 0; $('li[role="tab"]').each(function () { var div = $(this).attr('aria-controls').replace('tabs-', ''); if (div == division) { $('.tabs').tabs('option', 'active', i); } i = i + 1; }); })(); $('.button').button(); $('.button.back').button({icons : {primary : 'ui-icon-arrowthick-1-w'}}); $('.date_navigation_button') .each(function() { var item = $(this); var primary_icon = item.attr('data-icon-primary'); var secondary_icon = item.attr('data-icon-secondary'); var disabled = item.is('[data-disabled]'); item.button({icons : { primary : primary_icon, secondary : secondary_icon }}); if (disabled) { item.button('disable'); } item.css({'font-size':'7.5pt'}); }); $('.tooltip').tooltip(); $('.contest_viewer').dialog({ autoOpen : false, buttons : [ { text : 'Done', 'class' : 'float_right', click : function () { $(this).dialog('close'); }} , { text : 'Contest Roster', 'class' : 'float_left', 'style' : 'margin-right:10px; margin-left:10px;', icons : { primary : 'ui-icon-document' }, click : function () { window.open('/contests/' + $(this).attr('data-contest') + '/roster', '_blank'); }} ], draggable : false, height: 'auto', modal : true, open : function () { var contest = $(this).attr('data-contest'); $('.contest_viewer').html("
"); var jqxhr = $.ajax({ type : 'GET', url : '/contests/' + contest + '?mode=ajax', dataType : 'html' }) .done(function (data) { $('.contest_viewer').html(data); $('.button').button(); }) .fail(function () { $('.contest_viewer').html('There was an error.'); }); $('.ui-dialog-buttonpane').css('padding', '0').css('font-size', '8pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }, resizable : false, show : { effect : 'highlight', delay : 0, duration : 400, easing : 'easeInOutSine' }, title : 'OSAA Baseball', width : 900 }); $('.contest').hover( function () { $(this).addClass('ui-state-highlight').css('cursor', 'pointer'); }, function () { $(this).removeClass('ui-state-highlight').css('cursor', 'auto'); } ).click(function () { $('.contest_viewer').attr('data-contest', $(this).attr('data-contest')).dialog('open'); }); $('.meet_viewer').dialog({ autoOpen : false, buttons : [ { text : 'Done', 'class' : 'float_right', click : function () { $(this).dialog('close'); } } ], draggable : false, height: 'auto', modal : true, open : function () { var meet = $(this).attr('data-meet'); $('.meet_viewer').html(""); var jqxhr = $.ajax({ type : 'GET', url : '/meets/' + meet + '?mode=ajax', dataType : 'html' }) .done(function (data) { $('.meet_viewer').html(data); $('.button').button(); }) .fail(function () { $('.meet_viewer').html('There was an error.'); }); $('.ui-dialog-buttonpane').css('padding', '0').css('font-size', '8pt'); $('.ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); }, resizable : false, show : { effect : 'highlight', delay : 0, duration : 400, easing : 'easeInOutSine' }, title : 'OSAA Baseball', width : 900 }); $('.meet').hover( function () { $(this).addClass('ui-state-highlight').css('cursor', 'pointer'); }, function () { $(this).removeClass('ui-state-highlight').css('cursor', 'auto'); } ).click(function () { $('.meet_viewer').attr('data-meet', $(this).attr('data-meet')).dialog('open'); }); $('.matchup .teams').hover( function () { var item = $(this); item.addClass('hover') .css('cursor', 'pointer'); }, function () { var item = $(this); item.removeClass('hover') .css('cursor', 'auto'); } ).click(function () { $('.contest_viewer').attr('data-matchup', $(this).parents('.matchup').attr('data-matchup')) .attr('data-contest', $(this).parents('.matchup').attr('data-contest')) .dialog('open'); }); $('.teams .team .name').hover(function () { var name = $(this).attr('data-name'); $('.teams .team .name[data-name="' + name + '"]').css('color', 'red'); }, function () { var name = $(this).attr('data-name'); $('.teams .team .name[data-name="' + name + '"]').css('color', ''); }); $('.rankings_entry').hover( function () { $(this).addClass('ui-state-highlight').css('border-left', 'none').css('border-right', 'none'); }, function () { $(this).removeClass('ui-state-highlight'); } ); function selectText(element) { var doc = document , text = doc.getElementById(element) , range, selection ; if (doc.body.createTextRange) { range = document.body.createTextRange(); range.moveToElementText(text); range.select(); } else if (window.getSelection) { selection = window.getSelection(); range = document.createRange(); range.selectNodeContents(text); selection.removeAllRanges(); selection.addRange(range); } } $('.button.ap_listing').button({ icons : { primary : 'ui-icon-note'}}) .hover(function () { $(this).css('cursor', 'pointer'); }, function () { $(this).css('cursor', 'auto'); }) .click(function () { $('.ap_list_viewer').dialog('open'); }); $('.ap_list_viewer').dialog({ dialogClass : 'ap_list_dialog', autoOpen : false, buttons : [ { text : 'Done', 'class' : 'float_right', click : function () { $(this).dialog('close'); }}, { text : 'Select All', 'class' : 'float_left', click : function () { selectText('ap_info'); }} ], draggable : true, height : 'auto', minHeight : 200, maxHeight : 600, modal : false, open : function () { var date = ''; var activity = 'bbl'; $('.ap_list_viewer').html(""); var jqxhr = $.ajax( { type : 'GET', url : '/contests/scores/' + activity + '?date=' + date + '&mode=ajax', dataType : 'html' }) .done(function (data) { $('.ap_list_viewer').html(data); }) .fail(function () { $('.ap_list_viewer').html('There was an error.'); }); $('.ap_list_dialog .ui-dialog-buttonpane').css('padding', '0').css('font-size', '8pt'); $('.ap_list_dialog .ui-dialog-buttonpane .ui-dialog-buttonset').css('width', '100%'); $('.ap_list_dialog .ui-widget-header').css('background', '#f6a828 url(https://download.jqueryui.com/themeroller/images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x').css('border-color', '#f6a828'); $('.ap_list_dialog.ui-widget-content').css('border-color', '#dddddd').css('font-size', '10pt'); }, resizable : true, show : { effect : 'highlight', delay : 0, duration : 400, easing : 'easeInOutSine' }, title : 'OSAA Baseball AP Listing', width : 575, minWidth : 575 }); $('#rankings_calc_date').parent().css('width', '400px'); function updateRankingsCalcDate (division) { var list_data =
There was an unexpected 500 error. Your request could not be completed by the web server. Some additional information is below.