aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/jot-header.tpl
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-17 09:09:36 +0000
committerMario <mario@mariovavti.com>2020-11-17 09:09:36 +0000
commitb5ab77908e357b027a9298e0258f3c0737f3c721 (patch)
tree42183a44448e95c7781e6e6778164892d534cfc8 /view/tpl/jot-header.tpl
parent5750e6cada69b03b35a294c4dae7f9433130449b (diff)
downloadvolse-hubzilla-b5ab77908e357b027a9298e0258f3c0737f3c721.tar.gz
volse-hubzilla-b5ab77908e357b027a9298e0258f3c0737f3c721.tar.bz2
volse-hubzilla-b5ab77908e357b027a9298e0258f3c0737f3c721.zip
implement submit on ctrl-enter for post editor and comments
Diffstat (limited to 'view/tpl/jot-header.tpl')
-rwxr-xr-xview/tpl/jot-header.tpl29
1 files changed, 17 insertions, 12 deletions
diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl
index d519fd666..d78907b38 100755
--- a/view/tpl/jot-header.tpl
+++ b/view/tpl/jot-header.tpl
@@ -61,13 +61,11 @@ var activeCommentText = '';
$('#jot-add-option').on('click', jotAddOption);
$(document).on('click', '.poll-option-close', jotRemoveOption);
- function jotSetMime() {
- var mtype = $('#id_mimetype').val();
- if(mtype == 'text/bbcode')
- $('#profile-jot-submit-left').show();
- else
- $('#profile-jot-submit-left').hide();
- }
+ $('#profile-jot-form').keydown(function(e) {
+ if (e.ctrlKey && e.keyCode === 13) {
+ $(this).trigger('submit');
+ }
+ });
$('#invisible-wall-file-upload').fileupload({
url: 'wall_attach/{{$nickname}}',
@@ -91,11 +89,10 @@ var activeCommentText = '';
$('#wall-file-upload').click(function(event) { event.preventDefault(); $('#invisible-wall-file-upload').trigger('click'); return false;});
$('#wall-file-upload-sub').click(function(event) { event.preventDefault(); $('#invisible-wall-file-upload').trigger('click'); return false;});
- // call initialization file
- if (window.File && window.FileList && window.FileReader) {
- DragDropUploadInit();
- }
-
+ // call initialization file
+ if (window.File && window.FileList && window.FileReader) {
+ DragDropUploadInit();
+ }
$('#invisible-comment-upload').fileupload({
url: 'wall_attach/{{$nickname}}',
@@ -128,6 +125,14 @@ var activeCommentText = '';
});
+ function jotSetMime() {
+ var mtype = $('#id_mimetype').val();
+ if(mtype == 'text/bbcode')
+ $('#profile-jot-submit-left').show();
+ else
+ $('#profile-jot-submit-left').hide();
+ }
+
function deleteCheckedItems() {
var checkedstr = '';