1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 10:14:37 +01:00
vichan/js/fix-report-delete-submit.js

27 lines
741 B
JavaScript
Raw Normal View History

/*
* fix-report-delete-submit.js
2012-03-31 02:13:11 +02:00
* https://github.com/savetheinternet/Tinyboard/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;
});
});