Commit c806f56b authored by Яков's avatar Яков
Browse files

test

parent c8fd5491
<?php
require_once(dirname(__FILE__) . '/../config/ProjectConfiguration.class.php');
$configuration = ProjectConfiguration::getApplicationConfiguration('www', 'prod', true);
$configuration = ProjectConfiguration::getApplicationConfiguration('www', 'dev', true);
sfContext::createInstance($configuration)->dispatch();
......@@ -2663,6 +2663,47 @@ var imgUpload = {
}
};
var discount = {
submit: function(form){
form = $(form);
$.post(form.attr('action'), form.serialize(), function (html) {
$('.overlay_discount__item').html(html);
if ($(window).width() < 650) {
$('.header_mobile').addClass('discount');
$('.header_mobile').addClass('d3');
} else {
$($('.top_right')[1]).addClass('discount');
$($('.top_right')[1]).addClass('d3');
}
});
},
open:function (_this) {
if (_this)
{
$('#discount_offer').show();
$('#discount').hide();
offer_id = $(_this).attr('data-offer-id');
$('#discount_offer_id').val(offer_id);
}else
{
$('#discount').show();
$('#discount_offer').hide();
$('#discount_offer_id').val('');
}
var discountForm = $('.discount_form');
discountForm.removeClass('discount_form_done');
$('.overlay_discount').addClass('overlay_discount_active');
$('body').addClass('scroll_hidden');
$('body').addClass('overlay_discount_active');
discountForm.find('input[type="text"]').eq(0).focus();
},
close: function(){
$('.overlay_discount').removeClass('overlay_discount_active');
$('body').removeClass('scroll_hidden');
$('body').removeClass('overlay_discount_active');
}
};
var callback = {
submit: function(form){
form = $(form);
......@@ -2808,9 +2849,24 @@ var form_validator = {
function setUrlHash(hash) {
if ('replaceState' in window.history && window.location.hash !== hash) window.history.replaceState('', '', hash);
}
$(document).ready(function () {
//slider.init();
if ($('.phone_mask').length > 0) {
$('.phone_mask').mask("+7 (999) 999-9999");
}
$.ajax({
url: '/check_discount_term/',
dataType: 'json',
type: 'post',
success: function (data) {
if (data.status == 'success' && data.active_discount != 0) {
console.log('123');
if ($(window).width() < 650) {
$('.header_mobile').addClass('discount');
$('.header_mobile').addClass('d' + data.active_discount);
} else {
$($('.top_right')[1]).addClass('discount');
$($('.top_right')[1]).addClass('d' + data.active_discount);
}
}
}
})
});
User-agent: *
Allow: /i/
Disallow: /js/
Disallow: /css/
Disallow: /a/
User-agent: Googlebot
Allow: /
User-agent: Yandex
Allow: /i/
Disallow: /js/
Disallow: /css/
Disallow: /a/
Host: idivbanu.ru
Sitemap: http://idivbanu.ru/sitemap.xml
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment