Commit 2acd8ee8366160a431090b1a8042fae55988d85f
1 parent
bbc81528
tokar commit
Showing
8 changed files
with
251 additions
and
355 deletions
Show diff stats
frontend/assets/AppAsset.php
| @@ -19,7 +19,7 @@ class AppAsset extends AssetBundle | @@ -19,7 +19,7 @@ class AppAsset extends AssetBundle | ||
| 19 | public $css = [ | 19 | public $css = [ |
| 20 | 'css/style.css', | 20 | 'css/style.css', |
| 21 | '/admin/css/flags32.css', | 21 | '/admin/css/flags32.css', |
| 22 | - //'https://fonts.googleapis.com/css?family=Roboto:400,700&subset=cyrillic,latin', | 22 | + 'https://fonts.googleapis.com/css?family=Roboto:400,700&subset=cyrillic,latin', |
| 23 | ]; | 23 | ]; |
| 24 | public $js = [ | 24 | public $js = [ |
| 25 | '/js/script.js', | 25 | '/js/script.js', |
| @@ -31,9 +31,9 @@ class AppAsset extends AssetBundle | @@ -31,9 +31,9 @@ class AppAsset extends AssetBundle | ||
| 31 | '/admin/js/option.js', | 31 | '/admin/js/option.js', |
| 32 | '/js/jmousewhell.js', | 32 | '/js/jmousewhell.js', |
| 33 | '/js/autoresize.jquery.js', | 33 | '/js/autoresize.jquery.js', |
| 34 | - '/js/forms.js', | ||
| 35 | '/js/jquery.MultiFile.js', | 34 | '/js/jquery.MultiFile.js', |
| 36 | '/js/myGallery_min.js', | 35 | '/js/myGallery_min.js', |
| 36 | + '/js/forms.js', | ||
| 37 | 'js/fieldWidget.js' | 37 | 'js/fieldWidget.js' |
| 38 | ]; | 38 | ]; |
| 39 | public $depends = [ | 39 | public $depends = [ |
frontend/views/layouts/main.php
| @@ -31,7 +31,6 @@ AppAsset::register($this); | @@ -31,7 +31,6 @@ AppAsset::register($this); | ||
| 31 | <body onload=" initialize()"> | 31 | <body onload=" initialize()"> |
| 32 | 32 | ||
| 33 | <?php $this->beginBody() ?> | 33 | <?php $this->beginBody() ?> |
| 34 | - | ||
| 35 | <div class="section-box header"> | 34 | <div class="section-box header"> |
| 36 | <div class="section-box first-header"> | 35 | <div class="section-box first-header"> |
| 37 | <div class="box-wr"> | 36 | <div class="box-wr"> |
| @@ -40,7 +39,7 @@ AppAsset::register($this); | @@ -40,7 +39,7 @@ AppAsset::register($this); | ||
| 40 | <div class="header-proektant-slogan">Международная Федерация Проектантов</div> | 39 | <div class="header-proektant-slogan">Международная Федерация Проектантов</div> |
| 41 | <ul class="header-contacts-menu"> | 40 | <ul class="header-contacts-menu"> |
| 42 | <li><span><img src="/images/ico-contact.png" alt=""/></span><a href="#">Контакты</a></li> | 41 | <li><span><img src="/images/ico-contact.png" alt=""/></span><a href="#">Контакты</a></li> |
| 43 | - <li><span><img src="/images/ico-question.png" alt=""/></span><a href="#">Помощь</a></li> | 42 | + <li><span><img src="/images/ico-question.png" alt=""/></span><?= Html::a('Помощь',['/site/help'], ['class' =>'contactsLinkModal'])?></li> |
| 44 | </ul> | 43 | </ul> |
| 45 | <div class="header-cabinet-wr"> | 44 | <div class="header-cabinet-wr"> |
| 46 | <?php | 45 | <?php |
frontend/views/site/forms-modal.php
| @@ -35,120 +35,6 @@ | @@ -35,120 +35,6 @@ | ||
| 35 | $('.off_list').hide(); | 35 | $('.off_list').hide(); |
| 36 | } | 36 | } |
| 37 | }) | 37 | }) |
| 38 | - validationModal(); | ||
| 39 | - function validationModal(){ | ||
| 40 | - var jVal_off = { | ||
| 41 | - 'offNsme' : function() { | ||
| 42 | - var ele = $('#off_name'); | ||
| 43 | - if(ele.val().length < 2) { | ||
| 44 | - jVal_off.errors = true; | ||
| 45 | - ele.removeClass('normal').addClass('wrong'); | ||
| 46 | - } else { | ||
| 47 | - ele.removeClass('wrong').addClass('normal'); | ||
| 48 | - } | ||
| 49 | - }, | ||
| 50 | - | ||
| 51 | - 'offComm' : function() { | ||
| 52 | - var ele = $('#off_text'); | ||
| 53 | - if(ele.val().length < 6) { | ||
| 54 | - jVal_off.errors = true; | ||
| 55 | - ele.removeClass('normal').addClass('wrong'); | ||
| 56 | - } else { | ||
| 57 | - ele.removeClass('wrong').addClass('normal'); | ||
| 58 | - } | ||
| 59 | - }, | ||
| 60 | - | ||
| 61 | - 'offPrice' : function() { | ||
| 62 | - var ele = $('#off_price'); | ||
| 63 | - if(ele.val().length < 1) { | ||
| 64 | - jVal_off.errors = true; | ||
| 65 | - ele.removeClass('normal').addClass('wrong'); | ||
| 66 | - } else { | ||
| 67 | - ele.removeClass('wrong').addClass('normal'); | ||
| 68 | - } | ||
| 69 | - }, | ||
| 70 | - | ||
| 71 | - 'offSendIt' : function (){ | ||
| 72 | - if(!jVal_off.errors) { | ||
| 73 | - $('.question-project').submit(); | ||
| 74 | - } | ||
| 75 | - } | ||
| 76 | - }; | ||
| 77 | -// ====================================================== // | ||
| 78 | - $('#off_submit').click(function (){ | ||
| 79 | - jVal_off.errors = false; | ||
| 80 | - jVal_off.offNsme(); | ||
| 81 | - jVal_off.offComm(); | ||
| 82 | - jVal_off.offPrice(); | ||
| 83 | - jVal_off.offSendIt(); | ||
| 84 | - return false; | ||
| 85 | - }); | ||
| 86 | - | ||
| 87 | - $('#off_name').focusout(function(){ | ||
| 88 | - jVal_off.offNsme(); | ||
| 89 | - }); | ||
| 90 | - $('#off_text').focusout(function(){ | ||
| 91 | - jVal_off.offComm(); | ||
| 92 | - }); | ||
| 93 | - $('#off_price').focusout(function(){ | ||
| 94 | - jVal_off.offPrice(); | ||
| 95 | - }); | ||
| 96 | - | ||
| 97 | - var jVal_qst = { | ||
| 98 | - 'qstNsme' : function() { | ||
| 99 | - var ele = $('#qst_name'); | ||
| 100 | - if(ele.val().length < 2) { | ||
| 101 | - jVal_qst.errors = true; | ||
| 102 | - ele.removeClass('normal').addClass('wrong'); | ||
| 103 | - } else { | ||
| 104 | - ele.removeClass('wrong').addClass('normal'); | ||
| 105 | - } | ||
| 106 | - }, | ||
| 107 | - 'qstPhone' : function (){ | ||
| 108 | - var ele = $('#qst_phone'); | ||
| 109 | - var patt = /[0-9]/g; | ||
| 110 | - if(!patt.test(ele.val())) { | ||
| 111 | - jVal_qst.errors = true; | ||
| 112 | - ele.removeClass('normal').addClass('wrong'); | ||
| 113 | - } else { | ||
| 114 | - ele.removeClass('wrong').addClass('normal'); | ||
| 115 | - } | ||
| 116 | - }, | ||
| 117 | - 'qstComm' : function() { | ||
| 118 | - var ele = $('#qst_text'); | ||
| 119 | - if(ele.val().length < 6) { | ||
| 120 | - jVal_qst.errors = true; | ||
| 121 | - ele.removeClass('normal').addClass('wrong'); | ||
| 122 | - } else { | ||
| 123 | - ele.removeClass('wrong').addClass('normal'); | ||
| 124 | - } | ||
| 125 | - }, | ||
| 126 | - 'qstSendIt' : function (){ | ||
| 127 | - if(!jVal_qst.errors) { | ||
| 128 | - $('.question-project').submit(); | ||
| 129 | - } | ||
| 130 | - } | ||
| 131 | - }; | ||
| 132 | -// ====================================================== // | ||
| 133 | - $('#qst_submit').click(function (){ | ||
| 134 | - jVal_qst.errors = false; | ||
| 135 | - jVal_qst.qstNsme(); | ||
| 136 | - jVal_qst.qstPhone(); | ||
| 137 | - jVal_qst.qstComm(); | ||
| 138 | - jVal_qst.qstSendIt(); | ||
| 139 | - return false; | ||
| 140 | - }); | ||
| 141 | - | ||
| 142 | - $('#qst_name').focusout(function(){ | ||
| 143 | - jVal_qst.qstNsme(); | ||
| 144 | - }); | ||
| 145 | - $('#qst_phone').focusout(function(){ | ||
| 146 | - jVal_qst.qstPhone(); | ||
| 147 | - }); | ||
| 148 | - $('#qst_text').focusout(function(){ | ||
| 149 | - jVal_qst.qstComm(); | ||
| 150 | - }); | ||
| 151 | - } | ||
| 152 | }) | 38 | }) |
| 153 | </script> | 39 | </script> |
| 154 | 40 |
frontend/web/css/style.css
| @@ -429,7 +429,7 @@ ul.content-menu-first { | @@ -429,7 +429,7 @@ ul.content-menu-first { | ||
| 429 | width: 235px; | 429 | width: 235px; |
| 430 | float: left; | 430 | float: left; |
| 431 | position: relative; | 431 | position: relative; |
| 432 | - z-index: 9999999; | 432 | + z-index: 999; |
| 433 | } | 433 | } |
| 434 | ul.content-menu-first li { | 434 | ul.content-menu-first li { |
| 435 | width: 100%; | 435 | width: 100%; |
| @@ -2391,7 +2391,7 @@ input[type=file]::-webkit-file-upload-button { | @@ -2391,7 +2391,7 @@ input[type=file]::-webkit-file-upload-button { | ||
| 2391 | 2391 | ||
| 2392 | } | 2392 | } |
| 2393 | .galley-show-min-wrapper { | 2393 | .galley-show-min-wrapper { |
| 2394 | - width: 840px; | 2394 | + width: 842px; |
| 2395 | margin: 0 auto; | 2395 | margin: 0 auto; |
| 2396 | overflow: hidden; | 2396 | overflow: hidden; |
| 2397 | padding-top: 40px; | 2397 | padding-top: 40px; |
| @@ -2416,9 +2416,9 @@ input[type=file]::-webkit-file-upload-button { | @@ -2416,9 +2416,9 @@ input[type=file]::-webkit-file-upload-button { | ||
| 2416 | position: absolute; | 2416 | position: absolute; |
| 2417 | top: 0; | 2417 | top: 0; |
| 2418 | left: 0; | 2418 | left: 0; |
| 2419 | - width: 152px; | ||
| 2420 | - height: 108px; | ||
| 2421 | - border: 2px solid greenyellow; | 2419 | + width: 150px; |
| 2420 | + height: 106px; | ||
| 2421 | + border: 2px solid #fff; | ||
| 2422 | } | 2422 | } |
| 2423 | .gallery-min-left, .gallery-min-right, .copy-gallery-min-left, .copy-gallery-min-right { | 2423 | .gallery-min-left, .gallery-min-right, .copy-gallery-min-left, .copy-gallery-min-right { |
| 2424 | width: 35px; | 2424 | width: 35px; |
| @@ -6406,4 +6406,9 @@ input[disabled], select[disabled] { | @@ -6406,4 +6406,9 @@ input[disabled], select[disabled] { | ||
| 6406 | .admn-menu-err .help-block{ | 6406 | .admn-menu-err .help-block{ |
| 6407 | width: 245px; | 6407 | width: 245px; |
| 6408 | margin-left: -5px; | 6408 | margin-left: -5px; |
| 6409 | +} | ||
| 6410 | +.kv-plugin-loading { | ||
| 6411 | + width: 24px; | ||
| 6412 | + height: 24px; | ||
| 6413 | + background: transparent url('/images/loading-plugin-new.gif') center left no-repeat; | ||
| 6409 | } | 6414 | } |
| 6410 | \ No newline at end of file | 6415 | \ No newline at end of file |
5.54 KB
frontend/web/js/forms.js
| 1 | $(document).ready(function(){ | 1 | $(document).ready(function(){ |
| 2 | - if($('.blog-buttons-add-favorite, .performance-vacancy-add-favorite a, .get-list, .main-menu-icons-copy, .blog-buttons-offer, .get-project, .main-menu-icons-home').length>0) { | ||
| 3 | - console.log('here'); | ||
| 4 | - var overlayLength = $('#overlay').length; | ||
| 5 | - $.post("site/forms-modal", function (data) { | ||
| 6 | - if ( !overlayLength>0 ){ | ||
| 7 | - $("body").append('<div id="overlay"></div>'); | ||
| 8 | - } | ||
| 9 | - $("body").append(data); | ||
| 10 | - }).complete(function() { | ||
| 11 | - $('.closed-form, #overlay').on('click', function(){ | ||
| 12 | - $('#modal_form_favorite, #modal_form_offer, #modal_form_question') | ||
| 13 | - .animate({opacity: 0, top: '30%'}, 200, | ||
| 14 | - function(){ | ||
| 15 | - $(this).css('display', 'none'); | ||
| 16 | - $('#overlay').fadeOut(400); | ||
| 17 | - } | ||
| 18 | - ); | ||
| 19 | - }); | ||
| 20 | - }); | ||
| 21 | - } | ||
| 22 | - | ||
| 23 | - addToFavorites(); | ||
| 24 | - addToOffer(); | ||
| 25 | - addCuestions(); | ||
| 26 | - | ||
| 27 | - function addToFavorites(){ | ||
| 28 | - $('.blog-buttons-add-favorite, .performance-vacancy-add-favorite a, .get-list/*, .main-menu-icons-copy*/').click(function(e){ | ||
| 29 | - var newMarg = $(window).scrollTop(); | ||
| 30 | - e.preventDefault() | ||
| 31 | - $('#overlay').fadeIn(400, | ||
| 32 | - function(){ | ||
| 33 | - $('#modal_form_favorite') | ||
| 34 | - .css({display:'block', marginTop:-230+newMarg}) | ||
| 35 | - .animate({opacity: 1, top: '50%'}, 200); | ||
| 36 | - }); | ||
| 37 | - }) | ||
| 38 | - } | ||
| 39 | - | ||
| 40 | - function addToOffer(){ | ||
| 41 | - $('.blog-buttons-offer, .get-project/*,.main-menu-icons-home*/').click(function(e){ | ||
| 42 | - var newMarg = $(window).scrollTop(); | ||
| 43 | - e.preventDefault() | ||
| 44 | - $('#overlay').fadeIn(400, | ||
| 45 | - function(){ | ||
| 46 | - $('#modal_form_offer') | ||
| 47 | - .css({display:'block', marginTop:-313+newMarg}) | ||
| 48 | - .animate({opacity: 1, top: '50%'}, 200); | ||
| 49 | - }); | ||
| 50 | - }) | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | - function addCuestions() { | ||
| 54 | - $('.header-contacts-menu li:last-child').click(function(e){ | ||
| 55 | - var newMarg = $(window).scrollTop(); | ||
| 56 | - e.preventDefault() | ||
| 57 | - $('#overlay').fadeIn(400, | ||
| 58 | - function(){ | ||
| 59 | - $('#modal_form_question') | ||
| 60 | - .css({display:'block', marginTop:-230+newMarg}) | ||
| 61 | - .animate({opacity: 1, top: '50%'}, 200); | ||
| 62 | - }); | ||
| 63 | - }) | ||
| 64 | - } | 2 | + console.log('fdfd') |
| 3 | + //if($('.blog-buttons-add-favorite, .performance-vacancy-add-favorite a, .get-list, .blog-buttons-offer, .get-project, .main-menu-icons-home, .main-menu-icons-copy').length>0) { | ||
| 4 | + //if($('a.contactsLinkModal').length>0) { | ||
| 5 | + // console.log('here qqq'); | ||
| 6 | + // $.post("site/forms-modal", function (data) { | ||
| 7 | + // if ( !($('#overlay').length)>0 ){ | ||
| 8 | + // $("body").append('<div id="overlay"></div>'); | ||
| 9 | + // } | ||
| 10 | + // $("body").append(data); | ||
| 11 | + // }).complete(function() { | ||
| 12 | + // $('.closed-form, #overlay').on('click', function(){ | ||
| 13 | + // $('#modal_form_favorite, #modal_form_offer, #modal_form_question') | ||
| 14 | + // .animate({opacity: 0, top: '30%'}, 200, | ||
| 15 | + // function(){ | ||
| 16 | + // $(this).css('display', 'none'); | ||
| 17 | + // $('#overlay').fadeOut(400); | ||
| 18 | + // } | ||
| 19 | + // ); | ||
| 20 | + // }); | ||
| 21 | + // }); | ||
| 22 | + //} | ||
| 23 | + // | ||
| 24 | + //addToFavorites(); | ||
| 25 | + //addToOffer(); | ||
| 26 | + ////addQuestions(); | ||
| 27 | + // | ||
| 28 | + //function addToFavorites(){ | ||
| 29 | + // $('.blog-buttons-add-favorite, .performance-vacancy-add-favorite a, .get-list/*, .main-menu-icons-copy*/').click(function(e){ | ||
| 30 | + // var newMarg = $(window).scrollTop(); | ||
| 31 | + // e.preventDefault() | ||
| 32 | + // $('#overlay').fadeIn(400, | ||
| 33 | + // function(){ | ||
| 34 | + // $('#modal_form_favorite') | ||
| 35 | + // .css({display:'block', marginTop:-230+newMarg}) | ||
| 36 | + // .animate({opacity: 1, top: '50%'}, 200); | ||
| 37 | + // }); | ||
| 38 | + // }) | ||
| 39 | + //} | ||
| 40 | + // | ||
| 41 | + //function addToOffer(){ | ||
| 42 | + // $('.blog-buttons-offer, .get-project/*,.main-menu-icons-home*/').click(function(e){ | ||
| 43 | + // var newMarg = $(window).scrollTop(); | ||
| 44 | + // e.preventDefault() | ||
| 45 | + // $('#overlay').fadeIn(400, | ||
| 46 | + // function(){ | ||
| 47 | + // $('#modal_form_offer') | ||
| 48 | + // .css({display:'block', marginTop:-313+newMarg}) | ||
| 49 | + // .animate({opacity: 1, top: '50%'}, 200); | ||
| 50 | + // }); | ||
| 51 | + // }) | ||
| 52 | + //} | ||
| 53 | + // | ||
| 54 | + //function addQuestions() { | ||
| 55 | + // $('.header-contacts-menu li:last-child').click(function(e){ | ||
| 56 | + // alert('df') | ||
| 57 | + // var newMarg = $(window).scrollTop(); | ||
| 58 | + // e.preventDefault() | ||
| 59 | + // $('#overlay').fadeIn(400, | ||
| 60 | + // function(){ | ||
| 61 | + // $('#modal_form_question') | ||
| 62 | + // .css({display:'block', marginTop:-230+newMarg}) | ||
| 63 | + // .animate({opacity: 1, top: '50%'}, 200); | ||
| 64 | + // }); | ||
| 65 | + // }) | ||
| 66 | + //} | ||
| 65 | }); | 67 | }); |
| 66 | \ No newline at end of file | 68 | \ No newline at end of file |
frontend/web/js/myGallery_min.js
| 1 | -$(document).ready(function(){function l(l){function i(){var l=$(".gallery-show-min img").length;$(".gallery-show-min").css({width:c*l-t})}function a(){var l=$(".gallery-show-big tr");$(".gallery-show-big tr").css({display:"none"}),$(l[s]).fadeIn(100);var i=$(l[s]).find("img"),a=i.attr("data-link");i.attr("src",a)}$(".gallery-show-wr .gallery-show-min, .gallery-show-wr .gallery-show-big").empty();var s=$(l).index();$(".gallery-show-min").css({marginLeft:0});for(var e=$(l).parent().find(".gallery-box-preview span"),r=$(l).parent().find(".gallery-box-big span"),g=0;g<e.length;g++){var n=$(e[g]).attr("data-link");$(".gallery-show-min").append('<img src="'+n+'"/>')}$(".gallery-show-min img:first-child").addClass("gallery-active-pic"),$(".gallery-show-min img:last-child").css({marginRight:0}),$(".gallery-show-min").append('<div class="border-gallery"></div>');for(var o=0;o<r.length;o++){var y=$(r[o]).attr("data-link");$(".gallery-show-big").append('<tr><td><img data-link="'+y+'"/></td></tr>')}var d=$(".gallery-show-big tr:first-child").find("img"),h=d.attr("data-link");d.attr("src",h);var p=m,f=$(window).height();$(".gallery-page");755>f&&($(".gallery-show-big-wrp, .gallery-show-big, .gallery-show-big tr td").css({height:f/p+"px"}),$(".gallery-show-big img").css({height:f/p+"px"})),i();var v=$(".gallery-show-min img");$(v).removeClass("gallery-active-pic"),$(v[s]).addClass("gallery-active-pic"),$(".border-gallery").css({left:c*s}),a(),0==s?$(".gallery-big-left").css({display:"none"}):$(".gallery-big-left").css({display:"block"})}function i(){var l=$(".gallery-show-min img"),i=$(".gallery-show-min img").length;n>=i?$(".gallery-min-left, .gallery-min-right, .copy-gallery-min-left, .copy-gallery-min-right").css({display:"none"}):($(".gallery-min-right, .copy-gallery-min-left, .copy-gallery-min-right").css({display:"block"}),$(".gallery-min-left").css({display:"none"})),$(".gallery-show-min img").on("click",function(){function a(){var l=$(".gallery-show-big tr");$(".gallery-show-big tr").css({display:"none"}),$(l[g]).fadeIn(100);var i=$(l[g]).find("img"),a=i.attr("data-link");i.attr("src",a)}var s=l,e=$(".gallery-show-min").offset().left;s=$(s[2]).offset().left-e,$(".gallery-show-min img").removeClass("gallery-active-pic"),$(this).addClass("gallery-active-pic");var r=$(".gallery-active-pic").offset().left-e,g=$(".gallery-active-pic").index(),t=i-(g+1);2>=g&&(a(),$(".border-gallery").css({left:r}),$(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".gallery-min-left").css({display:"none"})),2==g&&(a(),$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o),$(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list")),n-1>=g&&(a(),$(".border-gallery").css({left:r}),g>3&&$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o)),g>=n-1&&($(".gallery-min-left").css({display:"block"}),i==n&&g==n-1&&($(".border-gallery").css({left:r}),$(".gallery-show-min").stop().animate({marginLeft:0},o)),0==t&&(a(),$(".border-gallery").css({left:r}),$(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().prev().prev().addClass("act-list"),setTimeout(function(){$(".gallery-min-right").css({display:"none"})},o)),1==t&&(a(),$(".gallery-show-min").stop().animate({marginLeft:-(r-s-c)},o,function(){$(".gallery-min-right").css({display:"none"})}),$(".border-gallery").css({left:r}),$(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().prev().addClass("act-list")),2==t&&(a(),$(".border-gallery").css({left:r}),$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o,function(){$(".gallery-min-right").css({display:"none"})}),$(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().addClass("act-list")),t>2&&(console.log(">2"),a(),$(".border-gallery").css({left:r}),$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o,function(){$(".gallery-min-right").css({display:"block"})}),$(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().addClass("act-list")),n>=i&&$(".gallery-min-left").css({display:"none"})),i>n&&t>2&&$(".gallery-min-right").css({display:"block"}),3==g&&($(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o),$(l[1]).click(function(){$(".gallery-show-min").stop().animate({marginLeft:0},o)}),n>=i?$(".gallery-show-min").stop().animate({marginLeft:0},o):$(".gallery-min-left").attr("style",'disply:"block"')),g>=1&&i-1>g&&$(".gallery-big-left, .gallery-big-right").css({display:"block"}),g==i-1&&$(".gallery-big-right").css({display:"none"}),0==g&&$(".gallery-big-left").css({display:"none"})})}function a(){var l=$(".gallery-show-min img");$(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".gallery-min-right").on("click",function(){var i=$(".act-list"),a=i.index()+1,s=$(".gallery-show-min img").length,e=s-a;if($(this).css("display","none"),e>=2*n-1&&($(".gallery-show-min img").removeClass("act-list"),$(l[a+(n-1)]).addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:-((a+(n-1))*c)},o,function(){$(".gallery-min-right").css("display","block"),2*n>e&&$(".gallery-min-right").css("display","none")})),2*n-1>e){var r=s-(a+4);r=a+r-1,$(".gallery-show-min img").removeClass("act-list"),$(l[r]).addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:-(r*c)},o,function(){})}a>0&&setTimeout(function(){$(".gallery-min-left").css({display:"block"})},o)})}function s(){var l=$(".gallery-show-min img");$(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".gallery-min-left").on("click",function(){var i=$(".act-list"),a=i.index()+1,s=a-1;s>0&&($(this).css("display","none"),n-1>=s&&($(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:0},o,function(){n+1>=a?$(".gallery-min-right").css({display:"block"}):$(".gallery-min-left").css("display","block")})),s>n-1&&($(".gallery-show-min img").removeClass("act-list"),$(l[a-(n+1)]).addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:-((a-(n+1))*c)},o,function(){n+1>=a||($(".gallery-min-right").css("display","block"),$(".gallery-min-left").css("display","block"))})))})}function e(){var l=$(".gallery-show-min img").length,i=$(".gallery-show-min img"),a=3*c;$(".gallery-big-right").on("click",function(){function s(){var l=$(".gallery-show-big tr");$(".gallery-show-big tr").css({display:"none"}),$(l[g]).fadeIn(100);var i=$(l[g]).find("img"),a=i.attr("data-link");i.attr("src",a)}var e=$(".gallery-active-pic"),r=e.index()+1,g=r;2>=r&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[r]).addClass("gallery-active-pic"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".border-gallery").css({left:c*r}),s(),$(".gallery-show-min").stop().animate({marginLeft:0},o)),l-r>0&&r>2&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[r]).addClass("gallery-active-pic"),$(i[r]).prev().prev().addClass("act-list"),s(),$(".border-gallery").css({left:c*r}),l-r>2&&$(".gallery-show-min").stop().animate({marginLeft:-(r*c-a+c)},o),r>=n-2&&r>l&&setTimeout(function(){$(".gallery-min-left").css({display:"block"})},o),r>=l-3&&$(".gallery-min-right").css({display:"none"}),r>=3&&l-4>=r&&$(".gallery-min-right").css({display:"block"})),r>=1&&($(".gallery-big-left").css({display:"block"}),l>n&&r>2&&$(".gallery-min-left").css({display:"block"})),r+1>=l&&$(".gallery-big-right").css({display:"none"})})}function r(){var l=$(".gallery-show-min img").length,i=$(".gallery-show-min img"),a=3*c;$(".gallery-big-left").on("click",function(){function s(){var l=$(".gallery-show-big tr");$(".gallery-show-big tr").css({display:"none"}),$(l[g]).fadeIn(100);var i=$(l[g]).find("img"),a=i.attr("data-link");i.attr("src",a)}var e=$(".gallery-active-pic"),r=e.index()-1,g=r;2>=r&&(r>0&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[r]).addClass("gallery-active-pic"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".border-gallery").css({left:c*r}),s(),$(".gallery-show-min").stop().animate({marginLeft:0},o)),0==r&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[0]).addClass("gallery-active-pic"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".border-gallery").css({left:c*r}),s())),3>r&&setTimeout(function(){$(".gallery-min-left").css({display:"none"})},o),l-r>0&&r>2&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[r]).addClass("gallery-active-pic"),$(i[r]).prev().prev().addClass("act-list"),s(),$(".border-gallery").css({left:c*r}),l-r>2&&$(".gallery-show-min").stop().animate({marginLeft:-(r*c-a+c)},o),r>=3&&l-4>=r&&$(".gallery-min-right").css({display:"block"})),1>r&&$(".gallery-big-left").css({display:"none"}),l-2>=r&&$(".gallery-big-right").css({display:"block"})})}$("body").append('<div id="overlay"></div><div class="gallery-page"><div class="closed-form gallery-closed"></div> <div class="gallery-show-wr"><div class="gallery-show-big-wrp"><table align="center" class="gallery-show-big" width="840" height="560" cellpadding="0" cellspacing="0" border="0"></table><div class="gallery-big-left"></div><div class="gallery-big-right"></div> <div class="copy-gallery-big-left"></div> <div class="copy-gallery-big-right"></div></div><div class="galley-show-min-wrapper"><div class="gallery-show-min"></div></div><div class="gallery-min-left"></div><div class="gallery-min-right"></div><div class="copy-gallery-min-left"></div><div class="copy-gallery-min-right"></div></div></div>');var g=152,t=20,n=5,o=500,c=g+t,y=$(".gallery-page"),m=1.68;$(".gallery-box-min").click(function(g){g.preventDefault();var t=$(this).parent().find(".gallery-box-hidden");if($(t).hasClass("gallery-box-hidden")){var n=m,o=$(window).height(),c=$(".gallery-page");if(755>o)$("#overlay").fadeIn(400,function(){$(".gallery-page").css({display:"block",marginTop:-(y/2)}).animate({opacity:1,top:"50%"},200)}),c.css({height:o/n+148+"px",marginTop:-((o/n+148)/2)+"px"});else{var y=$(".gallery-show-big-wrp").height()+$(".galley-show-min-wrapper").height();$("#overlay").fadeIn(400,function(){$(".gallery-page").css({display:"block",marginTop:-(y/2)}).animate({opacity:1,top:"50%"},200)})}l(this),i(),$(".gallery-min-right").unbind("click"),$(".gallery-min-left").unbind("click"),$(".gallery-min-right").bind("click",a()),$(".gallery-min-left").bind("click",s()),$(".gallery-big-right").unbind("click"),$(".gallery-big-left").unbind("click"),$(".gallery-big-right").bind("click",e()),$(".gallery-big-left").bind("click",r())}}),$(".closed-form, #overlay").click(function(){$(".gallery-page").animate({opacity:0,top:255},200,function(){$(this).css("display","none"),$("#overlay").fadeOut(400)}),$(".gallery-big-left, .gallery-big-right").attr("style",""),$(".gallery-show-wr .gallery-show-min, .gallery-show-wr .gallery-show-big").empty()});var d=m;$(window).resize(function(){var l=$(window).height();755>l?($(".gallery-show-big-wrp, .gallery-show-big, .gallery-show-big tr td").css({height:l/d+"px"}),$(".gallery-show-big img").css({height:l/d+"px"}),y.css({height:l/d+148+"px",marginTop:-((l/d+148)/2)+"px"})):($(".gallery-show-big-wrp, .gallery-show-big, .gallery-show-big tr td, .gallery-show-big img").css({height:560}),y.css({height:710,marginTop:"-355px"}))})}); | ||
| 2 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | +$(document).ready(function(){ | ||
| 3 | + if( $('.gallery-box').length ){ | ||
| 4 | + function l(l){function i(){var l=$(".gallery-show-min img").length;$(".gallery-show-min").css({width:c*l-t})}function a(){var l=$(".gallery-show-big tr");$(".gallery-show-big tr").css({display:"none"}),$(l[s]).fadeIn(100);var i=$(l[s]).find("img"),a=i.attr("data-link");i.attr("src",a)}$(".gallery-show-wr .gallery-show-min, .gallery-show-wr .gallery-show-big").empty();var s=$(l).index();$(".gallery-show-min").css({marginLeft:0});for(var e=$(l).parent().find(".gallery-box-preview span"),r=$(l).parent().find(".gallery-box-big span"),g=0;g<e.length;g++){var n=$(e[g]).attr("data-link");$(".gallery-show-min").append('<img src="'+n+'"/>')}$(".gallery-show-min img:first-child").addClass("gallery-active-pic"),$(".gallery-show-min img:last-child").css({marginRight:0}),$(".gallery-show-min").append('<div class="border-gallery"></div>');for(var o=0;o<r.length;o++){var y=$(r[o]).attr("data-link");$(".gallery-show-big").append('<tr><td><img data-link="'+y+'"/></td></tr>')}var d=$(".gallery-show-big tr:first-child").find("img"),h=d.attr("data-link");d.attr("src",h);var p=m,f=$(window).height();$(".gallery-page");755>f&&($(".gallery-show-big-wrp, .gallery-show-big, .gallery-show-big tr td").css({height:f/p+"px"}),$(".gallery-show-big img").css({height:f/p+"px"})),i();var v=$(".gallery-show-min img");$(v).removeClass("gallery-active-pic"),$(v[s]).addClass("gallery-active-pic"),$(".border-gallery").css({left:c*s}),a(),0==s?$(".gallery-big-left").css({display:"none"}):$(".gallery-big-left").css({display:"block"})}function i(){var l=$(".gallery-show-min img"),i=$(".gallery-show-min img").length;n>=i?$(".gallery-min-left, .gallery-min-right, .copy-gallery-min-left, .copy-gallery-min-right").css({display:"none"}):($(".gallery-min-right, .copy-gallery-min-left, .copy-gallery-min-right").css({display:"block"}),$(".gallery-min-left").css({display:"none"})),$(".gallery-show-min img").on("click",function(){function a(){var l=$(".gallery-show-big tr");$(".gallery-show-big tr").css({display:"none"}),$(l[g]).fadeIn(100);var i=$(l[g]).find("img"),a=i.attr("data-link");i.attr("src",a)}var s=l,e=$(".gallery-show-min").offset().left;s=$(s[2]).offset().left-e,$(".gallery-show-min img").removeClass("gallery-active-pic"),$(this).addClass("gallery-active-pic");var r=$(".gallery-active-pic").offset().left-e,g=$(".gallery-active-pic").index(),t=i-(g+1);2>=g&&(a(),$(".border-gallery").css({left:r}),$(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".gallery-min-left").css({display:"none"})),2==g&&(a(),$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o),$(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list")),n-1>=g&&(a(),$(".border-gallery").css({left:r}),g>3&&$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o)),g>=n-1&&($(".gallery-min-left").css({display:"block"}),i==n&&g==n-1&&($(".border-gallery").css({left:r}),$(".gallery-show-min").stop().animate({marginLeft:0},o)),0==t&&(a(),$(".border-gallery").css({left:r}),$(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().prev().prev().addClass("act-list"),setTimeout(function(){$(".gallery-min-right").css({display:"none"})},o)),1==t&&(a(),$(".gallery-show-min").stop().animate({marginLeft:-(r-s-c)},o,function(){$(".gallery-min-right").css({display:"none"})}),$(".border-gallery").css({left:r}),$(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().prev().addClass("act-list")),2==t&&(a(),$(".border-gallery").css({left:r}),$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o,function(){$(".gallery-min-right").css({display:"none"})}),$(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().addClass("act-list")),t>2&&(console.log(">2"),a(),$(".border-gallery").css({left:r}),$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o,function(){$(".gallery-min-right").css({display:"block"})}),$(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().addClass("act-list")),n>=i&&$(".gallery-min-left").css({display:"none"})),i>n&&t>2&&$(".gallery-min-right").css({display:"block"}),3==g&&($(".gallery-show-min img").removeClass("act-list"),$(this).prev().prev().addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:-(r-s)},o),$(l[1]).click(function(){$(".gallery-show-min").stop().animate({marginLeft:0},o)}),n>=i?$(".gallery-show-min").stop().animate({marginLeft:0},o):$(".gallery-min-left").attr("style",'disply:"block"')),g>=1&&i-1>g&&$(".gallery-big-left, .gallery-big-right").css({display:"block"}),g==i-1&&$(".gallery-big-right").css({display:"none"}),0==g&&$(".gallery-big-left").css({display:"none"})})}function a(){var l=$(".gallery-show-min img");$(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".gallery-min-right").on("click",function(){var i=$(".act-list"),a=i.index()+1,s=$(".gallery-show-min img").length,e=s-a;if($(this).css("display","none"),e>=2*n-1&&($(".gallery-show-min img").removeClass("act-list"),$(l[a+(n-1)]).addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:-((a+(n-1))*c)},o,function(){$(".gallery-min-right").css("display","block"),2*n>e&&$(".gallery-min-right").css("display","none")})),2*n-1>e){var r=s-(a+4);r=a+r-1,$(".gallery-show-min img").removeClass("act-list"),$(l[r]).addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:-(r*c)},o,function(){})}a>0&&setTimeout(function(){$(".gallery-min-left").css({display:"block"})},o)})}function s(){var l=$(".gallery-show-min img");$(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".gallery-min-left").on("click",function(){var i=$(".act-list"),a=i.index()+1,s=a-1;s>0&&($(this).css("display","none"),n-1>=s&&($(".gallery-show-min img").removeClass("act-list"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:0},o,function(){n+1>=a?$(".gallery-min-right").css({display:"block"}):$(".gallery-min-left").css("display","block")})),s>n-1&&($(".gallery-show-min img").removeClass("act-list"),$(l[a-(n+1)]).addClass("act-list"),$(".gallery-show-min").stop().animate({marginLeft:-((a-(n+1))*c)},o,function(){n+1>=a||($(".gallery-min-right").css("display","block"),$(".gallery-min-left").css("display","block"))})))})}function e(){var l=$(".gallery-show-min img").length,i=$(".gallery-show-min img"),a=3*c;$(".gallery-big-right").on("click",function(){function s(){var l=$(".gallery-show-big tr");$(".gallery-show-big tr").css({display:"none"}),$(l[g]).fadeIn(100);var i=$(l[g]).find("img"),a=i.attr("data-link");i.attr("src",a)}var e=$(".gallery-active-pic"),r=e.index()+1,g=r;2>=r&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[r]).addClass("gallery-active-pic"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".border-gallery").css({left:c*r}),s(),$(".gallery-show-min").stop().animate({marginLeft:0},o)),l-r>0&&r>2&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[r]).addClass("gallery-active-pic"),$(i[r]).prev().prev().addClass("act-list"),s(),$(".border-gallery").css({left:c*r}),l-r>2&&$(".gallery-show-min").stop().animate({marginLeft:-(r*c-a+c)},o),r>=n-2&&r>l&&setTimeout(function(){$(".gallery-min-left").css({display:"block"})},o),r>=l-3&&$(".gallery-min-right").css({display:"none"}),r>=3&&l-4>=r&&$(".gallery-min-right").css({display:"block"})),r>=1&&($(".gallery-big-left").css({display:"block"}),l>n&&r>2&&$(".gallery-min-left").css({display:"block"})),r+1>=l&&$(".gallery-big-right").css({display:"none"})})}function r(){var l=$(".gallery-show-min img").length,i=$(".gallery-show-min img"),a=3*c;$(".gallery-big-left").on("click",function(){function s(){var l=$(".gallery-show-big tr");$(".gallery-show-big tr").css({display:"none"}),$(l[g]).fadeIn(100);var i=$(l[g]).find("img"),a=i.attr("data-link");i.attr("src",a)}var e=$(".gallery-active-pic"),r=e.index()-1,g=r;2>=r&&(r>0&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[r]).addClass("gallery-active-pic"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".border-gallery").css({left:c*r}),s(),$(".gallery-show-min").stop().animate({marginLeft:0},o)),0==r&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[0]).addClass("gallery-active-pic"),$(".gallery-show-min img:first-child").addClass("act-list"),$(".border-gallery").css({left:c*r}),s())),3>r&&setTimeout(function(){$(".gallery-min-left").css({display:"none"})},o),l-r>0&&r>2&&($(".gallery-show-min img").removeClass("gallery-active-pic act-list"),$(i[r]).addClass("gallery-active-pic"),$(i[r]).prev().prev().addClass("act-list"),s(),$(".border-gallery").css({left:c*r}),l-r>2&&$(".gallery-show-min").stop().animate({marginLeft:-(r*c-a+c)},o),r>=3&&l-4>=r&&$(".gallery-min-right").css({display:"block"})),1>r&&$(".gallery-big-left").css({display:"none"}),l-2>=r&&$(".gallery-big-right").css({display:"block"})})}$("body").append('<div id="overlay"></div><div class="gallery-page"><div class="closed-form gallery-closed"></div> <div class="gallery-show-wr"><div class="gallery-show-big-wrp"><table align="center" class="gallery-show-big" width="840" height="560" cellpadding="0" cellspacing="0" border="0"></table><div class="gallery-big-left"></div><div class="gallery-big-right"></div> <div class="copy-gallery-big-left"></div> <div class="copy-gallery-big-right"></div></div><div class="galley-show-min-wrapper"><div class="gallery-show-min"></div></div><div class="gallery-min-left"></div><div class="gallery-min-right"></div><div class="copy-gallery-min-left"></div><div class="copy-gallery-min-right"></div></div></div>');var g=152,t=20,n=5,o=500,c=g+t,y=$(".gallery-page"),m=1.68;$(".gallery-box-min").click(function(g){g.preventDefault();var t=$(this).parent().find(".gallery-box-hidden");if($(t).hasClass("gallery-box-hidden")){var n=m,o=$(window).height(),c=$(".gallery-page");if(755>o)$("#overlay").fadeIn(400,function(){$(".gallery-page").css({display:"block",marginTop:-(y/2)}).animate({opacity:1,top:"50%"},200)}),c.css({height:o/n+148+"px",marginTop:-((o/n+148)/2)+"px"});else{var y=$(".gallery-show-big-wrp").height()+$(".galley-show-min-wrapper").height();$("#overlay").fadeIn(400,function(){$(".gallery-page").css({display:"block",marginTop:-(y/2)}).animate({opacity:1,top:"50%"},200)})}l(this),i(),$(".gallery-min-right").unbind("click"),$(".gallery-min-left").unbind("click"),$(".gallery-min-right").bind("click",a()),$(".gallery-min-left").bind("click",s()),$(".gallery-big-right").unbind("click"),$(".gallery-big-left").unbind("click"),$(".gallery-big-right").bind("click",e()),$(".gallery-big-left").bind("click",r())}}),$(".closed-form, #overlay").click(function(){$(".gallery-page").animate({opacity:0,top:255},200,function(){$(this).css("display","none"),$("#overlay").fadeOut(400)}),$(".gallery-big-left, .gallery-big-right").attr("style",""),$(".gallery-show-wr .gallery-show-min, .gallery-show-wr .gallery-show-big").empty()});var d=m;$(window).resize(function(){var l=$(window).height();755>l?($(".gallery-show-big-wrp, .gallery-show-big, .gallery-show-big tr td").css({height:l/d+"px"}),$(".gallery-show-big img").css({height:l/d+"px"}),y.css({height:l/d+148+"px",marginTop:-((l/d+148)/2)+"px"})):($(".gallery-show-big-wrp, .gallery-show-big, .gallery-show-big tr td, .gallery-show-big img").css({height:560}),y.css({height:710,marginTop:"-355px"}))}) | ||
| 5 | + } | ||
| 6 | +}); | ||
| 3 | \ No newline at end of file | 7 | \ No newline at end of file |
frontend/web/js/script.js
| @@ -10,7 +10,7 @@ $(document).ready(function(){ | @@ -10,7 +10,7 @@ $(document).ready(function(){ | ||
| 10 | projectAllMenu(); | 10 | projectAllMenu(); |
| 11 | mapLoad(); | 11 | mapLoad(); |
| 12 | federationHome(); | 12 | federationHome(); |
| 13 | - validationForms(); | 13 | + //validationForms(); |
| 14 | //menuContent(); | 14 | //menuContent(); |
| 15 | jobClick(); | 15 | jobClick(); |
| 16 | box15Height(); | 16 | box15Height(); |
| @@ -59,7 +59,7 @@ $(document).ready(function(){ | @@ -59,7 +59,7 @@ $(document).ready(function(){ | ||
| 59 | } | 59 | } |
| 60 | if (tempScrollTop < currentScrollTop ){ | 60 | if (tempScrollTop < currentScrollTop ){ |
| 61 | if (currentScrollTop>=114) { | 61 | if (currentScrollTop>=114) { |
| 62 | - $('.menu-header-all').css({position:'fixed', zIndex:999}); | 62 | + $('.menu-header-all').css({position:'fixed', zIndex:9990}); |
| 63 | $('.section-box.content').css({marginTop:41}); | 63 | $('.section-box.content').css({marginTop:41}); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| @@ -317,169 +317,169 @@ $(document).ready(function(){ | @@ -317,169 +317,169 @@ $(document).ready(function(){ | ||
| 317 | },500); | 317 | },500); |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | - function validationForms(){ | ||
| 321 | - var jVal_two = { | ||
| 322 | - | ||
| 323 | - 'comments' : function() { | ||
| 324 | - var ele = $('#comments_two'); | ||
| 325 | - if(ele.val().length < 6) { | ||
| 326 | - jVal_two.errors = true; | ||
| 327 | - ele.removeClass('normal').addClass('wrong'); | ||
| 328 | - } else { | ||
| 329 | - ele.removeClass('wrong').addClass('normal'); | ||
| 330 | - } | ||
| 331 | - }, | ||
| 332 | - 'phone' : function (){ | ||
| 333 | - var ele = $('#phone_two'); | ||
| 334 | - var patt = /[0-9]/g; | ||
| 335 | - if(!patt.test(ele.val())) { | ||
| 336 | - jVal_two.errors = true; | ||
| 337 | - ele.removeClass('normal').addClass('wrong'); | ||
| 338 | - } else { | ||
| 339 | - ele.removeClass('wrong').addClass('normal'); | ||
| 340 | - } | ||
| 341 | - }, | ||
| 342 | - | ||
| 343 | - 'email' : function() { | ||
| 344 | - var ele = $('#email_two'); | ||
| 345 | - var patt = /^.+@.+[.].{2,}$/i; | ||
| 346 | - if(!patt.test(ele.val())) { | ||
| 347 | - jVal_two.errors = true; | ||
| 348 | - ele.removeClass('normal').addClass('wrong'); | ||
| 349 | - } else { | ||
| 350 | - ele.removeClass('wrong').addClass('normal'); | ||
| 351 | - } | ||
| 352 | - }, | ||
| 353 | - | ||
| 354 | - 'sendIt' : function (){ | ||
| 355 | - if(!jVal_two.errors) { | ||
| 356 | - $('.form-questions').submit(); | ||
| 357 | - } | ||
| 358 | - } | ||
| 359 | - }; | ||
| 360 | -// ====================================================== // | ||
| 361 | - $('#send_two').click(function (){ | ||
| 362 | - var obj = $('body, html'); | ||
| 363 | - obj.animate({ scrollTop: $('.form-questions').offset().top-151 }, 750, function (){ | ||
| 364 | - jVal_two.errors = false; | ||
| 365 | - jVal_two.comments(); | ||
| 366 | - jVal_two.phone(); | ||
| 367 | - jVal_two.email(); | ||
| 368 | - jVal_two.sendIt(); | ||
| 369 | - }); | ||
| 370 | - return false; | ||
| 371 | - }); | ||
| 372 | - | ||
| 373 | - $('#comments_two').focusout(function(){ | ||
| 374 | - jVal_two.comments(); | ||
| 375 | - }); | ||
| 376 | - $('#phone_two').focusout(function(){ | ||
| 377 | - jVal_two.phone(); | ||
| 378 | - }); | ||
| 379 | - $('#email_two').focusout(function(){ | ||
| 380 | - jVal_two.email(); | ||
| 381 | - }); | ||
| 382 | - | ||
| 383 | - var jVal_cb = { | ||
| 384 | - | ||
| 385 | - 'cbName' : function() { | ||
| 386 | - var ele = $('#callbac_name'); | ||
| 387 | - if(ele.val().length < 2) { | ||
| 388 | - jVal_cb.errors = true; | ||
| 389 | - ele.removeClass('normal').addClass('wrong'); | ||
| 390 | - } else { | ||
| 391 | - ele.removeClass('wrong').addClass('normal'); | ||
| 392 | - } | ||
| 393 | - }, | ||
| 394 | - 'cbPhone' : function (){ | ||
| 395 | - var ele = $('#callbac_phone'); | ||
| 396 | - var patt = /[0-9]/g; | ||
| 397 | - if(!patt.test(ele.val())) { | ||
| 398 | - jVal_cb.errors = true; | ||
| 399 | - ele.removeClass('normal').addClass('wrong'); | ||
| 400 | - } else { | ||
| 401 | - ele.removeClass('wrong').addClass('normal'); | ||
| 402 | - } | ||
| 403 | - }, | ||
| 404 | - 'cbSendIt' : function (){ | ||
| 405 | - if(!jVal_cb.errors) { | ||
| 406 | - $('.callback').submit(); | ||
| 407 | - } | ||
| 408 | - } | ||
| 409 | - }; | ||
| 410 | -// ====================================================== // | ||
| 411 | - $('#callbac_submit').click(function (){ | ||
| 412 | - var obj = $('body, html'); | ||
| 413 | - obj.animate({ scrollTop: $('.callback').offset().top-151 }, 750, function (){ | ||
| 414 | - jVal_cb.errors = false; | ||
| 415 | - jVal_cb.cbName(); | ||
| 416 | - jVal_cb.cbPhone(); | ||
| 417 | - jVal_cb.cbSendIt(); | ||
| 418 | - }); | ||
| 419 | - return false; | ||
| 420 | - }); | ||
| 421 | - $('#callbac_name').focusout(function(){ | ||
| 422 | - jVal_cb.cbName(); | ||
| 423 | - }); | ||
| 424 | - $('#callbac_phone').focusout(function(){ | ||
| 425 | - jVal_cb.cbPhone(); | ||
| 426 | - }); | ||
| 427 | - | ||
| 428 | - var jVal_res = { | ||
| 429 | - 'resNsme' : function() { | ||
| 430 | - var ele = $('#res_name'); | ||
| 431 | - if(ele.val().length < 2) { | ||
| 432 | - jVal_res.errors = true; | ||
| 433 | - ele.removeClass('normal').addClass('wrong'); | ||
| 434 | - } else { | ||
| 435 | - ele.removeClass('wrong').addClass('normal'); | ||
| 436 | - } | ||
| 437 | - }, | ||
| 438 | - 'resPhone' : function (){ | ||
| 439 | - var ele = $('#res_phone'); | ||
| 440 | - var patt = /[0-9]/g; | ||
| 441 | - if(!patt.test(ele.val())) { | ||
| 442 | - jVal_res.errors = true; | ||
| 443 | - ele.removeClass('normal').addClass('wrong'); | ||
| 444 | - } else { | ||
| 445 | - ele.removeClass('wrong').addClass('normal'); | ||
| 446 | - } | ||
| 447 | - }, | ||
| 448 | - 'resComm' : function() { | ||
| 449 | - var ele = $('#res_text'); | ||
| 450 | - if(ele.val().length < 6) { | ||
| 451 | - jVal_res.errors = true; | ||
| 452 | - ele.removeClass('normal').addClass('wrong'); | ||
| 453 | - } else { | ||
| 454 | - ele.removeClass('wrong').addClass('normal'); | ||
| 455 | - } | ||
| 456 | - }, | ||
| 457 | - 'resSendIt' : function (){ | ||
| 458 | - if(!jVal_res.errors) { | ||
| 459 | - $('.resforms').submit(); | ||
| 460 | - } | ||
| 461 | - } | ||
| 462 | - }; | ||
| 463 | -// ====================================================== // | ||
| 464 | - $('#res_submit').click(function (){ | ||
| 465 | - jVal_res.errors = false; | ||
| 466 | - jVal_res.resNsme(); | ||
| 467 | - jVal_res.resPhone(); | ||
| 468 | - jVal_res.resComm(); | ||
| 469 | - jVal_res.resSendIt(); | ||
| 470 | - return false; | ||
| 471 | - }); | ||
| 472 | - | ||
| 473 | - $('#res_name').focusout(function(){ | ||
| 474 | - jVal_res.resNsme(); | ||
| 475 | - }); | ||
| 476 | - $('#res_phone').focusout(function(){ | ||
| 477 | - jVal_res.resPhone(); | ||
| 478 | - }); | ||
| 479 | - $('#res_text').focusout(function(){ | ||
| 480 | - jVal_res.resComm(); | ||
| 481 | - }); | ||
| 482 | - } | 320 | +// function validationForms(){ |
| 321 | +// var jVal_two = { | ||
| 322 | +// | ||
| 323 | +// 'comments' : function() { | ||
| 324 | +// var ele = $('#comments_two'); | ||
| 325 | +// if(ele.val().length < 6) { | ||
| 326 | +// jVal_two.errors = true; | ||
| 327 | +// ele.removeClass('normal').addClass('wrong'); | ||
| 328 | +// } else { | ||
| 329 | +// ele.removeClass('wrong').addClass('normal'); | ||
| 330 | +// } | ||
| 331 | +// }, | ||
| 332 | +// 'phone' : function (){ | ||
| 333 | +// var ele = $('#phone_two'); | ||
| 334 | +// var patt = /[0-9]/g; | ||
| 335 | +// if(!patt.test(ele.val())) { | ||
| 336 | +// jVal_two.errors = true; | ||
| 337 | +// ele.removeClass('normal').addClass('wrong'); | ||
| 338 | +// } else { | ||
| 339 | +// ele.removeClass('wrong').addClass('normal'); | ||
| 340 | +// } | ||
| 341 | +// }, | ||
| 342 | +// | ||
| 343 | +// 'email' : function() { | ||
| 344 | +// var ele = $('#email_two'); | ||
| 345 | +// var patt = /^.+@.+[.].{2,}$/i; | ||
| 346 | +// if(!patt.test(ele.val())) { | ||
| 347 | +// jVal_two.errors = true; | ||
| 348 | +// ele.removeClass('normal').addClass('wrong'); | ||
| 349 | +// } else { | ||
| 350 | +// ele.removeClass('wrong').addClass('normal'); | ||
| 351 | +// } | ||
| 352 | +// }, | ||
| 353 | +// | ||
| 354 | +// 'sendIt' : function (){ | ||
| 355 | +// if(!jVal_two.errors) { | ||
| 356 | +// $('.form-questions').submit(); | ||
| 357 | +// } | ||
| 358 | +// } | ||
| 359 | +// }; | ||
| 360 | +//// ====================================================== // | ||
| 361 | +// $('#send_two').click(function (){ | ||
| 362 | +// var obj = $('body, html'); | ||
| 363 | +// obj.animate({ scrollTop: $('.form-questions').offset().top-151 }, 750, function (){ | ||
| 364 | +// jVal_two.errors = false; | ||
| 365 | +// jVal_two.comments(); | ||
| 366 | +// jVal_two.phone(); | ||
| 367 | +// jVal_two.email(); | ||
| 368 | +// jVal_two.sendIt(); | ||
| 369 | +// }); | ||
| 370 | +// return false; | ||
| 371 | +// }); | ||
| 372 | +// | ||
| 373 | +// $('#comments_two').focusout(function(){ | ||
| 374 | +// jVal_two.comments(); | ||
| 375 | +// }); | ||
| 376 | +// $('#phone_two').focusout(function(){ | ||
| 377 | +// jVal_two.phone(); | ||
| 378 | +// }); | ||
| 379 | +// $('#email_two').focusout(function(){ | ||
| 380 | +// jVal_two.email(); | ||
| 381 | +// }); | ||
| 382 | +// | ||
| 383 | +// var jVal_cb = { | ||
| 384 | +// | ||
| 385 | +// 'cbName' : function() { | ||
| 386 | +// var ele = $('#callbac_name'); | ||
| 387 | +// if(ele.val().length < 2) { | ||
| 388 | +// jVal_cb.errors = true; | ||
| 389 | +// ele.removeClass('normal').addClass('wrong'); | ||
| 390 | +// } else { | ||
| 391 | +// ele.removeClass('wrong').addClass('normal'); | ||
| 392 | +// } | ||
| 393 | +// }, | ||
| 394 | +// 'cbPhone' : function (){ | ||
| 395 | +// var ele = $('#callbac_phone'); | ||
| 396 | +// var patt = /[0-9]/g; | ||
| 397 | +// if(!patt.test(ele.val())) { | ||
| 398 | +// jVal_cb.errors = true; | ||
| 399 | +// ele.removeClass('normal').addClass('wrong'); | ||
| 400 | +// } else { | ||
| 401 | +// ele.removeClass('wrong').addClass('normal'); | ||
| 402 | +// } | ||
| 403 | +// }, | ||
| 404 | +// 'cbSendIt' : function (){ | ||
| 405 | +// if(!jVal_cb.errors) { | ||
| 406 | +// $('.callback').submit(); | ||
| 407 | +// } | ||
| 408 | +// } | ||
| 409 | +// }; | ||
| 410 | +//// ====================================================== // | ||
| 411 | +// $('#callbac_submit').click(function (){ | ||
| 412 | +// var obj = $('body, html'); | ||
| 413 | +// obj.animate({ scrollTop: $('.callback').offset().top-151 }, 750, function (){ | ||
| 414 | +// jVal_cb.errors = false; | ||
| 415 | +// jVal_cb.cbName(); | ||
| 416 | +// jVal_cb.cbPhone(); | ||
| 417 | +// jVal_cb.cbSendIt(); | ||
| 418 | +// }); | ||
| 419 | +// return false; | ||
| 420 | +// }); | ||
| 421 | +// $('#callbac_name').focusout(function(){ | ||
| 422 | +// jVal_cb.cbName(); | ||
| 423 | +// }); | ||
| 424 | +// $('#callbac_phone').focusout(function(){ | ||
| 425 | +// jVal_cb.cbPhone(); | ||
| 426 | +// }); | ||
| 427 | +// | ||
| 428 | +// var jVal_res = { | ||
| 429 | +// 'resNsme' : function() { | ||
| 430 | +// var ele = $('#res_name'); | ||
| 431 | +// if(ele.val().length < 2) { | ||
| 432 | +// jVal_res.errors = true; | ||
| 433 | +// ele.removeClass('normal').addClass('wrong'); | ||
| 434 | +// } else { | ||
| 435 | +// ele.removeClass('wrong').addClass('normal'); | ||
| 436 | +// } | ||
| 437 | +// }, | ||
| 438 | +// 'resPhone' : function (){ | ||
| 439 | +// var ele = $('#res_phone'); | ||
| 440 | +// var patt = /[0-9]/g; | ||
| 441 | +// if(!patt.test(ele.val())) { | ||
| 442 | +// jVal_res.errors = true; | ||
| 443 | +// ele.removeClass('normal').addClass('wrong'); | ||
| 444 | +// } else { | ||
| 445 | +// ele.removeClass('wrong').addClass('normal'); | ||
| 446 | +// } | ||
| 447 | +// }, | ||
| 448 | +// 'resComm' : function() { | ||
| 449 | +// var ele = $('#res_text'); | ||
| 450 | +// if(ele.val().length < 6) { | ||
| 451 | +// jVal_res.errors = true; | ||
| 452 | +// ele.removeClass('normal').addClass('wrong'); | ||
| 453 | +// } else { | ||
| 454 | +// ele.removeClass('wrong').addClass('normal'); | ||
| 455 | +// } | ||
| 456 | +// }, | ||
| 457 | +// 'resSendIt' : function (){ | ||
| 458 | +// if(!jVal_res.errors) { | ||
| 459 | +// $('.resforms').submit(); | ||
| 460 | +// } | ||
| 461 | +// } | ||
| 462 | +// }; | ||
| 463 | +//// ====================================================== // | ||
| 464 | +// $('#res_submit').click(function (){ | ||
| 465 | +// jVal_res.errors = false; | ||
| 466 | +// jVal_res.resNsme(); | ||
| 467 | +// jVal_res.resPhone(); | ||
| 468 | +// jVal_res.resComm(); | ||
| 469 | +// jVal_res.resSendIt(); | ||
| 470 | +// return false; | ||
| 471 | +// }); | ||
| 472 | +// | ||
| 473 | +// $('#res_name').focusout(function(){ | ||
| 474 | +// jVal_res.resNsme(); | ||
| 475 | +// }); | ||
| 476 | +// $('#res_phone').focusout(function(){ | ||
| 477 | +// jVal_res.resPhone(); | ||
| 478 | +// }); | ||
| 479 | +// $('#res_text').focusout(function(){ | ||
| 480 | +// jVal_res.resComm(); | ||
| 481 | +// }); | ||
| 482 | +// } | ||
| 483 | 483 | ||
| 484 | //function menuContent(){ | 484 | //function menuContent(){ |
| 485 | // $('.menu-content li a').click(function(e){ | 485 | // $('.menu-content li a').click(function(e){ |
| @@ -695,9 +695,9 @@ $(document).ready(function(){ | @@ -695,9 +695,9 @@ $(document).ready(function(){ | ||
| 695 | script.src = url; | 695 | script.src = url; |
| 696 | document.getElementsByTagName('head')[0].appendChild(script); | 696 | document.getElementsByTagName('head')[0].appendChild(script); |
| 697 | } | 697 | } |
| 698 | - include("/js/forms.js"); | ||
| 699 | - include("/js/jmousewhell.js"); | ||
| 700 | - include("/js/jscroll.js"); | 698 | + //include("/js/forms.js"); |
| 699 | + //include("/js/jmousewhell.js"); | ||
| 700 | + //include("/js/jscroll.js"); | ||
| 701 | 701 | ||
| 702 | function inputNumber(){ | 702 | function inputNumber(){ |
| 703 | $('.form-price-wr input').keypress(function(e) { | 703 | $('.form-price-wr input').keypress(function(e) { |