Ticket #3396: ctrl_enter_submit.patch
File ctrl_enter_submit.patch, 1.3 KB (added by , 13 years ago) |
---|
-
bp-themes/bp-default/_inc/global.js
27 27 jq('form#whats-new-form input[type="submit"]').show(); 28 28 } 29 29 30 /**** Blog Comments Posting ********************************************************/ 31 32 jq('form#commentform textarea[name=comment]').live("keydown", function(e) { 33 if (e.keyCode == 13 && e.ctrlKey){ 34 jq('form#commentform input[name=submit]').click(); 35 } 36 }); 37 38 /**** Forum posts Posting ********************************************************/ 39 40 jq('form#forum-topic-form textarea[name=reply_text]').live("keydown", function(e) { 41 if (e.keyCode == 13 && e.ctrlKey){ 42 jq('form#forum-topic-form input[name=submit_reply]').click(); 43 } 44 }); 45 30 46 /**** Activity Posting ********************************************************/ 31 47 32 48 /* Textarea focus */ … … 36 52 jq("#aw-whats-new-submit").prop("disabled", false); 37 53 }); 38 54 55 /* Whats-new textarea ctrl+enter handler */ 56 jq('#whats-new').live("keydown", function(e) { 57 if (e.keyCode == 13 && e.ctrlKey){ 58 jq("input#aw-whats-new-submit").click(); 59 } 60 }); 61 39 62 /* New posts */ 40 63 jq("input#aw-whats-new-submit").click( function() { 41 64 var button = jq(this);