Merge branch 'master' of github.com:designcreateplay/NodeBB

v1.18.x
Julian Lam 12 years ago
commit 938dee481b

@ -27,7 +27,7 @@
data: loginData, data: loginData,
success: function(data, textStatus, jqXHR) { success: function(data, textStatus, jqXHR) {
if(!data.success) { if(!data.success) {
$('#login-error-notify').html(data.message).show(); $('#login-error-notify').show();
} else { } else {
$('#login-error-notify').hide(); $('#login-error-notify').hide();
window.location.replace(RELATIVE_PATH + "/?loggedin"); window.location.replace(RELATIVE_PATH + "/?loggedin");
@ -44,5 +44,10 @@
return false; return false;
}); });
$('#login-error-notify button').on('click', function() {
$('#login-error-notify').hide();
return false;
});
document.querySelector('#content input').focus(); document.querySelector('#content input').focus();
}()); }());

@ -207,7 +207,7 @@
} }
}); });
$('.post-container').on('click', '.deleted', function(ev) { $('#post-container').on('click', '.deleted', function(ev) {
$(this).toggleClass('deleted-expanded'); $(this).toggleClass('deleted-expanded');
}); });
}); });
@ -227,10 +227,10 @@
}); });
} }
}; };
$('.post-container').on('click', '.post_reply', reply_fn); $('#post-container').on('click', '.post_reply', reply_fn);
$('#post_reply').on('click', reply_fn); $('#post_reply').on('click', reply_fn);
$('.post-container').on('click', '.quote', function() { $('#post-container').on('click', '.quote', function() {
if (thread_state.locked !== '1') { if (thread_state.locked !== '1') {
var pid = $(this).parents('li').attr('data-pid'); var pid = $(this).parents('li').attr('data-pid');
@ -245,7 +245,7 @@
} }
}); });
$('.post-container').on('click', '.favourite', function() { $('#post-container').on('click', '.favourite', function() {
var pid = $(this).parents('li').attr('data-pid'); var pid = $(this).parents('li').attr('data-pid');
var uid = $(this).parents('li').attr('data-uid'); var uid = $(this).parents('li').attr('data-uid');
@ -258,7 +258,7 @@
} }
}); });
$('.post-container').delegate('.edit', 'click', function(e) { $('#post-container').delegate('.edit', 'click', function(e) {
var pid = $(this).parents('li').attr('data-pid'), var pid = $(this).parents('li').attr('data-pid'),
main = $(this).parents('.main-post'); main = $(this).parents('.main-post');
@ -267,7 +267,7 @@
}); });
}); });
$('.post-container').delegate('.delete', 'click', function(e) { $('#post-container').delegate('.delete', 'click', function(e) {
var pid = $(this).parents('li').attr('data-pid'), var pid = $(this).parents('li').attr('data-pid'),
postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')), postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')),
deleteAction = !postEl.hasClass('deleted') ? true : false, deleteAction = !postEl.hasClass('deleted') ? true : false,
@ -487,7 +487,7 @@
function set_delete_state(deleted) { function set_delete_state(deleted) {
var deleteThreadEl = document.getElementById('delete_thread'), var deleteThreadEl = document.getElementById('delete_thread'),
deleteTextEl = deleteThreadEl.getElementsByTagName('span')[0], deleteTextEl = deleteThreadEl.getElementsByTagName('span')[0],
threadEl = document.querySelector('.post-container'), threadEl = document.querySelector('#post-container'),
deleteNotice = document.getElementById('thread-deleted') || document.createElement('div'); deleteNotice = document.getElementById('thread-deleted') || document.createElement('div');
if (deleted) { if (deleted) {

@ -11,7 +11,7 @@
<div class="row"> <div class="row">
<div class="{login_window:spansize}"> <div class="{login_window:spansize}">
<div class="well well-lg"> <div class="well well-lg">
<div class="alert alert-error" id="error" style="display:none"> <div class="alert alert-danger" id="login-error-notify" style="display:none">
<button type="button" class="close" data-dismiss="alert">&times;</button> <button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Failed Login Attempt</strong> <p></p> <strong>Failed Login Attempt</strong> <p></p>
</div> </div>
@ -45,8 +45,7 @@
</div> </div>
<input type="hidden" name="_csrf" value="{token}" id="csrf-token" /> <input type="hidden" name="_csrf" value="{token}" id="csrf-token" />
</form> </form>
<div id="login-error-notify" class="alert alert-danger hide">Invalid username/password</div>
</div> </div>
</div> </div>

Loading…
Cancel
Save