From 77a2ecffefea0da35ced1cc3ebe5f582b901107f Mon Sep 17 00:00:00 2001 From: joyqi Date: Wed, 16 Oct 2013 15:04:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BC=96=E8=BE=91=E5=92=8C?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/manage-comments.php | 78 ++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/admin/manage-comments.php b/admin/manage-comments.php index 72a763d3..c231a9ec 100644 --- a/admin/manage-comments.php +++ b/admin/manage-comments.php @@ -93,42 +93,19 @@ $comments = Typecho_Widget::widget('Widget_Comments_Admin'); - - - - -

- - -

-

- - -

-

- - -

- - -

- - -

-

- - -

-

- - -

- - have()): ?> next()): ?> - + @@ -269,6 +246,41 @@ $(document).ready(function () { return false; }); + + $('.operate-edit').click(function () { + var tr = $(this).parents('tr'), id = tr.attr('id'), comment = tr.data('comment'); + tr.hide(); + + var edit = $(' ' + + '' + + '

' + + '

' + + '

' + + '

' + + '

' + + '

' + + '

' + + '

' + + '

') + .data('id', id).insertAfter(tr); + + $('input[name=author]', edit).val(comment.author); + $('input[name=mail]', edit).val(comment.mail); + $('input[name=url]', edit).val(comment.url); + $('textarea[name=text]', edit).val(comment.text).focus(); + + $('.cancel', edit).click(function () { + var tr = $(this).parents('tr'); + + $('#' + tr.data('id')).show().effect('highlight', '#AACB36'); + tr.remove(); + }); + + $('form', edit + + return false; + }); });