1/** 2* This is main js file. Don't edit the file if you want to update module in future. 3* 4* @author Globo Software Solution JSC <[email protected]> 5* @copyright 2015 GreenWeb Team 6* @link http://www.globosoftware.net 7* @license please read license in file license.txt 8*/ 9if (typeof $.uniform !== 'undefined') 10 if (typeof $.uniform.defaults !== 'undefined') 11 { 12 if (typeof contact_fileDefaultHtml !== 'undefined') 13 $.uniform.defaults.fileDefaultHtml = contact_fileDefaultHtml; 14 if (typeof contact_fileButtonHtml !== 'undefined') 15 $.uniform.defaults.fileButtonHtml = contact_fileButtonHtml; 16 } 17var CaptchaCallback = function(){ 18 if($('.g-recaptcha').length > 0) 19 $('.g-recaptcha').each(function(index, el) { 20 if(!$(this).hasClass('added_grecaptcha')){ 21 grecaptcha.render(this, {'sitekey' : $(this).data('sitekey')}); 22 $(this).addClass('added_grecaptcha'); 23 } 24 }); 25}; 26function init_gmap() { 27 $('.google-maps').each(function(){ 28 map_description = $(this).data('description'); 29 value = $(this).data('value'); 30 value_latlng = value.split(','); 31 name = $(this).data('name'); 32 label = $(this).data('label'); 33 var myOptions = { 34 zoom: 15, 35 center: new google.maps.LatLng(value_latlng[0],value_latlng[1]), 36 mapTypeId: google.maps.MapTypeId.ROADMAP 37 }; 38 map = new google.maps.Map(document.getElementById('google-maps-'+name), myOptions); 39 marker = new google.maps.Marker({ 40 map: map, 41 position: new google.maps.LatLng(value_latlng[0],value_latlng[1]) 42 }); 43 infowindow = new google.maps.InfoWindow({ 44 content: "<strong>"+label+"</strong><br/>"+map_description 45 }); 46 google.maps.event.addListener(marker, 'click', function() { 47 infowindow.open(map, marker); 48 }); 49 infowindow.open(map, marker); 50 google.maps.event.trigger(map, "resize"); 51 }); 52} 53$(window).load(function() { 54 if($('.g-recaptcha').length > 0){ 55 var script = document.createElement("script"); 56 script.src = "https://www.google.com/recaptcha/api.js?onload=CaptchaCallback&render=explicit"; 57 script.type = "text/javascript"; 58 document.getElementsByTagName("head")[0].appendChild(script); 59 } 60 if($('.google-maps').length > 0){ 61 _gmap_key = ''; 62 $('.google-maps').each(function(){ 63 gmap_key = $(this).data('gmap_key'); 64 if(gmap_key !=''){ 65 _gmap_key = '&key='+gmap_key; 66 return false; 67 } 68 }); 69 var script = document.createElement("script"); 70 script.src = "https://maps.googleapis.com/maps/api/js?v=3.exp&callback=init_gmap"+_gmap_key; 71 script.type = "text/javascript"; 72 document.getElementsByTagName("head")[0].appendChild(script); 73 //google.maps.event.addDomListener(window, 'load', init_gmap); 74 } 75}); 76$(document).ready(function(){ 77 $('.gformbuilderpro_form input[type=text]').on('change invalid', function() { 78 var textfield = $(this).get(0); 79 textfield.setCustomValidity(''); 80 if (!textfield.validity.valid) { 81 textfield.setCustomValidity($('#gformbuilderpro_formValidity').val()); 82 } 83 }); 84 if($('.htmlinput').length > 0){ 85 tinymce.init({ selector:'.htmlinput' }); 86 } 87 if($('.mColorPickerInput').length > 0) 88 $('.mColorPickerInput').each( function() { 89 $(this).minicolors({ 90 control: $(this).attr('data-control') || 'hue', 91 defaultValue: $(this).attr('data-defaultValue') || '', 92 format: $(this).attr('data-format') || 'hex', 93 keywords: $(this).attr('data-keywords') || '', 94 inline: $(this).attr('data-inline') === 'true', 95 letterCase: $(this).attr('data-letterCase') || 'lowercase', 96 opacity: $(this).attr('data-opacity'), 97 position: $(this).attr('data-position') || 'bottom left', 98 swatches: $(this).attr('data-swatches') ? $(this).attr('data-swatches').split('|') : [], 99 change: function(value, opacity) { 100 if( !value ) return; 101 if( opacity ) value += ', ' + opacity; 102 if( typeof console === 'object' ) { 103 //console.log(value); 104 } 105 }, 106 theme: 'bootstrap' 107 }); 108 109 }); 110 if($( ".datepicker").length > 0){ 111 $( ".datepicker" ).datepicker({ 112 changeYear: true, 113 changeMonth: true, 114 }); 115 } 116 if($( ".time_input").length > 0){ 117 $( ".time_input").each(function(){ 118 rel = $(this).attr('name'); 119 time = $('.'+rel+'_hour').val()+':'+$('.'+rel+'_minute').val(); 120 if($('.'+rel+'_apm').length > 0){ 121 time = time+' '+$('.'+rel+'_apm').val(); 122 } 123 $(this).val(time); 124 }) 125 } 126 $('.time_select').change(function(){ 127 rel = $(this).attr('rel'); 128 time = $('.'+rel+'_hour').val()+':'+$('.'+rel+'_minute').val(); 129 if($('.'+rel+'_apm').length > 0){ 130 time = time+' '+$('.'+rel+'_apm').val(); 131 }
132 $('input[name="'+rel+'"]').val(time); 133 }); 134 gformbuilderpro_overlay = '<div id="gformbuilderpro_overlay"><div class="container"><div class="content"><div class="circle"></div></div></div></div></div>'; 135 $('.grating').change(function(){ 136 rateval = $(this).val(); 137 ratename = $(this).attr('name'); 138 for(i=1;i<=5;i++){ 139 if(i > rateval){ 140 $('.'+ratename+'star'+i).removeClass('active'); 141 }else{ 142 $('.'+ratename+'star'+i).addClass('active'); 143 } 144 } 145 }); 146 $('.slider-range').each(function(){ 147 $(this).slider({ 148 range: "min", 149 value: $('#'+$(this).data('id')).val(), 150 min: $('#'+$(this).data('id')).data('min'), 151 max: $('#'+$(this).data('id')).data('max'), 152 step: $('#'+$(this).data('id')).data('range'), 153 slide: function( event, ui ) { 154 $('#'+$(this).data('id')).val(ui.value); 155 $('#'+$(this).data('id')+'-value').html(ui.value); 156 } 157 }); 158 }); 159 $('.slider-range-multi').each(function(){ 160 valmin = $('#'+$(this).data('id')).data('valmin'); 161 valmax = $('#'+$(this).data('id')).data('valmax'); 162 $(this).slider({ 163 range: true, 164 values: [valmin,valmax], 165 min: $('#'+$(this).data('id')).data('min'), 166 max: $('#'+$(this).data('id')).data('max'), 167 step: $('#'+$(this).data('id')).data('range'), 168 slide: function( event, ui ) { 169 $('#'+$(this).data('id')).val(ui.values[0]+'->'+ui.values[1]); 170 $('#'+$(this).data('id')+'-value').html(ui.values[0]+'->'+ui.values[1]); 171 } 172 }); 173 }); 174 $('.spinner_plus').click(function(){ 175 spinner_value = parseInt($('#'+$(this).data('id')).val()); 176 maxval = parseInt($('#'+$(this).data('id')).data('max')); 177 range = parseInt($('#'+$(this).data('id')).data('range')); 178 if(maxval > (spinner_value+range)){ 179 $('#'+$(this).data('id')).val(parseInt(spinner_value)+range); 180 }else{ 181 $('#'+$(this).data('id')).val(parseInt(maxval)); 182 } 183 }); 184 $('.spinner_sub').click(function(){ 185 spinner_value = parseInt($('#'+$(this).data('id')).val()); 186 minval = parseInt($('#'+$(this).data('id')).data('min')); 187 range = parseInt($('#'+$(this).data('id')).data('range')); 188 if(minval < (spinner_value-range)){ 189 $('#'+$(this).data('id')).val(parseInt(spinner_value)-range); 190 }else{ 191 $('#'+$(this).data('id')).val(parseInt(minval)); 192 } 193 }); 194 $('.onoffswitch-checkbox').change(function(){ 195 if($(this).is(':checked')){ 196 $(this).parents('.onoffswitch').find('.onoffswitch-label').addClass('onoffswitch-active'); 197 }else{ 198 $(this).parents('.onoffswitch').find('.onoffswitch-label').removeClass('onoffswitch-active'); 199 } 200 }); 201 $('.onoffswitch-checkbox').each(function(){ 202 if($(this).is(':checked')){ 203 $(this).parents('.onoffswitch').find('.onoffswitch-label').addClass('onoffswitch-active'); 204 }else{ 205 $(this).parents('.onoffswitch').find('.onoffswitch-label').removeClass('onoffswitch-active'); 206 } 207 }); 208 function getDoc(frame) { 209 var doc = null; 210 try { 211 if (frame.contentWindow) { 212 doc = frame.contentWindow.document; 213 } 214 } catch (err) {} 215 if (doc) { 216 return doc; 217 } 218 try { 219 doc = frame.contentDocument ? frame.contentDocument : frame.document; 220 } catch (err) { 221 doc = frame.document; 222 } 223 return doc; 224 } 225 $(".gformbuilderpro_form form").submit(function(e) { 226 if(!$(this).hasClass('form_using_ajax')){ 227 if($('#product_page_product_id').length > 0 && $('#idCombination').length > 0 && $('.hidden_productatt').length > 0){ 228 $('.hidden_productatt').val($('#product_page_product_id').val()+'-'+$('#idCombination').val()); 229 } 230 } 231 });
232 $(".gformbuilderpro_form form.form_using_ajax").submit(function(e) { 233 if($('#product_page_product_id').length > 0 && $('#idCombination').length > 0 && $('.hidden_productatt').length > 0){ 234 $('.hidden_productatt').val($('#product_page_product_id').val()+'-'+$('#idCombination').val()); 235 } 236 var formsubmit = $(this); 237 if (typeof tinymce != "undefined") { 238 tinymce.triggerSave(); 239 } 240 var formURL = formsubmit.attr("action"); 241 $(gformbuilderpro_overlay).appendTo(formsubmit); 242 if (window.FormData !== undefined) { 243 var formData = new FormData(this); 244 $.ajax({ 245 url: formURL, 246 type: 'POST', 247 data: formData, 248 mimeType: "multipart/form-data", 249 contentType: false, 250 cache: false, 251 processData: false, 252 success: function(data, textStatus, jqXHR) { 253 formsubmit.find('#gformbuilderpro_overlay').remove(); 254 var result = $.parseJSON(data); 255 if(formsubmit.find('.formajaxresult').length > 0){ 256 if(result.errors == '0') 257 formsubmit.find('.formajaxresult').html('<div class="success_box">'+result.thankyou+'</div>'); 258 else 259 formsubmit.find('.formajaxresult').html(result.thankyou); 260 }else{ 261 resulthtml = ''; 262 if(result.errors == '0') 263 resulthtml ='<div class="formajaxresult"><div class="success_box">'+result.thankyou+'</div><div>'; 264 else 265 resulthtml = '<div class="formajaxresult">'+result.thankyou+'<div>'; 266 $(resulthtml).insertBefore(formsubmit.find('.gformbuilderpro_content')); 267 } 268 $('html,body').animate({ 269 scrollTop: formsubmit.find('.formajaxresult').offset().top}, 270 'slow'); 271 if(result.autoredirect == true){ 272 setTimeout(function () { 273 window.location.href = result.redirect_link; 274 }, result.timedelay); 275 } 276 if (typeof grecaptcha != "undefined" && $('.g-recaptcha').length > 0) { 277 grecaptcha.reset(); 278 } 279 }, 280 error: function(jqXHR, textStatus, errorThrown) { 281 if (typeof grecaptcha != "undefined" && $('.g-recaptcha').length > 0) { 282 grecaptcha.reset(); 283 } 284 var err = eval("(" + jqXHR.responseText + ")"); 285 alert(err.Message); 286 287 } 288 }); 289 e.preventDefault(); 290 //e.unbind(); 291 } else { 292 var iframeId = 'unique' + (new Date().getTime()); 293 var iframe = $('<iframe src="javascript:false;" name="' + iframeId + '" />'); 294 iframe.hide(); 295 formsubmit.attr('target', iframeId); 296 iframe.appendTo('body'); 297 iframe.load(function(e) { 298 $('#gformbuilderpro_overlay').remove(); 299 var doc = getDoc(iframe[0]); 300 var docRoot = doc.body ? doc.body : doc.documentElement; 301 var data = docRoot.innerHTML; 302 var result = $.parseJSON(data); 303 if(formsubmit.find('.formajaxresult').length > 0){ 304 if(result.errors == '0') 305 formsubmit.find('.formajaxresult').html('<div class="success_box">'+result.thankyou+'</div>'); 306 else 307 formsubmit.find('.formajaxresult').html(result.thankyou); 308 }else{ 309 resulthtml = ''; 310 if(result.errors == '0') 311 resulthtml ='<div class="formajaxresult"><div class="success_box">'+result.thankyou+'</div><div>'; 312 else 313 resulthtml = '<div class="formajaxresult">'+result.thankyou+'<div>'; 314 $(resulthtml).insertBefore(formsubmit.find('.gformbuilderpro_content')); 315 } 316 $('html,body').animate({ 317 scrollTop: formsubmit.find('.formajaxresult').offset().top}, 318 'slow'); 319 if (typeof grecaptcha != "undefined") { 320 grecaptcha.reset(); 321 } 322 }); 323 } 324 });
325 $('.color_box .mColorPickerinput').on('click',function(){ 326 id = $(this).attr('id'); 327 if($('#icp_'+id).length > 0){ 328 $('#icp_'+id).click(); 329 } 330 }); 331 332})
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.