diff --git a/e107_web/css/e107.css b/e107_web/css/e107.css index 97a50c32c..c2f8173f2 100644 --- a/e107_web/css/e107.css +++ b/e107_web/css/e107.css @@ -193,8 +193,8 @@ a.comment-edit { } */ div.e-comment-edit-save { margin-top:8px; padding: 5px } .e-comment-edit-active { -webkit-box-shadow:#CCCCCC 0px 0px 10px; -moz-box-shadow:#CCCCCC 0px 0px 10px; box-shadow:#CCCCCC 0px 0px 10px; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px;} -.e-comment-edit-success { padding:5px; text-align:center; background-color:#DFFFDF; border: 1px solid #009900; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; } -.e-comment-edit-error { padding:5px; text-align:center; background-color:#FFCECE; border: 1px solid #CC0000; -webkit-border-radius:5px; -moz-border-radius:5px; border-radius:5px; } +.e-comment-edit-success { padding:8px; text-align:center; } +.e-comment-edit-error { padding:8px; text-align:center; } .e-rate-up img { opacity: 0.4 } .e-rate-down img { opacity: 0.4 } diff --git a/e107_web/js/core/front.jquery.js b/e107_web/js/core/front.jquery.js index 08d2eeb30..65d0d6a4f 100644 --- a/e107_web/js/core/front.jquery.js +++ b/e107_web/js/core/front.jquery.js @@ -167,13 +167,14 @@ $(document).ready(function() }); - $("form").on("click", "input.e-comment-edit-save", function(){ + $(document).on("click", "input.e-comment-edit-save", function(){ var url = $(this).attr("data-target"); var sp = $(this).attr('id').split("-"); var id = "#comment-" + sp[4] + "-edit"; var comment = $(id).text(); - + + $(id).attr('contentEditable',false); $.ajax({ @@ -191,20 +192,20 @@ $(document).ready(function() { $("div.e-comment-edit-save") .hide() - .addClass("e-comment-edit-success") + .addClass("alert alert-success e-comment-edit-success") .html(a.msg) .fadeIn('slow') - .delay(1000) - .fadeOut('slow'); + .delay(1500) + .fadeOut(2000); } else { $("div.e-comment-edit-save") - .addClass("e-comment-edit-error") + .addClass("alert alert-danger e-comment-edit-error") .html(a.msg) .fadeIn('slow') - .delay(1000) + .delay(1500) .fadeOut('slow'); } $(id).removeClass("e-comment-edit-active");