1/** 2 * @package Joomla.Site 3 * @subpackage Templates.protostar 4 * @copyright Copyright (C) 2005 - 2018 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 $(".btn-group label:not(.active)").click(function() 19 { 20 var label = $(this); 21 var input = $('#' + label.attr('for')); 22 23 if (!input.prop('checked')) { 24 label.closest('.btn-group').find("label").removeClass('active btn-success btn-danger btn-primary'); 25 if (input.val() == '') { 26 label.addClass('active btn-primary'); 27 } else if (input.val() == 0) { 28 label.addClass('active btn-danger'); 29 } else { 30 label.addClass('active btn-success'); 31 } 32 input.prop('checked', true); 33 input.trigger('change'); 34 } 35 }); 36 $(".btn-group input[checked=checked]").each(function() 37 { 38 if ($(this).val() == '') { 39 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-primary'); 40 } else if ($(this).val() == 0) { 41 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-danger'); 42 } else { 43 $("label[for=" + $(this).attr('id') + "]").addClass('active btn-success'); 44 } 45 }); 46 47 $('#back-top').on('click', function(e) { 48 e.preventDefault(); 49 $("html, body").animate({scrollTop: 0}, 1000); 50 }); 51 }) 52})(jQuery); 53 54 55jQuery(document).ready(function() 56 { 57 // This copies first name + last name into the (full) name field, whenever they change 58 jQuery('#jform_com_fields_first_name').change(function() { 59 jQuery('#jform_name').val( jQuery(this).val() + ' ' + jQuery(jQuery('#jform_com_fields_last_name')).val() ); 60 }); 61 62 jQuery('#jform_com_fields_last_name').change(function() { 63 jQuery('#jform_name').val( jQuery(jQuery('#jform_com_fields_first_name')).val() + ' ' + jQuery(this).val() ); 64 }); 65 66 // This loads first name + last name into the (full) name field, when the form loads. 67 // They will be empty except when the form re-loads because of some error, like using 68 // an email address that already exists. 69 70 jQuery('#jform_name').val( jQuery(jQuery('#jform_com_fields_first_name')).val() 71 + ' ' + jQuery(jQuery('#jform_com_fields_last_name' )).val() 72 ); 73 74 75 jQuery('#jform_email1').change(function() { 76 jQuery('#jform_username').val( jQuery(this).val() ); 77 }); 78 79 80 jQuery('#jform_name').prop('readonly', true); 81 82 jQuery('#jform_spacer-lbl').parent().parent().parent().parent().hide(); 83 84 85 }); 86 87 88 89 90 91jQuery(document).ready(function() 92 { 93 jQuery('#div_itemIntroText').find('a').each(function() { 94 // alert(jQuery(this).attr('href')); 95 }); 96 jQuery('#div_itemFullText').find('a').each(function() { 97 // alert(jQuery(this).attr('href')); 98 }); 99 }); 100 101 102 103 104jQuery(document).ready(function() 105 { 106 /// Get the first link from the EasyFolderListingPro module 107 /// and stuff it into the pdf icon 108 /// (assumes the first link is the "right" one) 109 110 jQuery('#eflpTable00').find('a').first().each(function() { 111 download_link = jQuery(this).attr('href'); 112 113 jQuery('#iconbar-pdf').attr('href', download_link); 114 115 }); 116 }); 117 118 119/// What is this???? 120/// tinyMCE.init({ 121/// relative_urls : false, 122/// document_base_url : "http://www.site.com/path1/" 123/// }); 124 125jQuery(window).load(function(){ 126 127 jQuery("[data-media]").on("click", function(e) { 128 e.preventDefault(); 129 var $this = jQuery(this); 130 var videoUrl = $this.attr("data-media"); 131 var popup = $this.attr("href"); 132 var $popupIframe = jQuery(popup).find("iframe"); 133 134 $popupIframe.attr("src", videoUrl); 135 136 $this.closest(".page").addClass("show-popup"); 137 }); 138 139 jQuery(".popup").on("click", function(e) { 140 e.preventDefault(); 141 e.stopPropagation(); 142 143 jQuery(".page").removeClass("show-popup"); 144 }); 145 146 jQuery(".popup > iframe").on("click", function(e) { 147 e.stopPropagation(); 148 }); 149 150});
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.