bulletproftlink shell
bulletproftlink shell


Server : Apache
System : Linux copper.netcy.com 2.6.32-754.27.1.el6.centos.plus.x86_64 #1 SMP Thu Jan 30 13:54:25 UTC 2020 x86_64
User : montcaro ( 581)
PHP Version : 7.4.28
Disable Function : NONE
Directory :  /home/montcaro/public_html/sites/all/themes/basic/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 


Create directory:
Current File : /home/montcaro/public_html/sites/all/themes/basic/js/script.js
jQuery(document).ready(function($){

  $('#uc-cart-checkout-form #edit-continue').click(function(){
    var error = 0;
	var ret='<span class="error-label-line">заполните поле</span>';
	
    if($('#edit-panes-customer-primary-email').length>0){
	  $('.form-item-panes-customer-primary-email').find('.error-label-line').remove();
      var emailAddress = $('#edit-panes-customer-primary-email').val();
      var pattern = new RegExp(/^((\"[\w-\s]+\")|([\w-]+(?:\.[\w-]+)*)|(\"[\w-\s]+\")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
      if(!pattern.test(emailAddress)) {
        $('.form-item-panes-customer-primary-email').addClass('error');
		$('.form-item-panes-customer-primary-email').append(ret);
        error++;
      }else{
        $('.form-item-panes-customer-primary-email').removeClass('error');
		$('.form-item-panes-customer-primary-email').find('.error-label-line').remove();
      }
    } else {
      $('.form-item-panes-customer-primary-email').addClass('error');
	  $('.form-item-panes-customer-primary-email').append(ret);
      error++;
    };
	
	$('#billing-address-pane .form-item').each(function(){
		$(this).find('.error-label-line').remove();
		if ($(this).find('input').val() == ''){
			$(this).addClass('error');
			$(this).append(ret);
			error++;
		}else{
			$(this).removeClass('error');
			$(this).find('.error-label-line').remove();
		}
	});
	
	if (error > 0) {
	return false;
	}
  });

  $("#edit-panes-billing-billing-phone").mask("+7 (999) 999-99-99");
  $('#block-locale-language ul').removeClass('language-switcher-locale-url').addClass('lang');

	//Slider
	$('ul.carusel').carouFredSel({
		auto: false,
		prev: '#prev',
		next: '#next',
		pagination: "#pager",
		mousewheel: true,
		scroll: { fx: 'crossfade'}
	});

	$('ul.product_sl').carouFredSel({
		auto: false,
		prev: '#prev1',
		next: '#next1',
		pagination: "#pager1",
		mousewheel: true,
		scroll: { fx: 'crossfade'}
	});

	$('ul.pr_carusel').carouFredSel({
		auto: false,
		prev: '#prev2',
		next: '#next2',
		pagination: "#pager2",
		mousewheel: true,
		scroll: { fx: 'crossfade'}
	});

	// Выделяем первое слово в Именах врачей
	$('.product .uc_price, #uc-cart-view-form td.price .uc-price, .item .price, .buy_more li .price').each(function(index) {
		var firstWord = $(this).text().split(' ')[0];
		var replaceWord = "<strong>" + firstWord + "</strong>";
		var newString = $(this).html().replace(firstWord, replaceWord);
		$(this).html(newString);
	});

	// Выделяем первое слово в Именах врачей
	$('#uc-cart-view-form td.price .uc-price, .item .price, .buy_more li .price').each(function(index) {
		var firstWord = $(this).text().split(' ')[1];
		var replaceWord = "<strong>" + firstWord + "</strong>";
		var newString = $(this).html().replace(firstWord, replaceWord);
		$(this).html(newString);
	});


	$('.tabsi li.first').click(function() {
		$('.product .col-2.last').hide();
		$('.product .col-2.first').show();
		$(this).addClass('active');
		$('.tabsi li.last').removeClass('active');
	});

	$('.tabsi li.last').click(function() {
		$('.product .col-2.last').show();
		$('.product .col-2.first').hide()
		$(this).addClass('active');
		$('.tabsi li.first').removeClass('active');
	});

	$('.catalog-page .item').each(function (i) {
		if (i % 2 == 0) $(this).removeClass("two");  // This is the part that doesn't seem to work
	});




/* Thanks to CSS Tricks for pointing out this bit of jQuery
http://css-tricks.com/equal-height-blocks-in-rows/
It's been modified into a function called at page load and then each time the page is resized. One large modification was to remove the set height before each new calculation. */

equalheight = function(container){

var currentTallest = 0,
     currentRowStart = 0,
     rowDivs = new Array(),
     $el,
     topPosition = 0;
 $(container).each(function() {

   $el = $(this);
   $($el).height('auto')
   topPostion = $el.position().top;

   if (currentRowStart != topPostion) {
     for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
       rowDivs[currentDiv].height(currentTallest);
     }
     rowDivs.length = 0; // empty the array
     currentRowStart = topPostion;
     currentTallest = $el.height();
     rowDivs.push($el);
   } else {
     rowDivs.push($el);
     currentTallest = (currentTallest < $el.height()) ? ($el.height()) : (currentTallest);
  }
   for (currentDiv = 0 ; currentDiv < rowDivs.length ; currentDiv++) {
     rowDivs[currentDiv].height(currentTallest);
   }
 });
}

$(window).load(function() {
  equalheight('#cleection .col-1, #cleection .col-2, #cleection-3 .col-1, #cleection-3 .col-2, #collection-style .col-1, #collection-style .col-2, .item, .buy_more li ');
});


$(window).resize(function(){
  equalheight('#cleection .col-1, #cleection .col-2, #cleection-3 .col-1, #cleection-3 .col-2, #collection-style .col-1, #collection-style .col-2, .item, .buy_more li ');
});

/*
jQuery(document).ready(function() {    
		windowResize();   
		$(window).resize(windowResize); 
});  

function windowResize() {
  var height = document.body.clientHeight;   
  if(height>768){      
   // $('#collection-style p').css("margin-bottom","30%");
    $('#collection-style .cols').css("margin-top","35%");
  }else{
   //$('#collection-style p').css("margin-bottom","15%");
   $('#collection-style .cols').css("margin-top","8%");
  }
} 
*/

/* call google map */

 

//tabs
$(function() {
  $('ul.ld').each(function() {
    $(this).find('li').each(function(i) {
    
      $(this).click(function(){
        $(this).addClass('active').siblings().removeClass('active').parents('div.tabs').find('div.tabcontent').hide().end().find('div.tabcontent:eq('+i+')').fadeIn();
         	$(this).closest("li").find('span').next().addClass('show');
         	$(this).siblings().find('i').removeClass('show');
         	
         	
      });
    });
  });

});


$('.product #edit-qty').after('<span class="plus"><a href="#">+</a></span>');
$('.product #edit-qty').after('<span class="minus"><a href="#">-</a></span>');

/*test*/
$('.minus').click(function () {
	var $input = $(this).parent().find('input');
 	var count = parseInt($input.val()) - 1;
	count = count < 1 ? 1 : count;
	$input.val(count);
	$input.change();
 	return false;
});
$('.plus').click(function () {
	var $input = $(this).parent().find('input');
	$input.val(parseInt($input.val()) + 1);
	$input.change();
	return false;
});


$('.promo-page .col-2 .form-submit ').val('Купить');

});




Spamworldpro BIBIL Mini