parent
3e94c98384
commit
3ec81842a0
32 changed files with 1005 additions and 300 deletions
@ -1,50 +1,55 @@ |
||||
{% load static %} |
||||
{% load i18n %} |
||||
|
||||
<div id="pw-advertise" class="popup-window" style="display: none;"> |
||||
<header class="clearfix"> |
||||
<div class="pw-title">{% trans 'Рекламировать участника' %}</div> |
||||
</header> |
||||
<div class="pw-body clearfix"> |
||||
<form id="advert-member-form" method="post" class="pw-form" action="{{ form.action }}">{% csrf_token %} |
||||
<div class="pwf-line"> |
||||
<div class="pwf-field required"> |
||||
{{ form.person_inf }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
<div class="pwf-line"> |
||||
<div class="pwf-field required"> |
||||
{{ form.person }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
<div id="pw-advertise" class="popup-window advertise-window" style="display: none;"> |
||||
<section> |
||||
|
||||
<div class="pwf-line"> |
||||
<div class="pwf-field required"> |
||||
{{ form.phone }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
<header class="clearfix"> |
||||
<h2 class="pw-title">{% trans 'Рекламировать участника' %}</h2> |
||||
<p><strong>Вы хотите начать привлекать целевых клиентов еще до начала выставки?</strong> Размещение рекламы на странице выставки на <span class="bd-dashed">Expomap</span> - отличная возможность для этого!</p> |
||||
<p>Оставьте свои контакты, и мы вышлем Вам информацию о вариантах и ценах!</p> |
||||
</header> |
||||
<div class="pw-body clearfix"> |
||||
<form id="advert-member-form" method="post" class="pw-form" action="{{ form.action }}">{% csrf_token %} |
||||
<div class="pwf-line"> |
||||
<div class="pwf-field required"> |
||||
{{ form.person_inf }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
<div class="pwf-line"> |
||||
<div class="pwf-field required"> |
||||
{{ form.person }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
|
||||
<div class="pwf-line"> |
||||
<div class="pwf-field select-input required"> |
||||
{{ form.country }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
<div class="pwf-line"> |
||||
<div class="pwf-field required"> |
||||
{{ form.phone }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
|
||||
<div class="pwf-line"> |
||||
<div class="pwf-field select-input required"> |
||||
{{ form.country }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
|
||||
<div class="pwf-line"> |
||||
<div class="pwf-field select-input required"> |
||||
{{ form.city }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
<div class="pwf-buttons-line"> |
||||
<button type="submit" class="icon-check">{% trans 'Рекламировать' %}</button> |
||||
</div> |
||||
|
||||
</form> |
||||
</div> |
||||
<div class="pwf-line"> |
||||
<div class="pwf-field select-input required"> |
||||
{{ form.city }} |
||||
</div> |
||||
<div class="pwf-msg"></div> |
||||
</div> |
||||
<div class="pwf-buttons-line"> |
||||
<button type="submit" class="icon-check">{% trans 'Рекламировать' %}</button> |
||||
</div> |
||||
|
||||
</form> |
||||
</div> |
||||
</section> |
||||
</div> |
||||
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@ |
||||
/*! normalize.css v1.1.2 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}html,button,input,select,textarea{font-family:sans-serif}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em;margin:.83em 0}h3{font-size:1.17em;margin:1em 0}h4{font-size:1em;margin:1.33em 0}h5{font-size:.83em;margin:1.67em 0}h6{font-size:.67em;margin:2.33em 0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}blockquote{margin:1em 40px}dfn{font-style:italic}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}mark{background:#ff0;color:#000}p,pre{margin:1em 0}code,kbd,pre,samp{font-family:monospace,serif;_font-family:'courier new',monospace;font-size:1em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}q{quotes:none}q:before,q:after{content:'';content:none}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}dl,menu,ol,ul{margin:1em 0}dd{margin:0 0 0 40px}menu,ol,ul{padding:0 0 0 40px}nav ul,nav ol{list-style:none;list-style-image:none}img{border:0;-ms-interpolation-mode:bicubic}svg:not(:root){overflow:hidden}figure{margin:0}form{margin:0}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;*overflow:visible}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;*height:13px;*width:13px}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0} |
||||
@ -1 +0,0 @@ |
||||
.c-select-box.places .csb-title ul.ui-autocomplete{background:none repeat scroll 0 0 #fff;border:1px solid #ccc;margin-left:0;z-index:1020}.c-select-box.places .csb-title ul.ui-autocomplete li{margin-bottom:5px}.places-list ul li a:before,.topics-list ul li a:before{content:"";display:block;height:8px;left:-12px;position:absolute;top:4px;width:8px;z-index:1010;background:url('../img/sprites.png') no-repeat -83px -16px}.places-list ul li.active a:before,.topics-list ul li.active a:before{content:"";display:block;height:8px;left:-12px;position:absolute;top:3px;width:8px;z-index:1010;background:url('../img/sprites.png') no-repeat -86px -24px}.c-select-box-wrap .custom-radio-check:before{content:'';width:13px;height:13px;display:block;position:absolute;top:3px;left:-15px;z-index:1010;background:url('../img/sprites.png') no-repeat -345px -135px}.c-select-box-wrap .custom-radio-check.active:before{content:'';width:13px;height:13px;display:block;position:absolute;top:4px;left:-15px;z-index:1010;background:url('../img/sprites.png') no-repeat -46px -16px}.ac-custom-message{background:none repeat scroll 0 0 #fff;border:1px solid #ccccdc;border-radius:5px;padding:5px 10px 5px 25px;position:absolute;z-index:1415;display:none}.ac-custom-message span:before{background:url("../img/sprites.png") no-repeat scroll -106px -16px #fff;content:"";display:block;height:10px;left:7px;position:absolute;top:19px;width:13px;z-index:1416} |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 52 KiB |
@ -0,0 +1,109 @@ |
||||
var EXPO = EXPO || {}; //isolated namespace
|
||||
if (EXPO.newsFilter) { |
||||
console.warn('WARNING: EXPO.newsFilter is already defined!'); |
||||
} else { |
||||
EXPO.newsFilter = (function () { |
||||
/** |
||||
* private (visible inside this module only) variables |
||||
*/ |
||||
/** |
||||
* @type {Object} - module API interafce realization |
||||
*/ |
||||
var that = {}; |
||||
/** |
||||
* @type {Object} default setting |
||||
*/ |
||||
that.opt = {}; |
||||
/** |
||||
* dependencies.Place where you can switch on dependencies for module |
||||
* @type {EXPO.common|*} - mostly used in project functions and data (block.common.js) |
||||
*/ |
||||
var com = EXPO.common; |
||||
|
||||
/** |
||||
* current module general initialization |
||||
* @param {Object} options - options recieved from web page view |
||||
*/ |
||||
|
||||
|
||||
that.init = function (options) { |
||||
// settings extending
|
||||
$.extend(this.opt, options); |
||||
// begin of initialization
|
||||
var self = this; |
||||
|
||||
$(function () { |
||||
var $page = $(".news-filter-block"), |
||||
$theme = $('.custom-select.theme select', $page), |
||||
$tags = $(".custom-select.tags input", $page), |
||||
$form = $page.children("form"); |
||||
$theme.attr("multiple","multiple"); |
||||
$theme.select2({ |
||||
placeholder: self.opt.theme.placeholder, |
||||
width: '368px', |
||||
maximumSelectionSize: 3 |
||||
|
||||
|
||||
|
||||
}); |
||||
$tags.val('0'); |
||||
$tags.select2({ |
||||
placeholder: self.opt.tags.placeholder, |
||||
width: '368px', |
||||
multiple: true, |
||||
maximumSelectionSize: 5, |
||||
ajax: { |
||||
|
||||
url: self.opt.tags.url, |
||||
dataType: "json", |
||||
quietMillis: 200, |
||||
|
||||
data: function(term, page){ |
||||
var themes = $theme.val(); |
||||
if(!themes){ |
||||
themes = []; |
||||
} |
||||
return {term: term, |
||||
page: page, |
||||
themes: themes}; |
||||
}, |
||||
|
||||
results: function (data) { |
||||
var results = []; |
||||
|
||||
$.each(data, function(index, item){ |
||||
results.push({ |
||||
id: item.id, |
||||
text: item.label |
||||
}); |
||||
}); |
||||
return {results: results}; |
||||
} |
||||
}, |
||||
initSelection : function(element, callback) { |
||||
var data = [], |
||||
dataObjArr; |
||||
element.val(''); |
||||
if($.trim(element.attr('data-predifined')) != '' && $.trim(element.attr('data-predifined')) != '[]'){ |
||||
dataObjArr = JSON.parse(element.attr('data-predifined')); |
||||
callback(dataObjArr); |
||||
}else{ |
||||
$(" .custom-select.tags .select2-input").width(336).addClass('select2-default').val(self.opt.tags.placeholder); |
||||
|
||||
} |
||||
|
||||
} |
||||
|
||||
}); |
||||
$tags.on('change', function (e) { |
||||
$form.submit(); |
||||
}); |
||||
$theme.on('change', function (e) { |
||||
$form.submit(); |
||||
}); |
||||
}); |
||||
|
||||
}; |
||||
return that; |
||||
}()); |
||||
} |
||||
@ -0,0 +1 @@ |
||||
var EXPO=EXPO||{};EXPO.newsFilter?console.warn("WARNING: EXPO.newsFilter is already defined!"):EXPO.newsFilter=function(){var t={};t.opt={};EXPO.common;return t.init=function(t){$.extend(this.opt,t);var e=this;$(function(){var t=$(".news-filter-block"),i=$(".custom-select.theme select",t),a=$(".custom-select.tags input",t),l=t.children("form");i.attr("multiple","multiple"),i.select2({placeholder:e.opt.theme.placeholder,width:"368px",maximumSelectionSize:3}),a.val("0"),a.select2({placeholder:e.opt.tags.placeholder,width:"368px",multiple:!0,maximumSelectionSize:5,ajax:{url:e.opt.tags.url,dataType:"json",quietMillis:200,data:function(t,e){var a=i.val();return a||(a=[]),{term:t,page:e,themes:a}},results:function(t){var e=[];return $.each(t,function(t,i){e.push({id:i.id,text:i.label})}),{results:e}}},initSelection:function(t,i){var a;t.val(""),""!=$.trim(t.attr("data-predifined"))&&"[]"!=$.trim(t.attr("data-predifined"))?(a=JSON.parse(t.attr("data-predifined")),i(a)):$(" .custom-select.tags .select2-input").width(336).addClass("select2-default").val(e.opt.tags.placeholder)}}),a.on("change",function(){l.submit()}),i.on("change",function(){l.submit()})})},t}(); |
||||
@ -1 +1 @@ |
||||
var EXPO=EXPO||{};EXPO.registration=EXPO.registration||{},EXPO.registration.completion?console.warn("WARNING: EXPO.registration..completion is already defined!"):EXPO.registration.completion=function(){var e={},t=function(e){var t=$("#end-reg"),o="pwf-line",i=EXPO.common.opt.activeClass,r="phone",n="label",a=EXPO.common.opt.errMessageClass;if($("."+a,t).removeClass(i),e.success)location.reload();else{console.log(e);for(var s in e.errors)e.errors.hasOwnProperty(s)&&($itemWrap=$("#id_"+s).closest("."+o),$("."+a,$itemWrap).addClass(i).text(e.errors[s][0]),$itemWrap.hasClass(r)&&$("."+n,$itemWrap).hide())}},o=function(e){$("#id_country").val("159").select2({placeholder:"Ваша страна",width:e}),$("#id_city").select2({placeholder:"Ваш город",width:e,ajax:{url:"/city/get-city/",dataType:"json",quietMillis:200,data:function(e,t,o){var o=$("#id_country").val();return{term:e,page:t,country:o}},results:function(e){var t=[];return $.each(e,function(e,o){t.push({id:o.id,text:o.label})}),{results:t}}},initSelection:function(e,t){var o=$(e).val(),i=$(e).attr("data-init-text");t({id:o,text:i})}})};e.opt={};EXPO.common;return $(function(){$("body").addClass("body-fixed"),o("100%"),$("#id_code_country").select2({width:"95px"}),$.fancybox.open([{href:"#end-reg"}],{closeBtn:!1,closeClick:!1,modal:!0,scrolling:"no",helpers:{overlay:{closeClick:!1},locked:!0},keys:{close:null}}),$("#end-reg-form").on("submit",function(e){e.preventDefault();var o=$(this).attr("action"),i=$(this).serialize();$.post(o,i,t)})}),e.init=function(e){$.extend(this.opt,e)},e}(); |
||||
var EXPO=EXPO||{};EXPO.registration=EXPO.registration||{},EXPO.registration.completion?console.warn("WARNING: EXPO.registration..completion is already defined!"):EXPO.registration.completion=function(){var e={},t=function(e){var t=$("#end-reg"),o="pwf-line",i=EXPO.common.opt.activeClass,r="phone",n="label",a=EXPO.common.opt.errMessageClass;if($("."+a,t).removeClass(i),e.success)location=e.redirect;else{console.log(e);for(var s in e.errors)e.errors.hasOwnProperty(s)&&($itemWrap=$("#id_"+s).closest("."+o),$("."+a,$itemWrap).addClass(i).text(e.errors[s][0]),$itemWrap.hasClass(r)&&$("."+n,$itemWrap).hide())}},o=function(e){$("#id_country").val("159").select2({placeholder:"Ваша страна",width:e}),$("#id_city").select2({placeholder:"Ваш город",width:e,ajax:{url:"/city/get-city/",dataType:"json",quietMillis:200,data:function(e,t,o){var o=$("#id_country").val();return{term:e,page:t,country:o}},results:function(e){var t=[];return $.each(e,function(e,o){t.push({id:o.id,text:o.label})}),{results:t}}},initSelection:function(e,t){var o=$(e).val(),i=$(e).attr("data-init-text");t({id:o,text:i})}})};e.opt={};EXPO.common;return $(function(){$("body").addClass("body-fixed"),o("100%"),$("#id_code_country").select2({width:"95px"}),$.fancybox.open([{href:"#end-reg"}],{closeBtn:!1,closeClick:!1,modal:!0,scrolling:"no",helpers:{overlay:{closeClick:!1},locked:!0},keys:{close:null}}),$("#end-reg-form").on("submit",function(e){e.preventDefault();var o=$(this).attr("action"),i=$(this).serialize();$.post(o,i,t)})}),e.init=function(e){$.extend(this.opt,e)},e}(); |
||||
File diff suppressed because one or more lines are too long
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=EXPO.common,i={},s=function(t,i){this.opt=i,this.DOMthis=t,this.DOMbutton=t.querySelector("."+i.buttonClass),this.DOMinput=t.querySelector("."+i.inputClass),this.inputName=this.DOMinput.getAttribute("name"),this.url=this.DOMbutton.getAttribute("href"),this._controller()};return s.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 i,s={},o=this,e=function(t){t.success?(console.log("ok"),$(o.DOMbutton).addClass("active")):console.log("data not send")};s[this.inputName]=this.DOMinput.value,i=t.getRequest(s,this.url,e)}},i.opt={},i.init=function(i){$.extend(this.opt,i);var o=this,e=$("."+this.opt.visit.activeClass+", ."+this.opt.visit.passiveClass);this.notes=[],$("."+this.opt.note.wrapClass).each(function(){var t=new s(this,o.opt.note);o.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,e.off("click"),e.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})},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 t,i=EXPO.common,s={},o=function(t,i){this.opt=i,this.DOMthis=t,this.DOMbutton=t.querySelector("."+i.buttonClass),this.DOMinput=t.querySelector("."+i.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 t,s={},o=this,e=function(t){t.success?(console.log("ok"),$(o.DOMbutton).addClass("active")):console.log("data not send")};s[this.inputName]=this.DOMinput.value,t=i.getRequest(s,this.url,e)}},s.opt={},$(function(){t=$("#wait-ajax:not(.absolute)").css({"z-index":"8031"})}),s.init=function(s){$.extend(this.opt,s);var e=this,n=$("."+this.opt.visit.activeClass+", ."+this.opt.visit.passiveClass);this.notes=[],$("."+this.opt.note.wrapClass).each(function(){var t=new o(this,e.opt.note);e.notes.push(t)}),$("."+this.opt.note.wrapDisabledClass).on("click",function(){return $.fancybox.open("#pw-login"),!1}),i.opt.addCalendarText=this.opt.addCalendarText,i.opt.removeCalendarText=this.opt.removeCalendarText,n.off("click"),n.on("click",function(){return $(this).hasClass(e.opt.visit.activeClass)?($("."+e.opt.visit.activeClass).hide().siblings("."+e.opt.visit.passiveClass).show(),$("#"+e.opt.visit.visitorsListId).append(e.opt.visit.currentHtml),$("#"+e.opt.visit.somebodyId).removeClass("hidden"),$("#"+e.opt.visit.nobodyId).addClass("hidden")):($("."+e.opt.visit.passiveClass).hide().siblings("."+e.opt.visit.activeClass).show(),$("#"+e.opt.visit.visitorsListId).children(".current").remove(),0==$("#"+e.opt.visit.visitorsListId).children().length&&($("#"+e.opt.visit.somebodyId).addClass("hidden"),$("#"+e.opt.visit.nobodyId).removeClass("hidden"))),!1}),$("#"+this.opt.advertise.id).on("submit",function(){var s=$(this).serialize(),o=$(this).attr("action"),e=$(this),n=function(i){var s=function(){$(".err",e).removeClass("err"),$(".pwf-msg",e).text("")};if(1!=i.success){s();for(var o in i.errors)i.errors.hasOwnProperty(o)&&$('input[name="'+o+'"]',e).closest(".required").addClass("err").siblings(".pwf-msg").text(i.errors[o])}else s(),$("input:text",e).val(""),$.fancybox.close();t.hide()};return t.show(),i.postRequest(s,o,n),!1})},s}(); |
||||
@ -1 +1 @@ |
||||
var EXPO=EXPO||{};EXPO.place=EXPO.place||{},EXPO.place.object?console.warn("WARNING: EXPO.place.object is already defined!"):EXPO.place.object=function(){var t={},i=function(t,i){this.$annotation=$("."+t.annotationClass,i),this.$fullPart=$("."+t.fullPartClass,i),this.$readMore=$("."+t.readMoreClass,i),this.cutLength=t.cutLength,this.fullText,this.init()};return i.prototype={init:function(){var t=this,i=this.$annotation.html().slice(0,t.cutLength);this.fullText=this.$annotation.html(),this.$annotation.html(i+"..."),this.$fullPart.html(this.fullText)},showMore:function(){this.$readMore.hide(),this.$annotation.hide(),this.$fullPart.removeClass("hidden")},_cutAnnotation:function(){}},t.opt={},$(function(){}),t.init=function(t){$.extend(this.opt,t);var n=this;this.articles=[],$("."+n.opt.article.class).each(function(){var t=new i(n.opt.article,this);t.$readMore.on("click",function(){t.showMore()}),n.articles.push(t)})},t}(); |
||||
var EXPO=EXPO||{};EXPO.place=EXPO.place||{},EXPO.place.object?console.warn("WARNING: EXPO.place.object is already defined!"):EXPO.place.object=function(){var t={},n=function(t,n){this.$annotation=$("."+t.annotationClass,n),this.$fullPart=$("."+t.fullPartClass,n),this.$readMore=$("."+t.readMoreClass,n),this.cutLength=t.cutLength,this.fullText,this.init()};return n.prototype={init:function(){{var t=this;this.$annotation.text().slice(0,t.cutLength)}this.fullText=this.$annotation.html().trim(),this._setMoreLess(this.fullText,t.cutLength,10)},showMore:function(){this.$readMore.hide(),this.$annotation.hide(),this.$fullPart.removeClass("hidden")},_cutAnnotation:function(){},_setMoreLess:function(t,n,i){var a=t;if(!(a.length+i<n)){var e=a.substring(0,n),s='<span class="firstHalf">'+e+"</span>";this.$annotation.html(s),this.$annotation.find("p:last").append("..."),this.$fullPart.html(a)}}},t.opt={},$(function(){}),t.init=function(t){$.extend(this.opt,t);var i=this;this.articles=[],$("."+i.opt.article.class).each(function(){var t=new n(i.opt.article,this);t.$readMore.on("click",function(){t.showMore()}),i.articles.push(t)})},t}(); |
||||
@ -1 +1 @@ |
||||
var EXPO=EXPO||{};EXPO.profile=EXPO.profile||{},EXPO.profile.calendar?console.warn("WARNING: EXPO.profile.calendar is already defined!"):EXPO.profile.calendar=function(){var t=(EXPO.common,{});return t.opt={},$(function(){}),t.init=function(t){$.extend(this.opt,t);var e=this,s=$("#"+this.opt.scrollBoxId),n=$("#"+this.opt.calenadrId),a=(n.find("td."+this.opt.currentDayClass).index()*this.opt.cellWidth,$("#"+this.opt.scrollLeftId)),o=$("#"+this.opt.scrollRightId),r=$("."+this.opt.noEventsClass),l=$("."+this.opt.calendarToggleClass),i=this.opt.cellWidth*this.opt.cellsToScroll,c=0,d=function(){var t,s,n=0,a=0,o=e.opt.cellWidth,r=$("#"+e.opt.calenadrId),l=r.find("td."+e.opt.currentDayClass).index(),i=e.opt.cellsToScroll,c=r.find("."+e.opt.daysClass+" td").length;return e.stepWidth=i*o,e.calendarWidth=o*c,l>0?(l++,t=c/i,s=c/l,a=t-s,e.currentDay=l,a?(a=Math.floor(a-1),n=i*a*o):n=0):(e.currentDay=0,n=0),n};this.currentOffset=d(),this.$messages=[],$(function(){r.each(function(){$(this).attr("colspan")&&1!=$(this).attr("colspan")?$(this).width()>e.stepWidth&&e.$messages.push($(".message",$(this)).width(e.stepWidth).css({marginLeft:e.currentOffset+"px"})):$(this).find("."+e.opt.eventWrapClass).addClass("small")}),$("."+e.opt.eventsClass).each(function(){c++,3==c&&$(this).addClass("grey"),4==c&&($(this).addClass("grey"),c=0)})}),$(window).load(function(){s.mCustomScrollbar({axis:"y",horizontalScroll:!0,setLeft:"-"+EXPO.profile.calendar.currentOffset+"px",mouseWheel:{enable:!1},scrollButtons:{enable:!1},contentTouchScroll:!1,scrollInertia:1e3,timeout:0,advanced:{autoScrollOnFocus:!1,updateOnContentResize:!1,updateOnBrowserResize:!1},keyboard:{enable:!1}})}),a.on("click",function(){if(e.currentOffset>=e.stepWidth){e.currentOffset-=i,s.mCustomScrollbar("scrollTo","+="+i);for(var t=0;t<e.$messages.length;t++){var n=parseInt(e.$messages[t].inlineStyle("margin-left"));n>0&&e.$messages[t].css({marginLeft:e.currentOffset+"px"})}}}),o.on("click",function(){if(e.currentOffset+e.stepWidth<e.calendarWidth){e.currentOffset+=i,s.mCustomScrollbar("scrollTo","-="+i);for(var t=0;t<e.$messages.length;t++){var n=parseInt(e.$messages[t].inlineStyle("margin-left"));n+e.$messages[t].width()<e.calendarWidth&&e.$messages[t].css({marginLeft:e.currentOffset+"px"})}}}),l.on("click",function(){var t=$(this),e=t.closest(".ep-sect"),s=e.children("div.ep-sect-body");return e.hasClass("eps-opened")?(o.hide(),a.hide(),s.stop().animate({opacity:0},300,function(){e.removeClass("eps-opened")})):(o.show(),a.show(),s.stop().animate({opacity:1},300,function(){e.addClass("eps-opened")})),!1})},t}(); |
||||
var EXPO=EXPO||{};EXPO.profile=EXPO.profile||{},EXPO.profile.calendar?console.warn("WARNING: EXPO.profile.calendar is already defined!"):EXPO.profile.calendar=function(){var e=(EXPO.common,{});return e.opt={},$(function(){$("#btn_delete").on("click",function(e){e.preventDefault();var t=$("input[name=expo]:checkbox:checked").map(function(){return $(this).val()}).get(),s=$("input[name=conf]:checkbox:checked").map(function(){return $(this).val()}).get(),o=$("input[name=seminar]:checkbox:checked").map(function(){return $(this).val()}).get(),l=$("input[name=webinar]:checkbox:checked").map(function(){return $(this).val()}).get(),n={expo:JSON.stringify(t),conf:JSON.stringify(s),seminar:JSON.stringify(o),webinar:JSON.stringify(l)};$.get("/profile/calendar/remove/",n,function(e){e.success&&location.reload()})})}),e.init=function(e){$.extend(this.opt,e);var t=this,s=$("#"+this.opt.scrollBoxId),o=$("#"+this.opt.calenadrId),l=(o.find("td."+this.opt.currentDayClass).index()*this.opt.cellWidth,$("#"+this.opt.scrollLeftId)),n=$("#"+this.opt.scrollRightId),c=$("."+this.opt.noEventsClass),i=$("."+this.opt.calendarToggleClass),r=this.opt.cellWidth*this.opt.cellsToScroll,a=0,f=function(){var e,s,o=0,l=0,n=t.opt.cellWidth,c=$("#"+t.opt.calenadrId),i=c.find("td."+t.opt.currentDayClass).index(),r=t.opt.cellsToScroll,a=c.find("."+t.opt.daysClass+" td").length;return t.stepWidth=r*n,t.calendarWidth=n*a,i>0?(i++,e=a/r,s=a/i,l=e-s,t.currentDay=i,l?(l=Math.floor(l-1),o=r*l*n):o=0):(t.currentDay=0,o=0),o};this.$leftScroll=l,this.$rightScroll=n,this.currentOffset=f(),this.scrollStep=r,this.$scrollBox=s,this.$messages=[],$(function(){c.each(function(){$(this).attr("colspan")&&1!=$(this).attr("colspan")?$(this).width()>t.stepWidth&&t.$messages.push($(".message",$(this)).width(t.stepWidth).css({marginLeft:t.currentOffset+"px"})):$(this).find("."+t.opt.eventWrapClass).addClass("small")}),$("."+t.opt.eventsClass).each(function(){a++,3==a&&$(this).addClass("grey"),4==a&&($(this).addClass("grey"),a=0)})}),$(window).load(function(){s.mCustomScrollbar({axis:"y",horizontalScroll:!0,setLeft:"-"+EXPO.profile.calendar.currentOffset+"px",mouseWheel:{enable:!1},scrollButtons:{enable:!1},contentTouchScroll:!1,scrollInertia:1e3,timeout:0,advanced:{autoScrollOnFocus:!1,updateOnContentResize:!1,updateOnBrowserResize:!1},keyboard:{enable:!1},callbacks:{onScroll:function(){t.$leftScroll.off("click").one("click",function(){t.scrollLeft(t)}),t.$rightScroll.off("click").one("click",function(){t.scrollRight(t)})}}})}),l.one("click",function(){t.scrollLeft(t)}),n.one("click",function(){t.scrollRight(t)}),i.on("click",function(){var e=$(this),t=e.closest(".ep-sect"),s=t.children("div.ep-sect-body");return t.hasClass("eps-opened")?(n.hide(),l.hide(),s.stop().animate({opacity:0},300,function(){t.removeClass("eps-opened")})):(n.show(),l.show(),s.stop().animate({opacity:1},300,function(){t.addClass("eps-opened")})),!1})},e.scrollRight=function(e){return e||(e=this),e.$rightScroll.off("click"),e.currentOffset+e.stepWidth<e.calendarWidth&&(e.currentOffset+=e.scrollStep,console.log("!!! right scroll fired!"),e.$scrollBox.mCustomScrollbar("scrollTo","-="+e.scrollStep),e.offsetMessages()),!1},e.scrollLeft=function(e){return e||(e=this),e.$leftScroll.off("click"),e.currentOffset>=e.stepWidth&&(e.currentOffset-=e.scrollStep,console.log("!!! left scroll fired!"),e.$scrollBox.mCustomScrollbar("scrollTo","+="+e.scrollStep),e.offsetMessages(e)),!1},e.offsetMessages=function(e){e||(e=this);for(var t=0;t<e.$messages.length;t++){var s=parseInt(e.$messages[t].inlineStyle("margin-left"));s>=0&&(e.$messages[t].addClass("hidden"),e.$messages[t].css({marginLeft:e.currentOffset+"px"}),e.$messages[t].removeClass("hidden"))}},e}(); |
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue