Both deleting posts and locking posts require filling in the reason for rejection. They share a window and a button. The buttons are bound to different events:
title = 'Delete post (blocked, not displayed)';
$('#btn_ok', '#div_deny_reason').bind('click' , function(){edit('if_show', '0');});
title = 'Lock post';
$('#btn_ok', '#div_deny_reason').bind('click' , function(){edit('if_lock', '1');});
As a result, after locking the post and then deleting the post, edit() will be executed twice. Just change
to the following:
title = 'Delete post (block, don't show)';
$('#btn_ok', '#div_deny_reason').one('click', function(){edit('if_show', '0') ;});
title = 'Lock post';
$('#btn_ok', '#div_deny_reason').one('click', function(){edit('if_lock', '1') ;});