1/** 2 * @package Joomla.Site 3 * @subpackage Templates.beez3 4 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. 5 * @license GNU General Public License version 2 or later; see LICENSE.txt 6 * @since 3.2 7 */ 8 9(function($) 10{ 11 $(document).ready(function() 12 { 13 $('*[rel=tooltip]').tooltip() 14 15 // Turn radios into btn-group 16 $('.radio.btn-group label').addClass('btn'); 17 18 $('fieldset.btn-group').each(function() { 19 // Handle disabled, prevent clicks on the container, and add disabled style to each button 20 if ($(this).prop('disabled')) { 21 $(this).css('pointer-events', 'none').off('click'); 22 $(this).find('.btn').addClass('disabled'); 23 } 24 }); 25 26 $(".btn-group label:not(.active)").click(function() 27 { 28 var label = $(this); 29 var input = $('#' + label.attr('for')); 30 31 if (!input.prop('checked')) { 32 label.closest('.btn-group').find("label").removeClass('active btn-success btn-danger btn-primary'); 33 if (input.val() == '') { 34 label.addClass('active btn-primary'); 35 } else if (input.val() == 0) { 36 label.addClass('active btn-danger'); 37 } else { 38 label.addClass('active btn-success'); 39 } 40 input.prop('checked', true); 41 } 42 }); 43 $(".btn-group input[checked=checked]").each(function() 44 { 45 if ($(this).val() == '') { 46 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-primary'); 47 } else if ($(this).val() == 0) { 48 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-danger'); 49 } else { 50 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-success'); 51 } 52 }); 53 }) 54})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.