Ticket #3396: ctrl_enter_posting.patch
File ctrl_enter_posting.patch, 1.0 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 30 38 /**** Activity Posting ********************************************************/ 31 39 32 40 /* Textarea focus */ 33 41 jq('#whats-new').focus( function(){ jq("#aw-whats-new-submit").fadeIn(300); }); 34 42 43 /* Whats-new textarea ctrl+enter handler */ 44 jq('#whats-new').live("keydown", function(e) { 45 if (e.keyCode == 13 && e.ctrlKey){ 46 jq("input#aw-whats-new-submit").click(); 47 } 48 }); 49 35 50 /* New posts */ 36 51 jq("input#aw-whats-new-submit").click( function() { 37 52 var button = jq(this);