diff --git a/common/modules/comment/resources/comment.js b/common/modules/comment/resources/comment.js index 48ea487..3165bc3 100644 --- a/common/modules/comment/resources/comment.js +++ b/common/modules/comment/resources/comment.js @@ -2,7 +2,7 @@ $(function() { $(document).on('click', '.artbox_comment_container .removeable', function(e) { e.preventDefault(); - $(this).remove(); + $(this).parent().remove(); // var container = $(this).parents('.artbox_comment_container'); // $(container).remove(); }); @@ -172,8 +172,41 @@ $(function() { { if(!data.error) { - $(container).empty(); - $(container).append('

' + data.text + '

'); + $(container).remove(); + addRemoveBlocks() + function addRemoveBlocks() + { + $('#overlay, .succses_comm').remove(); + $('body').append('
').append('
'+data.text+'
'); + $('#overlay').fadeIn( + 400, function() + { + $('.succses_comm').css({display : 'block'}).animate({opacity : 1, top : '50%'}, 200); + } + ); + function closeSuccsescomm() { + $('.succses_comm') + .animate( + {opacity : 0, top : '30%'}, 200, function() + { + $(this).css('display', 'none') + $('#overlay').fadeOut( + 400, function() + { + $('#overlay, .succses_comm').remove() + } + ) + } + ) + } + $('body').on('click', '.closed-form, #overlay', function() { + closeSuccsescomm() + } + ); + + setTimeout(closeSuccsescomm, 4000) + } + // $(container).append('

' + data.text + '

'); } else { $(container).prepend('

' + data.error + '

') diff --git a/frontend/views/tender/view.php b/frontend/views/tender/view.php index 8e8fffb..ab7c5e7 100755 --- a/frontend/views/tender/view.php +++ b/frontend/views/tender/view.php @@ -307,7 +307,43 @@ ], 'success_options' => [ 'tag' => 'div', - 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', +// 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', + 'content' => function(){ + return ""; + }, 'class' => 'test-class-success', ], 'list_options' => [ @@ -339,7 +375,7 @@ tabs_(); inputNumber(); tenderMark(); - submitForm(); + function inputNumber() { $("#commentproject-budget_from, #commentproject-budget_to, #commentproject-term_from, #commentproject-term_to") @@ -405,9 +441,16 @@ } } ) +// submitForm(); function submitForm() { $('.input-blocks-comm-button button').click(function () { - console.log('fdf') + setInterval(function () { + var length = ($('.test-class-success').length) + if(length>0){ + console.log('has') + } + },100) + }) } diff --git a/frontend/web/css/style.css b/frontend/web/css/style.css index feb0a09..4291625 100755 --- a/frontend/web/css/style.css +++ b/frontend/web/css/style.css @@ -8153,4 +8153,27 @@ li.active-menu-admin:hover a .ico_num { height: 34px; box-sizing: border-box; padding-top: 8px; +} +.succses_comm { + position: fixed; + width: 460px; + height: 177px; + background: #fff; + border-radius: 4px; + z-index: 9992; + top: -177px; + left: 50%; + margin-left: -230px; + margin-top: -88px; + box-shadow: 0px 0px 5px 0px rgba(149, 149, 149, 0.75); +} +.succses_comm-txt { + font-size: 18px; + color: #494949; + display: table-cell; + vertical-align: middle; + text-align: center; + width: 460px; + height: 177px; + padding: 0 70px; } \ No newline at end of file -- libgit2 0.21.4