From 67a6899ed7c3ddc82f1220fcc2b2ce44d882a96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 11 Oct 2023 02:06:17 +0200 Subject: [PATCH 1/3] send on ctrl+enter in * comments * prv_messages * composer * jot --- view/lang/C/messages.po | 48 +++++++++++------------ view/templates/item/compose.tpl | 2 +- view/theme/frio/js/textedit.js | 5 +++ view/theme/frio/js/theme.js | 10 +++++ view/theme/frio/templates/jot.tpl | 4 +- view/theme/frio/templates/prv_message.tpl | 2 +- 6 files changed, 43 insertions(+), 28 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 47d726704a..847de86556 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2023.09-rc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-08 07:41+0000\n" +"POT-Creation-Date: 2023-10-11 04:07+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2420,17 +2420,12 @@ msgstr[1] "" msgid "More Trending Tags" msgstr "" -#: src/Content/Widget/VCard.php:105 src/Model/Contact.php:1204 +#: src/Content/Widget/VCard.php:107 src/Model/Contact.php:1204 #: src/Model/Profile.php:457 msgid "Post to group" msgstr "" -#: src/Content/Widget/VCard.php:107 src/Model/Contact.php:1206 -#: src/Model/Profile.php:459 -msgid "View group" -msgstr "" - -#: src/Content/Widget/VCard.php:110 src/Model/Contact.php:1209 +#: src/Content/Widget/VCard.php:111 src/Model/Contact.php:1209 #: src/Model/Profile.php:462 src/Module/Moderation/Item/Source.php:85 msgid "Mention" msgstr "" @@ -2464,6 +2459,11 @@ msgstr "" msgid "Unfollow" msgstr "" +#: src/Content/Widget/VCard.php:136 src/Model/Contact.php:1206 +#: src/Model/Profile.php:459 +msgid "View group" +msgstr "" + #: src/Core/ACL.php:166 src/Module/Profile/Profile.php:269 msgid "Yourself" msgstr "" @@ -2724,8 +2724,8 @@ msgstr "" #: src/Core/Installer.php:511 msgid "" -"The web installer needs to be able to create a file called \"local.config.php" -"\" in the \"config\" folder of your web server and it is unable to do so." +"The web installer needs to be able to create a file called \"local.config." +"php\" in the \"config\" folder of your web server and it is unable to do so." msgstr "" #: src/Core/Installer.php:512 @@ -5351,9 +5351,9 @@ msgstr "" #: src/Module/Admin/Summary.php:98 msgid "" -"The last update failed. Please run \"php bin/console.php dbstructure update" -"\" from the command line and have a look at the errors that might appear. " -"(Some of the errors are possibly inside the logfile.)" +"The last update failed. Please run \"php bin/console.php dbstructure " +"update\" from the command line and have a look at the errors that might " +"appear. (Some of the errors are possibly inside the logfile.)" msgstr "" #: src/Module/Admin/Summary.php:102 @@ -5504,8 +5504,8 @@ msgstr "" #, php-format msgid "" "Show some informations regarding the needed information to operate the node " -"according e.g. to EU-GDPR." +"according e.g. to EU-GDPR." msgstr "" #: src/Module/Admin/Tos.php:81 @@ -8856,8 +8856,8 @@ msgstr "" #: src/Module/Profile/Profile.php:158 #, php-format msgid "" -"You're currently viewing your profile as %s Cancel" +"You're currently viewing your profile as %s Cancel" msgstr "" #: src/Module/Profile/Profile.php:167 @@ -9405,8 +9405,8 @@ msgstr "" #: src/Module/Security/TwoFactor/Verify.php:100 #, php-format msgid "" -"If you do not have access to your authentication code you can use a two-factor recovery code." +"If you do not have access to your authentication code you can use a two-factor recovery code." msgstr "" #: src/Module/Security/TwoFactor/Verify.php:101 @@ -11047,8 +11047,8 @@ msgstr "" #: src/Module/Settings/TwoFactor/Verify.php:149 #, php-format msgid "" -"

Or you can open the following URL in your mobile device:

%s

" +"

Or you can open the following URL in your mobile device:

%s

" msgstr "" #: src/Module/Settings/TwoFactor/Verify.php:156 @@ -11157,9 +11157,9 @@ msgstr "" msgid "" "At any point in time a logged in user can export their account data from the " "account settings. If the user wants " -"to delete their account they can do so at " -"%1$s/settings/removeme. The deletion of the account will be permanent. " -"Deletion of the data will also be requested from the nodes of the " +"to delete their account they can do so at %1$s/settings/removeme. The deletion of the account will be " +"permanent. Deletion of the data will also be requested from the nodes of the " "communication partners." msgstr "" diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index fa311bc662..051cb3b088 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -54,7 +54,7 @@

- +

diff --git a/view/theme/frio/js/textedit.js b/view/theme/frio/js/textedit.js index 3a384bbb23..73b7b084f9 100644 --- a/view/theme/frio/js/textedit.js +++ b/view/theme/frio/js/textedit.js @@ -106,6 +106,11 @@ function commentExpand(id) { closeMenu("comment-fake-form-" + id); openMenu("item-comments-" + id); $("#comment-edit-text-" + id) + .keydown(function (e) { + if ((e.ctrlKey || e.metaKey) && (e.keyCode == 13 || e.keyCode == 10)) { + $("#comment-edit-submit-" + id).trigger('click'); + } + }) .putCursorAtEnd() .addClass("comment-edit-text-full") .removeClass("comment-edit-text-empty"); diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 6785c827f5..b138668c45 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -956,4 +956,14 @@ function toggleDropdownText(elm) { function hasClass(elem, cls) { return (" " + elem.className + " ").indexOf(" " + cls + " ") > -1; } + +// Send on + or + on macos +// e: event +// submit: the id of the submitbutton +function sendOnCtrlEnter(e, submit) { + if ((e.ctrlKey || e.metaKey) && (e.keyCode == 13 || e.keyCode == 10)) { + console.log("Ctrl + Enter"); + $("#" + submit).trigger('click'); + } +} // @license-end diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl index 2160b3e0b6..e04b942df4 100644 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@ -100,7 +100,7 @@ {{* The jot text field in which the post text is inserted *}}

- +