/** * @package Joomla.Site * @subpackage Templates.protostar * @copyright Copyright (C) 2005 - 2016 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); } }); $(".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'); } }); }) })(jQuery); /* FILE ARCHIVED ON 19:30:46 Jul 25, 2017 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 16:09:28 Apr 10, 2019. 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: 42.644 (3) esindex: 0.012 captures_list: 59.775 CDXLines.iter: 12.51 (3) PetaboxLoader3.datanode: 45.689 (4) exclusion.robots: 0.336 exclusion.robots.policy: 0.318 RedisCDXSource: 0.738 PetaboxLoader3.resolve: 374.123 load_resource: 411.171 *bpackage Templates.protostar * @copyright Copyright (C) 2005 - 2016 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); } }); $(".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'); } }); }) })(jQuery); /* FILE ARCHIVED ON 19:30:46 Jul 25, 2017 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 16:09:28 Apr 10, 2019. 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: 42.644 (3) esindex: 0.012 captures_list: 59.775 CDXLines.iter: 12.51 (3) PetaboxLoader3.datanode: 45.689 (4) exclusion.robots: 0.336 exclusion.robots.policy: 0.318 RedisCDXSource: 0.738 PetaboxLoader3.resolve: 374.123 load_resource: 411.171 */