Merge remote-tracking branch 'origin' into thread_options

added some styling and elements to thread deletion

Conflicts:
	public/src/ajaxify.js
v1.18.x
Julian Lam 12 years ago
commit 7ed2413d96

@ -204,6 +204,10 @@ footer.footer {
background: #fff;
}
&.deleted {
-moz-opacity: 0.30;
opacity: 0.30;
}
}
#user_label {

@ -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');

@ -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;

@ -1,4 +1,4 @@
<h1>Account Settings</h1>
<div class="well">
<div class="alert" id="message" style="display:none">
<button type="button" class="close" data-dismiss="message">&times;</button>
@ -10,6 +10,7 @@
<div class="account-username-box">
<span class="account-username">{user.username}</span>
<span class="account-links">edit</span>
</div>
<br/>

@ -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);

@ -38,7 +38,7 @@
</li>
</ul>
<ul class="nav pull-right" id="right-menu">
<li><a href="/account" id="user_label"></a></li>
<li><a href="/users" id="user_label"></a></li>
</ul>
</div>
</div>

@ -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 = '<i class="icon-comment"></i> 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 = '<i class="icon-trash"></i> Delete Thread';
$(threadEl).removeClass('deleted');
deleteNotice.parentNode.removeChild(deleteNotice);
thread_state.deleted = '0';
}

Loading…
Cancel
Save