Commit bca37b08f37b443f6a9b091388375d75819189ff
1 parent
2acd8ee8
tokar commit
Showing
8 changed files
with
116 additions
and
89 deletions
Show diff stats
common/widgets/views/image_sizer.php
| @@ -37,13 +37,15 @@ $id = $model::tableName().'_id'; | @@ -37,13 +37,15 @@ $id = $model::tableName().'_id'; | ||
| 37 | $(function(){ | 37 | $(function(){ |
| 38 | 38 | ||
| 39 | $("#<?= $field?>").fileupload({ | 39 | $("#<?= $field?>").fileupload({ |
| 40 | - | ||
| 41 | dataType: 'json', | 40 | dataType: 'json', |
| 42 | formData: {width: <?=$width?>,height:<?=$height?>}, | 41 | formData: {width: <?=$width?>,height:<?=$height?>}, |
| 43 | done: function (e, data) { | 42 | done: function (e, data) { |
| 44 | if($("#<?=$field?>_buttons_block").length){ | 43 | if($("#<?=$field?>_buttons_block").length){ |
| 45 | $("#<?=$field?>_buttons_block").remove() | 44 | $("#<?=$field?>_buttons_block").remove() |
| 46 | } | 45 | } |
| 46 | + | ||
| 47 | + $("#<?= $field?>").parent().prev().find('.admin-ava-wr').remove() | ||
| 48 | + | ||
| 47 | var host = window.location.host.toString(); | 49 | var host = window.location.host.toString(); |
| 48 | var img = '<div class="admin-ava-wr"><img style="vertical-align: middle; width: <?=$width?>px; height: <?=$height?>px;" src="http://'+host+data.result.link+'"></div>'+ | 50 | var img = '<div class="admin-ava-wr"><img style="vertical-align: middle; width: <?=$width?>px; height: <?=$height?>px;" src="http://'+host+data.result.link+'"></div>'+ |
| 49 | '<div id="<?=$field?>_buttons_block">'+ | 51 | '<div id="<?=$field?>_buttons_block">'+ |
frontend/assets/AppAsset.php
| @@ -29,11 +29,11 @@ class AppAsset extends AssetBundle | @@ -29,11 +29,11 @@ class AppAsset extends AssetBundle | ||
| 29 | '/js/slider.js', | 29 | '/js/slider.js', |
| 30 | '/js/jquery.rating.js', | 30 | '/js/jquery.rating.js', |
| 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/jquery.MultiFile.js', | 34 | '/js/jquery.MultiFile.js', |
| 35 | '/js/myGallery_min.js', | 35 | '/js/myGallery_min.js', |
| 36 | - '/js/forms.js', | 36 | +// '/js/forms.js', |
| 37 | 'js/fieldWidget.js' | 37 | 'js/fieldWidget.js' |
| 38 | ]; | 38 | ]; |
| 39 | public $depends = [ | 39 | public $depends = [ |
| 1 | +<div id="modal_form_favorite"> | ||
| 2 | + <div class="closed-form"></div> | ||
| 3 | + <div class="form-resume-wr"> | ||
| 4 | + <div class="form-resume-sub style">Добавлено в закладки</div> | ||
| 5 | + <div class="favorite-user-wr"> | ||
| 6 | + <img src="images/ded-ico.png" alt=""/> | ||
| 7 | + <div class="favorite-user-profile">Петер Цумторь</div> | ||
| 8 | + <div class="favorite-user-profile-add"><img src="images/sidebar-ico/ico-16.png" alt=""/><span>Добавлен</span></div> | ||
| 9 | + </div> | ||
| 10 | + <div class="res_form_line"></div> | ||
| 11 | + <div class="page-favorite"><a href="#" >Перейти на страницу закладок</a></div> | ||
| 12 | + </div> | ||
| 13 | +</div> | ||
| 0 | \ No newline at end of file | 14 | \ No newline at end of file |
| 1 | +<div id="modal_form_question"> | ||
| 2 | + <div class="closed-form"></div> | ||
| 3 | + <div class="form-resume-wr question"> | ||
| 4 | + <div class="form-resume-sub style">Задать вопрос МФП</div> | ||
| 5 | + <form action="" class="question-project"> | ||
| 6 | + <label for="qst_name">Ваши имя и фамилия</label><input id="qst_name" name="" type="text"> | ||
| 7 | + | ||
| 8 | + <label for="qst_phone">Контактный телефон</label><input id="qst_phone" name="" type="text"> | ||
| 9 | + | ||
| 10 | + <label for="qst_text">Вопрос</label><textarea id="qst_text" name=""></textarea> | ||
| 11 | + | ||
| 12 | + <input id="qst_submit" type="submit" value="Отправить"> | ||
| 13 | + </form> | ||
| 14 | + <div class="res_form_line"></div> | ||
| 15 | + </div> | ||
| 16 | +</div> | ||
| 0 | \ No newline at end of file | 17 | \ No newline at end of file |
frontend/views/site/forms-modal.php renamed to frontend/views/site/forms-modal-offer.php
100755 → 100644
| @@ -38,20 +38,6 @@ | @@ -38,20 +38,6 @@ | ||
| 38 | }) | 38 | }) |
| 39 | </script> | 39 | </script> |
| 40 | 40 | ||
| 41 | -<div id="modal_form_favorite"> | ||
| 42 | - <div class="closed-form"></div> | ||
| 43 | - <div class="form-resume-wr"> | ||
| 44 | - <div class="form-resume-sub style">Добавлено в закладки</div> | ||
| 45 | - <div class="favorite-user-wr"> | ||
| 46 | - <img src="images/ded-ico.png" alt=""/> | ||
| 47 | - <div class="favorite-user-profile">Петер Цумторь</div> | ||
| 48 | - <div class="favorite-user-profile-add"><img src="images/sidebar-ico/ico-16.png" alt=""/><span>Добавлен</span></div> | ||
| 49 | - </div> | ||
| 50 | - <div class="res_form_line"></div> | ||
| 51 | - <div class="page-favorite"><a href="#" >Перейти на страницу закладок</a></div> | ||
| 52 | - </div> | ||
| 53 | -</div> | ||
| 54 | - | ||
| 55 | <div id="modal_form_offer"> | 41 | <div id="modal_form_offer"> |
| 56 | <div class="closed-form"></div> | 42 | <div class="closed-form"></div> |
| 57 | <div class="form-resume-wr offer"> | 43 | <div class="form-resume-wr offer"> |
| @@ -103,20 +89,5 @@ | @@ -103,20 +89,5 @@ | ||
| 103 | </div> | 89 | </div> |
| 104 | </div> | 90 | </div> |
| 105 | 91 | ||
| 106 | -<div id="modal_form_question"> | ||
| 107 | - <div class="closed-form"></div> | ||
| 108 | - <div class="form-resume-wr question"> | ||
| 109 | - <div class="form-resume-sub style">Задать вопрос МФП</div> | ||
| 110 | - <form action="" class="question-project"> | ||
| 111 | - <label for="qst_name">Ваши имя и фамилия</label><input id="qst_name" name="" type="text"> | ||
| 112 | - | ||
| 113 | - <label for="qst_phone">Контактный телефон</label><input id="qst_phone" name="" type="text"> | ||
| 114 | - | ||
| 115 | - <label for="qst_text">Вопрос</label><textarea id="qst_text" name=""></textarea> | ||
| 116 | 92 | ||
| 117 | - <input id="qst_submit" type="submit" value="Отправить"> | ||
| 118 | - </form> | ||
| 119 | - <div class="res_form_line"></div> | ||
| 120 | - </div> | ||
| 121 | -</div> | ||
| 122 | 93 |
frontend/web/js/forms.js
| 1 | $(document).ready(function(){ | 1 | $(document).ready(function(){ |
| 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'); | 2 | + //if($('a.contactsLinkModal, .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) { |
| 3 | + // | ||
| 4 | + // $('.forms-modal-hide').remove(); | ||
| 5 | + // $("#overlay").remove(); | ||
| 6 | + // $("body").append('<div class="forms-modal-hide"></div>'); | ||
| 7 | + // $("body").append('<div id="overlay"></div>'); | ||
| 8 | + // | ||
| 6 | // $.post("site/forms-modal", function (data) { | 9 | // $.post("site/forms-modal", function (data) { |
| 7 | - // if ( !($('#overlay').length)>0 ){ | ||
| 8 | - // $("body").append('<div id="overlay"></div>'); | ||
| 9 | - // } | ||
| 10 | - // $("body").append(data); | 10 | + // |
| 11 | + // $(".forms-modal-hide").append(data); | ||
| 12 | + // | ||
| 11 | // }).complete(function() { | 13 | // }).complete(function() { |
| 12 | - // $('.closed-form, #overlay').on('click', function(){ | 14 | + // $('body').on('click','.closed-form, #overlay', function(){ |
| 13 | // $('#modal_form_favorite, #modal_form_offer, #modal_form_question') | 15 | // $('#modal_form_favorite, #modal_form_offer, #modal_form_question') |
| 14 | // .animate({opacity: 0, top: '30%'}, 200, | 16 | // .animate({opacity: 0, top: '30%'}, 200, |
| 15 | // function(){ | 17 | // function(){ |
| 16 | // $(this).css('display', 'none'); | 18 | // $(this).css('display', 'none'); |
| 17 | // $('#overlay').fadeOut(400); | 19 | // $('#overlay').fadeOut(400); |
| 20 | + // $('.forms-modal-hide').empty(); | ||
| 18 | // } | 21 | // } |
| 19 | // ); | 22 | // ); |
| 20 | // }); | 23 | // }); |
| 21 | // }); | 24 | // }); |
| 22 | //} | 25 | //} |
| 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 | - //} | ||
| 67 | -}); | ||
| 68 | \ No newline at end of file | 26 | \ No newline at end of file |
| 27 | + | ||
| 28 | + | ||
| 29 | + function addRemoveBlocks(){ | ||
| 30 | + $('#overlay, .forms-modal-hide').remove(); | ||
| 31 | + $('body').append('<div id="overlay"></div>').append('<div class="forms-modal-hide"></div>'); | ||
| 32 | + } | ||
| 33 | + addToFavorites(); | ||
| 34 | + addToOffer(); | ||
| 35 | + | ||
| 36 | + | ||
| 37 | + function addToFavorites(){ | ||
| 38 | + $('.blog-buttons-add-favorite, .performance-vacancy-add-favorite a, .get-list/*, .main-menu-icons-copy*/').click(function(e){ | ||
| 39 | + var newMarg = $(window).scrollTop(); | ||
| 40 | + e.preventDefault() | ||
| 41 | + $('#overlay').fadeIn(400, | ||
| 42 | + function(){ | ||
| 43 | + $('#modal_form_favorite') | ||
| 44 | + .css({display:'block', marginTop:-230+newMarg}) | ||
| 45 | + .animate({opacity: 1, top: '50%'}, 200); | ||
| 46 | + }); | ||
| 47 | + }) | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + function addToOffer(){ | ||
| 51 | + $('.blog-buttons-offer, .get-project/*,.main-menu-icons-home*/').click(function(e){ | ||
| 52 | + var newMarg = $(window).scrollTop(); | ||
| 53 | + e.preventDefault() | ||
| 54 | + $('#overlay').fadeIn(400, | ||
| 55 | + function(){ | ||
| 56 | + $('#modal_form_offer') | ||
| 57 | + .css({display:'block', marginTop:-313+newMarg}) | ||
| 58 | + .animate({opacity: 1, top: '50%'}, 200); | ||
| 59 | + }); | ||
| 60 | + }) | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + | ||
| 66 | + | ||
| 67 | + | ||
| 68 | + $('a.contactsLinkModal').click(function(e){ | ||
| 69 | + e.preventDefault() | ||
| 70 | + addRemoveBlocks() | ||
| 71 | + addQuestions(); | ||
| 72 | + }) | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + function addQuestions() { | ||
| 76 | + | ||
| 77 | + $.post("site/forms-modal-help", function (data) { | ||
| 78 | + $('.forms-modal-hide').append(data); | ||
| 79 | + }) | ||
| 80 | + | ||
| 81 | + | ||
| 82 | + //$('sdsds').click(function(e){ | ||
| 83 | + // var newMarg = $(window).scrollTop(); | ||
| 84 | + // | ||
| 85 | + // $('#overlay').fadeIn(400, | ||
| 86 | + // function(){ | ||
| 87 | + // $('#modal_form_question') | ||
| 88 | + // .css({display:'block', marginTop:-230+newMarg}) | ||
| 89 | + // .animate({opacity: 1, top: '50%'}, 200); | ||
| 90 | + // }); | ||
| 91 | + //}) | ||
| 92 | + } | ||
| 93 | +}) | ||
| 69 | \ No newline at end of file | 94 | \ No newline at end of file |
frontend/web/js/script.js
| @@ -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) { |