Permalink
Browse files

jQuery substitute for delete comment alert box.

  • Loading branch information...
1 parent 2749839 commit 44b609d7dd96e3bfc8b44790d08a6ac166c8be7f Matthias Mees committed Sep 7, 2011
Showing with 6 additions and 2 deletions.
  1. +1 −1 comments.tpl
  2. +0 −1 entries.tpl
  3. +5 −0 js/2k11.js
View
@@ -15,7 +15,7 @@
<footer>
<a class="comment_source_trace" href="#c{$comment.id}">#{$comment.trace}</a>
{if $entry.is_entry_owner}
- | <a class="comment_source_ownerlink" href="{$comment.link_delete}" onclick="return confirm('{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}');">{$CONST.DELETE}</a>
+ | <a class="comment_source_ownerlink" href="{$comment.link_delete}" title="{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}">{$CONST.DELETE}</a>
{/if}
{if $entry.allow_comments AND $comment.body != 'COMMENT_DELETED'}
| <a class="comment_reply" href="#serendipity_CommentForm" id="serendipity_reply_{$comment.id}" onclick="document.getElementById('serendipity_replyTo').value='{$comment.id}'; {$comment_onchange}">{$CONST.REPLY}</a>
View
@@ -1,4 +1,3 @@
-<!-- TODO: * jQuery code for trackback link etc. -->
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
{foreach from=$entries item="dategroup"}
{foreach from=$dategroup.entries item="entry"}
View
@@ -5,4 +5,9 @@ jQuery(document).ready(function($) {
alert(trackbackMsg);
return false;
});
+ // Confirm comment deletion
+ $('.comment_source_ownerlink').click(function() {
+ var deleteMsg = $(this).attr('title');
+ return confirm(deleteMsg);
+ })
});

0 comments on commit 44b609d

Please sign in to comment.