Commit 04bd4f61925a899e890f0401d2a0f195315b9cad
1 parent
b772d73a
git
Showing
3 changed files
with
105 additions
and
6 deletions
Show diff stats
common/modules/comment/resources/comment.js
@@ -2,7 +2,7 @@ $(function() { | @@ -2,7 +2,7 @@ $(function() { | ||
2 | 2 | ||
3 | $(document).on('click', '.artbox_comment_container .removeable', function(e) { | 3 | $(document).on('click', '.artbox_comment_container .removeable', function(e) { |
4 | e.preventDefault(); | 4 | e.preventDefault(); |
5 | - $(this).remove(); | 5 | + $(this).parent().remove(); |
6 | // var container = $(this).parents('.artbox_comment_container'); | 6 | // var container = $(this).parents('.artbox_comment_container'); |
7 | // $(container).remove(); | 7 | // $(container).remove(); |
8 | }); | 8 | }); |
@@ -172,8 +172,41 @@ $(function() { | @@ -172,8 +172,41 @@ $(function() { | ||
172 | { | 172 | { |
173 | if(!data.error) | 173 | if(!data.error) |
174 | { | 174 | { |
175 | - $(container).empty(); | ||
176 | - $(container).append('<p class="removeable">' + data.text + '</p>'); | 175 | + $(container).remove(); |
176 | + addRemoveBlocks() | ||
177 | + function addRemoveBlocks() | ||
178 | + { | ||
179 | + $('#overlay, .succses_comm').remove(); | ||
180 | + $('body').append('<div id="overlay" style="top:0; left:0;"></div>').append('<div class="succses_comm"><div class="closed-form"></div><div class="succses_comm-txt">'+data.text+'</div></div>'); | ||
181 | + $('#overlay').fadeIn( | ||
182 | + 400, function() | ||
183 | + { | ||
184 | + $('.succses_comm').css({display : 'block'}).animate({opacity : 1, top : '50%'}, 200); | ||
185 | + } | ||
186 | + ); | ||
187 | + function closeSuccsescomm() { | ||
188 | + $('.succses_comm') | ||
189 | + .animate( | ||
190 | + {opacity : 0, top : '30%'}, 200, function() | ||
191 | + { | ||
192 | + $(this).css('display', 'none') | ||
193 | + $('#overlay').fadeOut( | ||
194 | + 400, function() | ||
195 | + { | ||
196 | + $('#overlay, .succses_comm').remove() | ||
197 | + } | ||
198 | + ) | ||
199 | + } | ||
200 | + ) | ||
201 | + } | ||
202 | + $('body').on('click', '.closed-form, #overlay', function() { | ||
203 | + closeSuccsescomm() | ||
204 | + } | ||
205 | + ); | ||
206 | + | ||
207 | + setTimeout(closeSuccsescomm, 4000) | ||
208 | + } | ||
209 | + // $(container).append('<p class="removeable">' + data.text + '</p>'); | ||
177 | } else | 210 | } else |
178 | { | 211 | { |
179 | $(container).prepend('<p class="removeable error_message">' + data.error + '</p>') | 212 | $(container).prepend('<p class="removeable error_message">' + data.error + '</p>') |
frontend/views/tender/view.php
@@ -307,7 +307,43 @@ | @@ -307,7 +307,43 @@ | ||
307 | ], | 307 | ], |
308 | 'success_options' => [ | 308 | 'success_options' => [ |
309 | 'tag' => 'div', | 309 | 'tag' => 'div', |
310 | - 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', | 310 | +// 'content' => 'Вопрос успешно создан и появится как только будет получен ответ', |
311 | + 'content' => function(){ | ||
312 | + return "<script> | ||
313 | + addRemoveBlocks() | ||
314 | + function addRemoveBlocks() | ||
315 | + { | ||
316 | + $('#overlay, .succses_comm').remove(); | ||
317 | + $('body').append('<div id=\"overlay\" style=\"top:0; left:0;\"></div>').append('<div class=\"succses_comm\"><div class=\"closed-form\"></div><div class=\"succses_comm-txt\">Вопрос успешно создан и появится как только будет получен ответ</div></div>'); | ||
318 | + $('#overlay').fadeIn( | ||
319 | + 400, function() | ||
320 | + { | ||
321 | + $('.succses_comm').css({display : 'block'}).animate({opacity : 1, top : '50%'}, 200); | ||
322 | + } | ||
323 | + ); | ||
324 | + function closeSuccsescomm() { | ||
325 | + $('.succses_comm') | ||
326 | + .animate( | ||
327 | + {opacity : 0, top : '30%'}, 200, function() | ||
328 | + { | ||
329 | + $(this).css('display', 'none') | ||
330 | + $('#overlay').fadeOut( | ||
331 | + 400, function() | ||
332 | + { | ||
333 | + $('#overlay, .succses_comm').remove() | ||
334 | + } | ||
335 | + ) | ||
336 | + } | ||
337 | + ) | ||
338 | + } | ||
339 | + $('body').on('click', '.closed-form, #overlay', function() { | ||
340 | + closeSuccsescomm() | ||
341 | + } | ||
342 | + ); | ||
343 | + setTimeout(closeSuccsescomm, 4000) | ||
344 | + } | ||
345 | + </script>"; | ||
346 | + }, | ||
311 | 'class' => 'test-class-success', | 347 | 'class' => 'test-class-success', |
312 | ], | 348 | ], |
313 | 'list_options' => [ | 349 | 'list_options' => [ |
@@ -339,7 +375,7 @@ | @@ -339,7 +375,7 @@ | ||
339 | tabs_(); | 375 | tabs_(); |
340 | inputNumber(); | 376 | inputNumber(); |
341 | tenderMark(); | 377 | tenderMark(); |
342 | - submitForm(); | 378 | + |
343 | function inputNumber() | 379 | function inputNumber() |
344 | { | 380 | { |
345 | $("#commentproject-budget_from, #commentproject-budget_to, #commentproject-term_from, #commentproject-term_to") | 381 | $("#commentproject-budget_from, #commentproject-budget_to, #commentproject-term_from, #commentproject-term_to") |
@@ -405,9 +441,16 @@ | @@ -405,9 +441,16 @@ | ||
405 | } | 441 | } |
406 | } | 442 | } |
407 | ) | 443 | ) |
444 | +// submitForm(); | ||
408 | function submitForm() { | 445 | function submitForm() { |
409 | $('.input-blocks-comm-button button').click(function () { | 446 | $('.input-blocks-comm-button button').click(function () { |
410 | - console.log('fdf') | 447 | + setInterval(function () { |
448 | + var length = ($('.test-class-success').length) | ||
449 | + if(length>0){ | ||
450 | + console.log('has') | ||
451 | + } | ||
452 | + },100) | ||
453 | + | ||
411 | }) | 454 | }) |
412 | } | 455 | } |
413 | 456 |
frontend/web/css/style.css
@@ -8153,4 +8153,27 @@ li.active-menu-admin:hover a .ico_num { | @@ -8153,4 +8153,27 @@ li.active-menu-admin:hover a .ico_num { | ||
8153 | height: 34px; | 8153 | height: 34px; |
8154 | box-sizing: border-box; | 8154 | box-sizing: border-box; |
8155 | padding-top: 8px; | 8155 | padding-top: 8px; |
8156 | +} | ||
8157 | +.succses_comm { | ||
8158 | + position: fixed; | ||
8159 | + width: 460px; | ||
8160 | + height: 177px; | ||
8161 | + background: #fff; | ||
8162 | + border-radius: 4px; | ||
8163 | + z-index: 9992; | ||
8164 | + top: -177px; | ||
8165 | + left: 50%; | ||
8166 | + margin-left: -230px; | ||
8167 | + margin-top: -88px; | ||
8168 | + box-shadow: 0px 0px 5px 0px rgba(149, 149, 149, 0.75); | ||
8169 | +} | ||
8170 | +.succses_comm-txt { | ||
8171 | + font-size: 18px; | ||
8172 | + color: #494949; | ||
8173 | + display: table-cell; | ||
8174 | + vertical-align: middle; | ||
8175 | + text-align: center; | ||
8176 | + width: 460px; | ||
8177 | + height: 177px; | ||
8178 | + padding: 0 70px; | ||
8156 | } | 8179 | } |
8157 | \ No newline at end of file | 8180 | \ No newline at end of file |