1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-16 20:28:28 +01:00

Issue #1322 - Comment editing was failing.

This commit is contained in:
Cameron 2016-02-04 13:34:57 -08:00
parent 767b496c69
commit fc7efdc0c6
2 changed files with 10 additions and 9 deletions

View File

@ -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 }

View File

@ -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");