quick-posts-controls.js: Fill in password automatically.
fix-report-delete-submit.js
This commit is contained in:
parent
6b42c71c79
commit
53f4bf6136
26
js/fix-report-delete-submit.js
Normal file
26
js/fix-report-delete-submit.js
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* fix-report-delete-submit.js
|
||||||
|
* https://github.com/savetheinternet/Tinyboard-Tools/blob/master/js/fix-report-delete-submit.js
|
||||||
|
*
|
||||||
|
* Fixes a known bug regarding the delete/report submit buttons.
|
||||||
|
*
|
||||||
|
* Released under the MIT license
|
||||||
|
* Copyright (c) 2012 Michael Save <savetheinternet@tinyboard.org>
|
||||||
|
*
|
||||||
|
* Usage:
|
||||||
|
* $config['additional_javascript'][] = 'js/jquery.min.js';
|
||||||
|
* $config['additional_javascript'][] = 'js/fix-report-delete-submit.js';
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
$('form[name="postcontrols"] div.delete input:not([type="checkbox"]):not([type="submit"]):not([type="hidden"])').keypress(function(e) {
|
||||||
|
if(e.which == 13) {
|
||||||
|
e.preventDefault();
|
||||||
|
$(this).next().click();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -18,7 +18,7 @@ $(document).ready(function(){
|
|||||||
var submitButton;
|
var submitButton;
|
||||||
|
|
||||||
if(this.checked) {
|
if(this.checked) {
|
||||||
var post_form = $('<form class="post-actions" method="post" style="margin:4px 0">' +
|
var post_form = $('<form class="post-actions" method="post" style="margin:10px 0 0 0">' +
|
||||||
'<div style="text-align:right">' +
|
'<div style="text-align:right">' +
|
||||||
(!thread ? '<hr>' : '') +
|
(!thread ? '<hr>' : '') +
|
||||||
|
|
||||||
@ -55,6 +55,8 @@ $(document).ready(function(){
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
post_form.find('input[type="password"]').val(localStorage.password);
|
||||||
|
|
||||||
if(thread) {
|
if(thread) {
|
||||||
post_form.prependTo($(this).parent().parent().find('p.body'));
|
post_form.prependTo($(this).parent().parent().find('p.body'));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user