remotes/origin/1203
pavel 11 years ago
parent 81bc933214
commit 4dba9770c9
  1. 4
      proj/settings.py
  2. 2
      templates/client/static_client/css_min/main.min.css
  3. 24
      templates/client/static_client/js/_modules/block.registration.completion.js
  4. 2
      templates/client/static_client/js_min/_modules/block.registration.completion.min.js
  5. 2
      templates/client/static_client/js_min/_modules/page.profile.calendar.min.js

@ -22,7 +22,7 @@ DATABASES = {
'NAME': 'test2',
'USER': 'kotzilla',
'PASSWORD': 'qazedc',
'HOST': '',
'HOST': '195.66.79.152',
'PORT': '',
}
}
@ -406,4 +406,4 @@ MONTHES = {'jan': {'value': 1, 'name': _(u'Январь')}, 'feb': {'value': 2,
'may': {'value': 5, 'name': _(u'Май')}, 'jun': {'value': 6, 'name': _(u'Июнь')},
'jul': {'value': 7, 'name': _(u'Июль')}, 'aug': {'value': 8, 'name': _(u'Август')},
'sep': {'value': 9, 'name': _(u'Сентябрь')}, 'oct': {'value': 10, 'name': _(u'Октябрь')},
'nov': {'value': 11, 'name': _(u'Ноябрь')}, 'dec': {'value': 12, 'name': _(u'Декабрь')}}
'nov': {'value': 11, 'name': _(u'Ноябрь')}, 'dec': {'value': 12, 'name': _(u'Декабрь')}}

File diff suppressed because one or more lines are too long

@ -42,10 +42,24 @@ if (EXPO.registration.completion) {
}
},
placeInput = function (width) {
$('#id_country').val('159').select2({
placeholder: "Ваша страна",
width: width
});
$('#id_country')
.val('159')
.select2({
placeholder: "Ваша страна",
width: width
})
/**
* change phone code when country is selected by user
*/
.on("change", function () {
var phoneCode = $('option:selected', this).attr("data-phone-code");
if($.trim(phoneCode) !=''){
$('#id_code_country').select2("val",phoneCode);
}else{
$('#id_code_country').select2("val",'');
}
});
$('#id_city').select2({
placeholder: "Ваш город",
@ -57,7 +71,7 @@ if (EXPO.registration.completion) {
quietMillis: 200,
data: function(term, page, country){
var country = $('#id_country').val()
var country = $('#id_country').val();
return {term: term,
page: page,
country: country};

@ -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=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}();
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}).on("change",function(){var e=$("option:selected",this).attr("data-phone-code");""!=$.trim(e)?$("#id_code_country").select2("val",e):$("#id_code_country").select2("val","")}),$("#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}();

@ -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 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}();
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(){$("#btn_delete").on("click",function(t){t.preventDefault();var e=$("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(e),conf:JSON.stringify(s),seminar:JSON.stringify(o),webinar:JSON.stringify(l)};$.get("/profile/calendar/remove/",n,function(t){t.success&&location.reload()})})}),t.init=function(t){$.extend(this.opt,t);var e=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=function(){var t,s,o=0,l=0,n=e.opt.cellWidth,c=$("#"+e.opt.calenadrId),i=c.find("."+e.opt.daysClass+" td."+e.opt.currentDayClass).index(),r=e.opt.cellsToScroll,a=c.find("."+e.opt.daysClass+" td").length;return i>0?(i++,t=a/r,s=a/i,l=t-Math.floor(s),e.currentDay=i,l?(l--,o=r*l*n):o=0):(e.currentDay=0,o=0),o};this.$leftScroll=l,this.$rightScroll=n,this.currentOffset=a(),this.scrollStep=r,this.$scrollBox=s,this.$messages=[],this.stepWidth=e.opt.cellsToScroll*e.opt.cellWidth,$(function(){c.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+":even").addClass("grey")}),$(window).load(function(){e.calendarWidth=e.opt.cellWidth*o.find("."+e.opt.daysClass+" td").length,s.mCustomScrollbar({axis:"y",horizontalScroll:!0,setLeft:"-"+e.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(){e.$leftScroll.off("click").one("click",function(){e.scrollLeft(e)}),e.$rightScroll.off("click").one("click",function(){e.scrollRight(e)})}}}),l.one("click",function(){e.scrollLeft(e)}),n.one("click",function(){e.scrollRight(e)})}),i.on("click",function(){var t=$(this),e=t.closest(".ep-sect"),s=e.children("div.ep-sect-body");return e.hasClass("eps-opened")?(n.hide(),l.hide(),s.stop().animate({opacity:0},300,function(){e.removeClass("eps-opened")})):(n.show(),l.show(),s.stop().animate({opacity:1},300,function(){e.addClass("eps-opened")})),!1})},t.scrollRight=function(t){return t||(t=this),t.currentOffset+t.stepWidth<t.calendarWidth&&(t.currentOffset+=t.scrollStep,console.log("!!! right scroll fired!"),t.$scrollBox.mCustomScrollbar("scrollTo","-="+t.scrollStep),t.offsetMessages()),!1},t.scrollLeft=function(t){return t||(t=this),t.currentOffset>=t.stepWidth&&(t.currentOffset-=t.scrollStep,console.log("!!! left scroll fired!"),t.$scrollBox.mCustomScrollbar("scrollTo","+="+t.scrollStep),t.offsetMessages(t)),!1},t.offsetMessages=function(t){t||(t=this);for(var e=0;e<t.$messages.length;e++){var s=t.$messages[e].parent().width(),o=parseInt(t.$messages[e].parent().offset().left,10);o?o-=312:o+=312,s>t.stepWidth&&0>o&&t.$messages[e].css({marginLeft:Math.abs(o+t.stepWidth)+"px"})}},t}();
Loading…
Cancel
Save