diff --git a/public/css/style.less b/public/css/style.less
index 0c2c357186..0dccfdfdf0 100644
--- a/public/css/style.less
+++ b/public/css/style.less
@@ -204,6 +204,10 @@ footer.footer {
background: #fff;
}
+ &.deleted {
+ -moz-opacity: 0.30;
+ opacity: 0.30;
+ }
}
#user_label {
diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js
index 95d6847888..716c26d977 100644
--- a/public/src/ajaxify.js
+++ b/public/src/ajaxify.js
@@ -21,10 +21,12 @@ var ajaxify = {};
window.onpopstate = function(event) {
- ajaxify.go(document.location.href.replace(rootUrl +'/', ''));
+ // this breaks reloading and results in ajaxify.go calling twice, believe it messes around with sockets. ill come back for you later bitchez
+ // ajaxify.go(document.location.href.replace(rootUrl +'/', ''));
};
ajaxify.go = function(url, callback) {
+
// leave room and join global
app.enter_room('global');
diff --git a/public/src/templates.js b/public/src/templates.js
index 8eaea3502f..babefa961b 100644
--- a/public/src/templates.js
+++ b/public/src/templates.js
@@ -2,7 +2,7 @@ var templates = {};
(function() {
var ready_callback,
- config;
+ config = {};
templates.get_custom_map = function(tpl) {
return (config['custom_mapping'] && config['custom_mapping'][tpl]) ? config['custom_mapping'][tpl] : tpl;
diff --git a/public/templates/account.tpl b/public/templates/account.tpl
index e537a8ad0a..9f68ffbd0e 100644
--- a/public/templates/account.tpl
+++ b/public/templates/account.tpl
@@ -1,4 +1,4 @@
-
Account Settings
+
@@ -10,6 +10,7 @@
{user.username}
+ edit
diff --git a/public/templates/footer.tpl b/public/templates/footer.tpl
index e6ca609cf3..1ab4721cb7 100644
--- a/public/templates/footer.tpl
+++ b/public/templates/footer.tpl
@@ -58,6 +58,9 @@
name.innerHTML = data['username'];
gravatar.src = data['picture']+"?s=24";
+
+ $('#user_label').attr('href','/users/'+data.uid);
+
user_label.innerHTML = '';
user_label.appendChild(gravatar);
user_label.appendChild(name);
diff --git a/public/templates/header.tpl b/public/templates/header.tpl
index 463e1a3440..71b0f647bc 100644
--- a/public/templates/header.tpl
+++ b/public/templates/header.tpl
@@ -38,7 +38,7 @@
diff --git a/public/templates/topic.tpl b/public/templates/topic.tpl
index cd9c77ed7b..0ff3260733 100644
--- a/public/templates/topic.tpl
+++ b/public/templates/topic.tpl
@@ -253,14 +253,25 @@
function set_delete_state(deleted) {
var deleteThreadEl = document.getElementById('delete_thread'),
- deleteTextEl = deleteThreadEl.getElementsByTagName('span')[0];
+ deleteTextEl = deleteThreadEl.getElementsByTagName('span')[0],
+ threadEl = document.querySelector('.post-container'),
+ deleteNotice = document.getElementById('thread-deleted') || document.createElement('div');
if (deleted) {
deleteTextEl.innerHTML = ' Restore Thread';
+ $(threadEl).addClass('deleted');
+
+ // Spawn a 'deleted' notice at the top of the page
+ deleteNotice.setAttribute('id', 'thread-deleted');
+ deleteNotice.className = 'alert';
+ deleteNotice.innerHTML = 'This thread has been deleted. Only users with thread management privileges can see it.';
+ document.getElementById('content').insertBefore(deleteNotice, threadEl);
thread_state.deleted = '1';
} else {
deleteTextEl.innerHTML = ' Delete Thread';
+ $(threadEl).removeClass('deleted');
+ deleteNotice.parentNode.removeChild(deleteNotice);
thread_state.deleted = '0';
}