diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js index f75f615e55..90906529de 100644 --- a/public/src/forum/topic.js +++ b/public/src/forum/topic.js @@ -43,13 +43,13 @@ deleteThreadEl.addEventListener('click', function(e) { e.preventDefault(); if (thread_state.deleted !== '1') { - if (confirm('really delete thread? (THIS DIALOG TO BE REPLACED WITH BOOTBOX)')) { - socket.emit('api:topic.delete', { tid: tid }); - } + bootbox.confirm('Are you sure you want to delete this thread?', function(confirm) { + if (confirm) socket.emit('api:topic.delete', { tid: tid }); + }); } else { - if (confirm('really restore thread? (THIS DIALOG TO BE REPLACED WITH BOOTBOX)')) { - socket.emit('api:topic.restore', { tid: tid }); - } + bootbox.confirm('Are you sure you want to restore this thread?', function(confirm) { + if (confirm) socket.emit('api:topic.restore', { tid: tid }); + }); } }, false); @@ -525,7 +525,7 @@ quoteBtns = document.querySelectorAll('#post-container .quote'), editBtns = document.querySelectorAll('#post-container .edit'), deleteBtns = document.querySelectorAll('#post-container .delete'), - numReplyBtns = postReplyBtns.length, + numPosts = document.querySelectorAll('#post_container li[data-pid]').length, lockThreadEl = document.getElementById('lock_thread'), x; @@ -533,7 +533,7 @@ lockThreadEl.innerHTML = ' Unlock Thread'; threadReplyBtn.disabled = true; threadReplyBtn.innerHTML = 'Locked '; - for(x=0;x + +