/** * @package Joomla.Site * @subpackage Templates.protostar * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @since 3.2 */ (function($) { $(document).ready(function() { $('*[rel=tooltip]').tooltip() // Turn radios into btn-group $('.radio.btn-group label').addClass('btn'); $('fieldset.btn-group').each(function() { // Handle disabled, prevent clicks on the container, and add disabled style to each button if ($(this).prop('disabled')) { $(this).css('pointer-events', 'none').off('click'); $(this).find('.btn').addClass('disabled'); } }); $(".btn-group label:not(.active)").click(function() { var label = $(this); var input = $('#' + label.attr('for')); if (!input.prop('checked')) { label.closest('.btn-group').find("label").removeClass('active btn-success btn-danger btn-primary'); if (input.val() == '') { label.addClass('active btn-primary'); } else if (input.val() == 0) { label.addClass('active btn-danger'); } else { label.addClass('active btn-success'); } input.prop('checked', true); input.trigger('change'); } }); $(".btn-group input[checked=checked]").each(function() { if ($(this).val() == '') { $("label[for=" + $(this).attr('id') + "]").addClass('active btn-primary'); } else if ($(this).val() == 0) { $("label[for=" + $(this).attr('id') + "]").addClass('active btn-danger'); } else { $("label[for=" + $(this).attr('id') + "]").addClass('active btn-success'); } }); $('#back-top').on('click', function(e) { e.preventDefault(); $("html, body").animate({scrollTop: 0}, 1000); }); }) })(jQuery); /* FILE ARCHIVED ON 10:23:44 Mar 30, 2018 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 10:37:28 Dec 03, 2018. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): LoadShardBlock: 294.029 (3) esindex: 0.01 captures_list: 308.266 CDXLines.iter: 10.108 (3) PetaboxLoader3.datanode: 103.405 (5) exclusion.robots: 0.154 exclusion.robots.policy: 0.13 RedisCDXSource: 1.724 PetaboxLoader3.resolve: 265.083 (3) load_resource: 115.578 */