parent
b94c2357f9
commit
b905640121
22 changed files with 2802 additions and 3046 deletions
@ -1,78 +1,27 @@ |
|||||||
var EXPO = EXPO || {}; //isolated namespace
|
var EXPO = EXPO || {}; //isolated namespace
|
||||||
EXPO.exposition = EXPO.exposition || {}; |
EXPO.exposition = EXPO.exposition || {}; |
||||||
if (EXPO.exposition.list){ |
if (EXPO.exposition.list){ |
||||||
console.warn('WARNING: EXPO.place.object is already defined!'); |
console.warn('WARNING: EXPO.place.object is already defined!'); |
||||||
}else { |
}else { |
||||||
|
|
||||||
EXPO.exposition.list = (function () { |
EXPO.exposition.list = (function () { |
||||||
// dependencies
|
// dependencies
|
||||||
var com = EXPO.common; |
var com = EXPO.common; |
||||||
|
|
||||||
// variables
|
// variables
|
||||||
var that = {}, |
var that = {}; |
||||||
Note = function (it, opt) { |
that.opt = {}; //свойства по умолчанию
|
||||||
this.opt = opt; |
|
||||||
this.DOMthis = it; |
|
||||||
this.DOMbutton = it.querySelector('.'+opt.buttonClass); |
|
||||||
this.DOMinput = it.querySelector('.'+opt.inputClass); |
|
||||||
this.inputName = this.DOMinput.getAttribute('name'); |
|
||||||
this.url = this.DOMbutton.getAttribute('href'); |
|
||||||
this._controller(); |
|
||||||
}; |
|
||||||
Note.prototype = { |
|
||||||
_init: function () { |
|
||||||
|
|
||||||
}, |
|
||||||
_controller: function () { |
|
||||||
var self = this; |
|
||||||
$(this.DOMinput).on('blur', function () { |
|
||||||
self.send(); |
|
||||||
}); |
|
||||||
$(this.DOMbutton).on('click', function () { |
|
||||||
return false; |
|
||||||
}); |
|
||||||
}, |
|
||||||
send: function () { |
|
||||||
var data = {}, |
|
||||||
response, |
|
||||||
self = this, |
|
||||||
handler = function (data) { |
|
||||||
if (data.success) { |
|
||||||
console.log('ok'); |
|
||||||
$(self.DOMbutton).addClass('active'); |
|
||||||
} else { |
|
||||||
console.log('data not send'); |
|
||||||
} |
|
||||||
|
|
||||||
}; |
|
||||||
data[this.inputName] = this.DOMinput.value; |
|
||||||
response = com.getRequest(data,this.url,handler); |
|
||||||
} |
|
||||||
}; |
|
||||||
|
|
||||||
that.opt = {}; //свойства по умолчанию
|
|
||||||
//private
|
//private
|
||||||
$(function () { |
$(function () { |
||||||
}); |
}); |
||||||
|
|
||||||
// methods
|
// methods
|
||||||
//инициализация общих свойств
|
//инициализация общих свойств
|
||||||
that.init = function (options) { |
that.init = function (options) { |
||||||
$.extend(this.opt, options); |
$.extend(this.opt, options); |
||||||
this.notes = []; |
com.opt.addCalendarText = this.opt.addCalendarText; |
||||||
var self = this; |
com.opt.removeCalendarText = this.opt.removeCalendarText; |
||||||
|
}; |
||||||
$('.'+this.opt.note.wrapClass).each(function () { |
return that; |
||||||
var note = new Note(this,self.opt.note); |
}()); |
||||||
self.notes.push(note); |
|
||||||
}); |
|
||||||
$('.'+this.opt.note.wrapDisabledClass).on('click', function () { |
|
||||||
$.fancybox.open('#pw-login'); |
|
||||||
return false; |
|
||||||
}); |
|
||||||
com.opt.addCalendarText = this.opt.addCalendarText; |
|
||||||
com.opt.removeCalendarText = this.opt.removeCalendarText; |
|
||||||
}; |
|
||||||
return that; |
|
||||||
}()); |
|
||||||
} |
} |
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,202 +1,154 @@ |
|||||||
var EXPO = EXPO || {}; //isolated namespace
|
var EXPO = EXPO || {}; //isolated namespace
|
||||||
EXPO.exposition = EXPO.exposition || {}; |
EXPO.exposition = EXPO.exposition || {}; |
||||||
if (EXPO.exposition.object){ |
if (EXPO.exposition.object){ |
||||||
console.warn('WARNING: EXPO.exposition.object is already defined!'); |
console.warn('WARNING: EXPO.exposition.object is already defined!'); |
||||||
}else { |
}else { |
||||||
|
|
||||||
EXPO.exposition.object = (function () { |
EXPO.exposition.object = (function () { |
||||||
// dependencies
|
// dependencies
|
||||||
var com = EXPO.common, |
var com = EXPO.common, |
||||||
$waiter; |
$waiter; |
||||||
// variables
|
// variables
|
||||||
var that = {}, |
var that = {}; |
||||||
Note = function (it, opt) { |
that.opt = {}; //свойства по умолчанию
|
||||||
this.opt = opt; |
|
||||||
this.DOMthis = it; |
|
||||||
this.DOMbutton = it.querySelector('.'+opt.buttonClass); |
|
||||||
this.DOMinput = it.querySelector('.'+opt.inputClass); |
|
||||||
this.inputName = this.DOMinput.getAttribute('name'); |
|
||||||
this.url = this.DOMbutton.getAttribute('href'); |
|
||||||
this._controller(); |
|
||||||
}; |
|
||||||
Note.prototype = { |
|
||||||
_init: function () { |
|
||||||
|
|
||||||
}, |
|
||||||
_controller: function () { |
|
||||||
var self = this; |
|
||||||
$(this.DOMinput).on('blur', function () { |
|
||||||
self.send(); |
|
||||||
}); |
|
||||||
$(this.DOMbutton).on('click', function () { |
|
||||||
return false; |
|
||||||
}); |
|
||||||
}, |
|
||||||
send: function () { |
|
||||||
var data = {}, |
|
||||||
response, |
|
||||||
self = this, |
|
||||||
handler = function (data) { |
|
||||||
if (data.success){ |
|
||||||
console.log('ok'); |
|
||||||
$(self.DOMbutton).addClass('active'); |
|
||||||
}else{ |
|
||||||
console.log('data not send'); |
|
||||||
} |
|
||||||
|
|
||||||
}; |
|
||||||
data[this.inputName] = this.DOMinput.value; |
|
||||||
response = com.getRequest(data,this.url,handler); |
|
||||||
} |
|
||||||
}; |
|
||||||
that.opt = {}; //свойства по умолчанию
|
|
||||||
//private
|
//private
|
||||||
$(function () { |
$(function () { |
||||||
$waiter = $('#wait-ajax:not(.absolute)').css({'z-index': '8031'}); |
$waiter = $('#wait-ajax:not(.absolute)').css({'z-index': '8031'}); |
||||||
}); |
}); |
||||||
|
|
||||||
// methods
|
// methods
|
||||||
//инициализация общих свойств
|
//инициализация общих свойств
|
||||||
that.init = function (options) { |
that.init = function (options) { |
||||||
$.extend(this.opt, options); |
$.extend(this.opt, options); |
||||||
var self = this, |
var self = this, |
||||||
$visitButtons = $('.'+this.opt.visit.activeClass+', .'+this.opt.visit.passiveClass); |
$visitButtons = $('.'+this.opt.visit.activeClass+', .'+this.opt.visit.passiveClass); |
||||||
this.notes = []; |
|
||||||
|
com.opt.addCalendarText = this.opt.addCalendarText; |
||||||
$('.'+this.opt.note.wrapClass).each(function () { |
com.opt.removeCalendarText = this.opt.removeCalendarText; |
||||||
var note = new Note(this,self.opt.note); |
/** |
||||||
self.notes.push(note); |
* visit buttons |
||||||
}); |
*/ |
||||||
$('.'+this.opt.note.wrapDisabledClass).on('click', function () { |
$visitButtons.off('click'); |
||||||
$.fancybox.open('#pw-login'); |
$visitButtons.on('click', function () { |
||||||
return false; |
if ($(this).hasClass(self.opt.visit.activeClass)){ |
||||||
}); |
|
||||||
com.opt.addCalendarText = this.opt.addCalendarText; |
/** |
||||||
com.opt.removeCalendarText = this.opt.removeCalendarText; |
* I plan to visit |
||||||
/** |
*/ |
||||||
* visit buttons |
$('.'+self.opt.visit.activeClass).hide().siblings('.'+self.opt.visit.passiveClass).show(); |
||||||
*/ |
|
||||||
$visitButtons.off('click'); |
$('#'+self.opt.visit.visitorsListId).append(self.opt.visit.currentHtml); |
||||||
$visitButtons.on('click', function () { |
$('#'+self.opt.visit.somebodyId).removeClass("hidden"); |
||||||
if ($(this).hasClass(self.opt.visit.activeClass)){ |
$('#'+self.opt.visit.nobodyId).addClass("hidden"); |
||||||
|
|
||||||
/** |
|
||||||
* I plan to visit |
}else{ |
||||||
*/ |
/** |
||||||
$('.'+self.opt.visit.activeClass).hide().siblings('.'+self.opt.visit.passiveClass).show(); |
* refuse to visit |
||||||
|
*/ |
||||||
$('#'+self.opt.visit.visitorsListId).append(self.opt.visit.currentHtml); |
$('.'+self.opt.visit.passiveClass).hide().siblings('.'+self.opt.visit.activeClass).show(); |
||||||
$('#'+self.opt.visit.somebodyId).removeClass("hidden"); |
$('#'+self.opt.visit.visitorsListId).children(".current").remove(); |
||||||
$('#'+self.opt.visit.nobodyId).addClass("hidden"); |
|
||||||
|
if($('#'+self.opt.visit.visitorsListId).children().length == 0){ |
||||||
|
|
||||||
}else{ |
$('#'+self.opt.visit.somebodyId).addClass("hidden"); |
||||||
/** |
$('#'+self.opt.visit.nobodyId).removeClass("hidden"); |
||||||
* refuse to visit |
} |
||||||
*/ |
|
||||||
$('.'+self.opt.visit.passiveClass).hide().siblings('.'+self.opt.visit.activeClass).show(); |
} |
||||||
$('#'+self.opt.visit.visitorsListId).children(".current").remove(); |
return false; |
||||||
|
}); |
||||||
if($('#'+self.opt.visit.visitorsListId).children().length == 0){ |
/** |
||||||
|
* advertise form validation |
||||||
$('#'+self.opt.visit.somebodyId).addClass("hidden"); |
*/ |
||||||
$('#'+self.opt.visit.nobodyId).removeClass("hidden"); |
$('#'+this.opt.advertise.id).on("submit", function () { |
||||||
} |
var formData = $(this).serialize(), |
||||||
|
formUrl = $(this).attr("action"), |
||||||
} |
$form = $(this), |
||||||
return false; |
/** |
||||||
}); |
* executes after AJAX get request is complete |
||||||
/** |
* @param data - data recieved from server ex |
||||||
* advertise form validation |
*/ |
||||||
*/ |
handler = function (data) { |
||||||
$('#'+this.opt.advertise.id).on("submit", function () { |
var clearValue = function () { |
||||||
var formData = $(this).serialize(), |
$('.err',$form).removeClass("err"); |
||||||
formUrl = $(this).attr("action"), |
$('.pwf-msg',$form).text(''); |
||||||
$form = $(this), |
}; |
||||||
/** |
if (data.success !== true){ |
||||||
* executes after AJAX get request is complete |
clearValue(); |
||||||
* @param data - data recieved from server ex
|
for (var k in data.errors){ |
||||||
*/ |
if (data.errors.hasOwnProperty(k)) { |
||||||
handler = function (data) { |
$('input[name="'+k+'"]',$form) |
||||||
var clearValue = function () { |
.closest(".required").addClass("err") |
||||||
$('.err',$form).removeClass("err"); |
.siblings(".pwf-msg").text(data.errors[k]); |
||||||
$('.pwf-msg',$form).text(''); |
} |
||||||
}; |
} |
||||||
if (data.success != true){ |
|
||||||
clearValue(); |
}else{ |
||||||
for (var k in data.errors){ |
clearValue(); |
||||||
if (data.errors.hasOwnProperty(k)) { |
|
||||||
$('input[name="'+k+'"]',$form) |
|
||||||
.closest(".required").addClass("err") |
|
||||||
.siblings(".pwf-msg").text(data.errors[k]); |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
}else{ |
|
||||||
clearValue(); |
|
||||||
dataLayer.push({'event': 'advmemberform'}); |
dataLayer.push({'event': 'advmemberform'}); |
||||||
$('input:text',$form).val(''); |
$('input:text',$form).val(''); |
||||||
$.fancybox.close(); |
$.fancybox.close(); |
||||||
|
|
||||||
} |
} |
||||||
$waiter.hide(); |
$waiter.hide(); |
||||||
}; |
}; |
||||||
$waiter.show(); |
$waiter.show(); |
||||||
com.postRequest(formData,formUrl,handler); |
com.postRequest(formData,formUrl,handler); |
||||||
return false; |
return false; |
||||||
}); |
}); |
||||||
|
|
||||||
/** |
/** |
||||||
* event news subscribe form validation |
* event news subscribe form validation |
||||||
*/ |
*/ |
||||||
$('#'+this.opt.event_news_subscribe.id).on("submit", function () { |
$('#'+this.opt.event_news_subscribe.id).on("submit", function () { |
||||||
var formData = $(this).serialize(), |
var formData = $(this).serialize(), |
||||||
formUrl = $(this).attr("action"), |
formUrl = $(this).attr("action"), |
||||||
$form = $(this), |
$form = $(this), |
||||||
/** |
/** |
||||||
* executes after AJAX get request is complete |
* executes after AJAX get request is complete |
||||||
* @param data - data recieved from server ex |
* @param data - data recieved from server ex |
||||||
*/ |
*/ |
||||||
handler = function (data) { |
handler = function (data) { |
||||||
var clearValue = function () { |
var clearValue = function () { |
||||||
$('.err',$form).removeClass("err"); |
$('.err',$form).removeClass("err"); |
||||||
$('.pwf-msg',$form).text(''); |
$('.pwf-msg',$form).text(''); |
||||||
}; |
}; |
||||||
if (data.success != true){ |
if (data.success != true){ |
||||||
clearValue(); |
clearValue(); |
||||||
for (var k in data.errors){ |
for (var k in data.errors){ |
||||||
console.log(data.errors.hasOwnProperty(k)); |
console.log(data.errors.hasOwnProperty(k)); |
||||||
console.log(k); |
console.log(k); |
||||||
if (data.errors.hasOwnProperty(k)) { |
if (data.errors.hasOwnProperty(k)) { |
||||||
$('input[name="'+k+'"]',$form) |
$('input[name="'+k+'"]',$form) |
||||||
.closest(".required").addClass("err") |
.closest(".required").addClass("err") |
||||||
.siblings(".pwf-msg").text(data.errors[k]); |
.siblings(".pwf-msg").text(data.errors[k]); |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
}else{ |
}else{ |
||||||
clearValue(); |
clearValue(); |
||||||
dataLayer.push({'event': 'event-news-subscribe-form'}); |
dataLayer.push({'event': 'event-news-subscribe-form'}); |
||||||
$('input:text',$form).val(''); |
$('input:text',$form).val(''); |
||||||
$('p#success').show(); |
$('p#success').show(); |
||||||
if (data.sent == true) { |
if (data.sent == true) { |
||||||
window.location = data.redirect_url; |
window.location = data.redirect_url; |
||||||
} else { |
} else { |
||||||
window.setTimeout(function () { |
window.setTimeout(function () { |
||||||
$.fancybox.close(); |
$.fancybox.close(); |
||||||
}, 1000); |
}, 1000); |
||||||
} |
} |
||||||
|
|
||||||
|
|
||||||
} |
} |
||||||
$waiter.hide(); |
$waiter.hide(); |
||||||
}; |
}; |
||||||
$waiter.show(); |
$waiter.show(); |
||||||
com.postRequest(formData,formUrl,handler); |
com.postRequest(formData,formUrl,handler); |
||||||
return false; |
return false; |
||||||
}); |
}); |
||||||
|
|
||||||
}; |
}; |
||||||
return that; |
return that; |
||||||
}()); |
}()); |
||||||
} |
} |
||||||
|
|||||||
@ -1,74 +0,0 @@ |
|||||||
var EXPO = EXPO || {}; //isolated namespace
|
|
||||||
if (EXPO.index) { |
|
||||||
console.warn('WARNING: EXPO.eventsFeed is already defined!'); |
|
||||||
} else { |
|
||||||
EXPO.index = (function () { |
|
||||||
// variables
|
|
||||||
var that = {}; |
|
||||||
|
|
||||||
//default module setting
|
|
||||||
that.opt = {}; |
|
||||||
//dependence's
|
|
||||||
var com = EXPO.common; |
|
||||||
//private
|
|
||||||
var Note = function (it, opt) { |
|
||||||
this.opt = opt; |
|
||||||
this.DOMthis = it; |
|
||||||
this.DOMbutton = it.querySelector('.'+opt.buttonClass); |
|
||||||
this.DOMinput = it.querySelector('.'+opt.inputClass); |
|
||||||
this.inputName = this.DOMinput.getAttribute('name'); |
|
||||||
this.url = this.DOMbutton.getAttribute('href'); |
|
||||||
this._controller(); |
|
||||||
}; |
|
||||||
Note.prototype = { |
|
||||||
_init: function () { |
|
||||||
|
|
||||||
}, |
|
||||||
_controller: function () { |
|
||||||
var self = this; |
|
||||||
$(this.DOMinput).on('blur', function () { |
|
||||||
self.send(); |
|
||||||
}); |
|
||||||
$(this.DOMbutton).on('click', function () { |
|
||||||
return false; |
|
||||||
}); |
|
||||||
}, |
|
||||||
send: function () { |
|
||||||
var data = {}, |
|
||||||
response, |
|
||||||
self = this, |
|
||||||
handler = function (data) { |
|
||||||
if (data.success){ |
|
||||||
console.log('ok'); |
|
||||||
$(self.DOMbutton).addClass('active'); |
|
||||||
}else{ |
|
||||||
console.log('data not send'); |
|
||||||
} |
|
||||||
|
|
||||||
}; |
|
||||||
data[this.inputName] = this.DOMinput.value; |
|
||||||
response = com.getRequest(data,this.url,handler); |
|
||||||
} |
|
||||||
}; |
|
||||||
|
|
||||||
///////////////////////////
|
|
||||||
//инициализация общих свойств
|
|
||||||
that.init = function (options) { |
|
||||||
// settings extending
|
|
||||||
$.extend(this.opt, options); |
|
||||||
// begin of initialization
|
|
||||||
var self = this; |
|
||||||
this.notes = []; |
|
||||||
$('.'+this.opt.note.wrapClass).each(function () { |
|
||||||
var note = new Note(this,self.opt.note); |
|
||||||
self.notes.push(note); |
|
||||||
}); |
|
||||||
$('.'+this.opt.note.wrapDisabledClass).on('click', function () { |
|
||||||
$.fancybox.open('#pw-login'); |
|
||||||
return false; |
|
||||||
}); |
|
||||||
|
|
||||||
}; |
|
||||||
return that; |
|
||||||
}()); |
|
||||||
} |
|
||||||
@ -1 +1 @@ |
|||||||
var EXPO=EXPO||{};EXPO.exposition=EXPO.exposition||{},EXPO.exposition.list?console.warn("WARNING: EXPO.place.object is already defined!"):EXPO.exposition.list=function(){var t=EXPO.common,n={},o=function(t,n){this.opt=n,this.DOMthis=t,this.DOMbutton=t.querySelector("."+n.buttonClass),this.DOMinput=t.querySelector("."+n.inputClass),this.inputName=this.DOMinput.getAttribute("name"),this.url=this.DOMbutton.getAttribute("href"),this._controller()};return o.prototype={_init:function(){},_controller:function(){var t=this;$(this.DOMinput).on("blur",function(){t.send()}),$(this.DOMbutton).on("click",function(){return!1})},send:function(){var n,o={},i=this,e=function(t){t.success?(console.log("ok"),$(i.DOMbutton).addClass("active")):console.log("data not send")};o[this.inputName]=this.DOMinput.value,n=t.getRequest(o,this.url,e)}},n.opt={},$(function(){}),n.init=function(n){$.extend(this.opt,n),this.notes=[];var i=this;$("."+this.opt.note.wrapClass).each(function(){var t=new o(this,i.opt.note);i.notes.push(t)}),$("."+this.opt.note.wrapDisabledClass).on("click",function(){return $.fancybox.open("#pw-login"),!1}),t.opt.addCalendarText=this.opt.addCalendarText,t.opt.removeCalendarText=this.opt.removeCalendarText},n}(); |
var EXPO=EXPO||{};EXPO.exposition=EXPO.exposition||{},EXPO.exposition.list?console.warn("WARNING: EXPO.place.object is already defined!"):EXPO.exposition.list=function(){var t=EXPO.common,e={};return e.opt={},$(function(){}),e.init=function(e){$.extend(this.opt,e),t.opt.addCalendarText=this.opt.addCalendarText,t.opt.removeCalendarText=this.opt.removeCalendarText},e}(); |
||||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@ |
|||||||
var EXPO=EXPO||{};EXPO.exposition=EXPO.exposition||{},EXPO.exposition.object?console.warn("WARNING: EXPO.exposition.object is already defined!"):EXPO.exposition.object=function(){var t,s=EXPO.common,i={},e=function(t,s){this.opt=s,this.DOMthis=t,this.DOMbutton=t.querySelector("."+s.buttonClass),this.DOMinput=t.querySelector("."+s.inputClass),this.inputName=this.DOMinput.getAttribute("name"),this.url=this.DOMbutton.getAttribute("href"),this._controller()};return e.prototype={_init:function(){},_controller:function(){var t=this;$(this.DOMinput).on("blur",function(){t.send()}),$(this.DOMbutton).on("click",function(){return!1})},send:function(){var t,i={},e=this,o=function(t){t.success?(console.log("ok"),$(e.DOMbutton).addClass("active")):console.log("data not send")};i[this.inputName]=this.DOMinput.value,t=s.getRequest(i,this.url,o)}},i.opt={},$(function(){t=$("#wait-ajax:not(.absolute)").css({"z-index":"8031"})}),i.init=function(i){$.extend(this.opt,i);var o=this,n=$("."+this.opt.visit.activeClass+", ."+this.opt.visit.passiveClass);this.notes=[],$("."+this.opt.note.wrapClass).each(function(){var t=new e(this,o.opt.note);o.notes.push(t)}),$("."+this.opt.note.wrapDisabledClass).on("click",function(){return $.fancybox.open("#pw-login"),!1}),s.opt.addCalendarText=this.opt.addCalendarText,s.opt.removeCalendarText=this.opt.removeCalendarText,n.off("click"),n.on("click",function(){return $(this).hasClass(o.opt.visit.activeClass)?($("."+o.opt.visit.activeClass).hide().siblings("."+o.opt.visit.passiveClass).show(),$("#"+o.opt.visit.visitorsListId).append(o.opt.visit.currentHtml),$("#"+o.opt.visit.somebodyId).removeClass("hidden"),$("#"+o.opt.visit.nobodyId).addClass("hidden")):($("."+o.opt.visit.passiveClass).hide().siblings("."+o.opt.visit.activeClass).show(),$("#"+o.opt.visit.visitorsListId).children(".current").remove(),0==$("#"+o.opt.visit.visitorsListId).children().length&&($("#"+o.opt.visit.somebodyId).addClass("hidden"),$("#"+o.opt.visit.nobodyId).removeClass("hidden"))),!1}),$("#"+this.opt.advertise.id).on("submit",function(){var i=$(this).serialize(),e=$(this).attr("action"),o=$(this),n=function(s){var i=function(){$(".err",o).removeClass("err"),$(".pwf-msg",o).text("")};if(1!=s.success){i();for(var e in s.errors)s.errors.hasOwnProperty(e)&&$('input[name="'+e+'"]',o).closest(".required").addClass("err").siblings(".pwf-msg").text(s.errors[e])}else i(),dataLayer.push({event:"advmemberform"}),$("input:text",o).val(""),$.fancybox.close();t.hide()};return t.show(),s.postRequest(i,e,n),!1}),$("#"+this.opt.event_news_subscribe.id).on("submit",function(){var i=$(this).serialize(),e=$(this).attr("action"),o=$(this),n=function(s){var i=function(){$(".err",o).removeClass("err"),$(".pwf-msg",o).text("")};if(1!=s.success){i();for(var e in s.errors)console.log(s.errors.hasOwnProperty(e)),console.log(e),s.errors.hasOwnProperty(e)&&$('input[name="'+e+'"]',o).closest(".required").addClass("err").siblings(".pwf-msg").text(s.errors[e])}else i(),dataLayer.push({event:"event-news-subscribe-form"}),$("input:text",o).val(""),$("p#success").show(),1==s.sent?window.location=s.redirect_url:window.setTimeout(function(){$.fancybox.close()},1e3);t.hide()};return t.show(),s.postRequest(i,e,n),!1})},i}(); |
var EXPO=EXPO||{};EXPO.exposition=EXPO.exposition||{},EXPO.exposition.object?console.warn("WARNING: EXPO.exposition.object is already defined!"):EXPO.exposition.object=function(){var s,t=EXPO.common,e={};return e.opt={},$(function(){s=$("#wait-ajax:not(.absolute)").css({"z-index":"8031"})}),e.init=function(e){$.extend(this.opt,e);var i=this,o=$("."+this.opt.visit.activeClass+", ."+this.opt.visit.passiveClass);t.opt.addCalendarText=this.opt.addCalendarText,t.opt.removeCalendarText=this.opt.removeCalendarText,o.off("click"),o.on("click",function(){return $(this).hasClass(i.opt.visit.activeClass)?($("."+i.opt.visit.activeClass).hide().siblings("."+i.opt.visit.passiveClass).show(),$("#"+i.opt.visit.visitorsListId).append(i.opt.visit.currentHtml),$("#"+i.opt.visit.somebodyId).removeClass("hidden"),$("#"+i.opt.visit.nobodyId).addClass("hidden")):($("."+i.opt.visit.passiveClass).hide().siblings("."+i.opt.visit.activeClass).show(),$("#"+i.opt.visit.visitorsListId).children(".current").remove(),0==$("#"+i.opt.visit.visitorsListId).children().length&&($("#"+i.opt.visit.somebodyId).addClass("hidden"),$("#"+i.opt.visit.nobodyId).removeClass("hidden"))),!1}),$("#"+this.opt.advertise.id).on("submit",function(){var e=$(this).serialize(),i=$(this).attr("action"),o=$(this),r=function(t){var e=function(){$(".err",o).removeClass("err"),$(".pwf-msg",o).text("")};if(t.success!==!0){e();for(var i in t.errors)t.errors.hasOwnProperty(i)&&$('input[name="'+i+'"]',o).closest(".required").addClass("err").siblings(".pwf-msg").text(t.errors[i])}else e(),dataLayer.push({event:"advmemberform"}),$("input:text",o).val(""),$.fancybox.close();s.hide()};return s.show(),t.postRequest(e,i,r),!1}),$("#"+this.opt.event_news_subscribe.id).on("submit",function(){var e=$(this).serialize(),i=$(this).attr("action"),o=$(this),r=function(t){var e=function(){$(".err",o).removeClass("err"),$(".pwf-msg",o).text("")};if(1!=t.success){e();for(var i in t.errors)console.log(t.errors.hasOwnProperty(i)),console.log(i),t.errors.hasOwnProperty(i)&&$('input[name="'+i+'"]',o).closest(".required").addClass("err").siblings(".pwf-msg").text(t.errors[i])}else e(),dataLayer.push({event:"event-news-subscribe-form"}),$("input:text",o).val(""),$("p#success").show(),1==t.sent?window.location=t.redirect_url:window.setTimeout(function(){$.fancybox.close()},1e3);s.hide()};return s.show(),t.postRequest(e,i,r),!1})},e}(); |
||||||
@ -1 +0,0 @@ |
|||||||
var EXPO=EXPO||{};EXPO.index?console.warn("WARNING: EXPO.eventsFeed is already defined!"):EXPO.index=function(){var t={};t.opt={};var n=EXPO.common,i=function(t,n){this.opt=n,this.DOMthis=t,this.DOMbutton=t.querySelector("."+n.buttonClass),this.DOMinput=t.querySelector("."+n.inputClass),this.inputName=this.DOMinput.getAttribute("name"),this.url=this.DOMbutton.getAttribute("href"),this._controller()};return i.prototype={_init:function(){},_controller:function(){var t=this;$(this.DOMinput).on("blur",function(){t.send()}),$(this.DOMbutton).on("click",function(){return!1})},send:function(){var t,i={},o=this,e=function(t){t.success?(console.log("ok"),$(o.DOMbutton).addClass("active")):console.log("data not send")};i[this.inputName]=this.DOMinput.value,t=n.getRequest(i,this.url,e)}},t.init=function(t){$.extend(this.opt,t);var n=this;this.notes=[],$("."+this.opt.note.wrapClass).each(function(){var t=new i(this,n.opt.note);n.notes.push(t)}),$("."+this.opt.note.wrapDisabledClass).on("click",function(){return $.fancybox.open("#pw-login"),!1})},t}(); |
|
||||||
Loading…
Reference in new issue