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 if($('.htmlinput').length > 0){ 78 tinymce.init({ selector:'.htmlinput' }); 79 } 80 if($('.mColorPickerInput').length > 0) 81 $('.mColorPickerInput').each( function() { 82 $(this).minicolors({ 83 control: $(this).attr('data-control') || 'hue', 84 defaultValue: $(this).attr('data-defaultValue') || '', 85 format: $(this).attr('data-format') || 'hex', 86 keywords: $(this).attr('data-keywords') || '', 87 inline: $(this).attr('data-inline') === 'true', 88 letterCase: $(this).attr('data-letterCase') || 'lowercase', 89 opacity: $(this).attr('data-opacity'), 90 position: $(this).attr('data-position') || 'bottom left', 91 swatches: $(this).attr('data-swatches') ? $(this).attr('data-swatches').split('|') : [], 92 change: function(value, opacity) { 93 if( !value ) return; 94 if( opacity ) value += ', ' + opacity; 95 if( typeof console === 'object' ) { 96 //console.log(value); 97 } 98 }, 99 theme: 'bootstrap' 100 }); 101 102 }); 103 if($( ".datepicker").length > 0){ 104 $( ".datepicker" ).datepicker({ 105 changeYear: true, 106 changeMonth: true, 107 }); 108 } 109 if($( ".time_input").length > 0){ 110 $( ".time_input").each(function(){ 111 rel = $(this).attr('name'); 112 time = $('.'+rel+'_hour').val()+':'+$('.'+rel+'_minute').val(); 113 if($('.'+rel+'_apm').length > 0){ 114 time = time+' '+$('.'+rel+'_apm').val(); 115 } 116 $(this).val(time); 117 }) 118 } 119 $('.time_select').change(function(){ 120 rel = $(this).attr('rel'); 121 time = $('.'+rel+'_hour').val()+':'+$('.'+rel+'_minute').val(); 122 if($('.'+rel+'_apm').length > 0){ 123 time = time+' '+$('.'+rel+'_apm').val(); 124 }
125 $('input[name="'+rel+'"]').val(time); 126 }); 127 gformbuilderpro_overlay = '<div id="gformbuilderpro_overlay"><div class="container"><div class="content"><div class="circle"></div></div></div></div></div>'; 128 $('.grating').change(function(){ 129 rateval = $(this).val(); 130 ratename = $(this).attr('name'); 131 for(i=1;i<=5;i++){ 132 if(i > rateval){ 133 $('.'+ratename+'star'+i).removeClass('active'); 134 }else{ 135 $('.'+ratename+'star'+i).addClass('active'); 136 } 137 } 138 }); 139 $('.slider-range').each(function(){ 140 $(this).slider({ 141 range: "min", 142 value: $('#'+$(this).data('id')).val(), 143 min: $('#'+$(this).data('id')).data('min'), 144 max: $('#'+$(this).data('id')).data('max'), 145 step: $('#'+$(this).data('id')).data('range'), 146 slide: function( event, ui ) { 147 $('#'+$(this).data('id')).val(ui.value); 148 $('#'+$(this).data('id')+'-value').html(ui.value); 149 } 150 }); 151 }); 152 $('.slider-range-multi').each(function(){ 153 valmin = $('#'+$(this).data('id')).data('valmin'); 154 valmax = $('#'+$(this).data('id')).data('valmax'); 155 $(this).slider({ 156 range: true, 157 values: [valmin,valmax], 158 min: $('#'+$(this).data('id')).data('min'), 159 max: $('#'+$(this).data('id')).data('max'), 160 step: $('#'+$(this).data('id')).data('range'), 161 slide: function( event, ui ) { 162 $('#'+$(this).data('id')).val(ui.values[0]+'->'+ui.values[1]); 163 $('#'+$(this).data('id')+'-value').html(ui.values[0]+'->'+ui.values[1]); 164 } 165 }); 166 }); 167 $('.spinner_plus').click(function(){ 168 spinner_value = parseInt($('#'+$(this).data('id')).val()); 169 maxval = parseInt($('#'+$(this).data('id')).data('max')); 170 range = parseInt($('#'+$(this).data('id')).data('range')); 171 if(maxval > (spinner_value+range)){ 172 $('#'+$(this).data('id')).val(parseInt(spinner_value)+range); 173 }else{ 174 $('#'+$(this).data('id')).val(parseInt(maxval)); 175 } 176 }); 177 $('.spinner_sub').click(function(){ 178 spinner_value = parseInt($('#'+$(this).data('id')).val()); 179 minval = parseInt($('#'+$(this).data('id')).data('min')); 180 range = parseInt($('#'+$(this).data('id')).data('range')); 181 if(minval < (spinner_value-range)){ 182 $('#'+$(this).data('id')).val(parseInt(spinner_value)-range); 183 }else{ 184 $('#'+$(this).data('id')).val(parseInt(minval)); 185 } 186 }); 187 $('.onoffswitch-checkbox').change(function(){ 188 if($(this).is(':checked')){ 189 $(this).parents('.onoffswitch').find('.onoffswitch-label').addClass('onoffswitch-active'); 190 }else{ 191 $(this).parents('.onoffswitch').find('.onoffswitch-label').removeClass('onoffswitch-active'); 192 } 193 }); 194 $('.onoffswitch-checkbox').each(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 function getDoc(frame) { 202 var doc = null; 203 try { 204 if (frame.contentWindow) { 205 doc = frame.contentWindow.document; 206 } 207 } catch (err) {} 208 if (doc) { 209 return doc; 210 } 211 try { 212 doc = frame.contentDocument ? frame.contentDocument : frame.document; 213 } catch (err) { 214 doc = frame.document; 215 } 216 return doc; 217 } 218 $(".gformbuilderpro_form form").submit(function(e) { 219 if(!$(this).hasClass('form_using_ajax')){ 220 if($('#product_page_product_id').length > 0 && $('#idCombination').length > 0 && $('.hidden_productatt').length > 0){ 221 $('.hidden_productatt').val($('#product_page_product_id').val()+'-'+$('#idCombination').val()); 222 } 223 } 224 }); 225 $(".gformbuilderpro_form form.form_using_ajax").submit(function(e) { 226 if($('#product_page_product_id').length > 0 && $('#idCombination').length > 0 && $('.hidden_productatt').length > 0){ 227 $('.hidden_productatt').val($('#product_page_product_id').val()+'-'+$('#idCombination').val()); 228 } 229 var formsubmit = $(this); 230 if (typeof tinymce != "undefined") { 231 tinymce.triggerSave(); 232 } 233 var formURL = formsubmit.attr("action"); 234 $(gformbuilderpro_overlay).appendTo(formsubmit); 235 if (window.FormData !== undefined) { 236 var formData = new FormData(this); 237 $.ajax({ 238 url: formURL, 239 type: 'POST', 240 data: formData, 241 mimeType: "multipart/form-data", 242 contentType: false, 243 cache: false, 244 processData: false, 245 success: function(data, textStatus, jqXHR) { 246 formsubmit.find('#gformbuilderpro_overlay').remove(); 247 var result = $.parseJSON(data); 248 if(formsubmit.find('.formajaxresult').length > 0){ 249 if(result.errors == '0') 250 formsubmit.find('.formajaxresult').html('<div class="success_box">'+result.thankyou+'</div>'); 251 else 252 formsubmit.find('.formajaxresult').html(result.thankyou); 253 }else{ 254 resulthtml = ''; 255 if(result.errors == '0') 256 resulthtml ='<div class="formajaxresult"><div class="success_box">'+result.thankyou+'</div><div>'; 257 else 258 resulthtml = '<div class="formajaxresult">'+result.thankyou+'<div>'; 259 $(resulthtml).insertBefore(formsubmit.find('.gformbuilderpro_content')); 260 } 261 $('html,body').animate({ 262 scrollTop: formsubmit.find('.formajaxresult').offset().top}, 263 'slow'); 264 if(result.autoredirect == true){ 265 setTimeout(function () { 266 window.location.href = result.redirect_link; 267 }, result.timedelay); 268 } 269 if (typeof grecaptcha != "undefined" && $('.g-recaptcha').length > 0) { 270 grecaptcha.reset(); 271 } 272 }, 273 error: function(jqXHR, textStatus, errorThrown) { 274 if (typeof grecaptcha != "undefined" && $('.g-recaptcha').length > 0) { 275 grecaptcha.reset(); 276 } 277 var err = eval("(" + jqXHR.responseText + ")"); 278 alert(err.Message); 279 280 } 281 }); 282 e.preventDefault(); 283 //e.unbind(); 284 } else { 285 var iframeId = 'unique' + (new Date().getTime()); 286 var iframe = $('<iframe src="javascript:false;" name="' + iframeId + '" />'); 287 iframe.hide(); 288 formsubmit.attr('target', iframeId); 289 iframe.appendTo('body'); 290 iframe.load(function(e) { 291 $('#gformbuilderpro_overlay').remove(); 292 var doc = getDoc(iframe[0]); 293 var docRoot = doc.body ? doc.body : doc.documentElement; 294 var data = docRoot.innerHTML; 295 var result = $.parseJSON(data); 296 if(formsubmit.find('.formajaxresult').length > 0){ 297 if(result.errors == '0') 298 formsubmit.find('.formajaxresult').html('<div class="success_box">'+result.thankyou+'</div>'); 299 else 300 formsubmit.find('.formajaxresult').html(result.thankyou); 301 }else{ 302 resulthtml = ''; 303 if(result.errors == '0') 304 resulthtml ='<div class="formajaxresult"><div class="success_box">'+result.thankyou+'</div><div>'; 305 else 306 resulthtml = '<div class="formajaxresult">'+result.thankyou+'<div>'; 307 $(resulthtml).insertBefore(formsubmit.find('.gformbuilderpro_content')); 308 } 309 $('html,body').animate({ 310 scrollTop: formsubmit.find('.formajaxresult').offset().top}, 311 'slow'); 312 if (typeof grecaptcha != "undefined") { 313 grecaptcha.reset(); 314 } 315 }); 316 } 317 }); 318 $('.color_box .mColorPickerinput').on('click',function(){ 319 id = $(this).attr('id'); 320 if($('#icp_'+id).length > 0){ 321 $('#icp_'+id).click(); 322 } 323 }); 324 325})
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.