Skip to content

Commit

Permalink
Merge pull request friendica#14749 from MarekBenjamin/bugfix/14748-fr…
Browse files Browse the repository at this point in the history
…io-filer-dialog-colors

Fix filer dialog colors
  • Loading branch information
MrPetovan authored Feb 4, 2025
2 parents 827541e + 23f66d1 commit df17de7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/Content/Conversation.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public function statusEditor(array $x = [], int $notes_cid = 0, bool $popup = fa
'$ispublic' => $this->l10n->t('Visible to <strong>everybody</strong>'),
'$linkurl' => $this->l10n->t('Please enter a image/video/audio/webpage URL:'),
'$term' => $this->l10n->t('Tag term:'),
'$fileas' => $this->l10n->t('Save to Folder:'),
'$fileas' => $this->l10n->t('Save to Folder'),
'$whereareu' => $this->l10n->t('Where are you right now?'),
'$delitems' => $this->l10n->t("Delete item\x28s\x29?"),
'$is_mobile' => $this->mode->isMobile(),
Expand Down
2 changes: 1 addition & 1 deletion src/Module/Filer/SaveTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected function rawContent(array $request = [])

$tpl = Renderer::getMarkupTemplate("filer_dialog.tpl");
echo Renderer::replaceMacros($tpl, [
'$field' => ['term', $this->t("Save to Folder:"), '', '', $filetags, $this->t('- select -')],
'$field' => ['term', $this->t("Folder:"), '', '', $filetags, $this->t('- select -')],
'$submit' => $this->t('Save'),
]);

Expand Down
18 changes: 11 additions & 7 deletions view/lang/C/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 2025.02-dev\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-02-04 04:54+0000\n"
"POT-Creation-Date: 2025-02-04 13:20-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -1243,8 +1243,8 @@ msgstr ""
msgid "Tag term:"
msgstr ""

#: src/Content/Conversation.php:329 src/Module/Filer/SaveTag.php:59
msgid "Save to Folder:"
#: src/Content/Conversation.php:329
msgid "Save to Folder"
msgstr ""

#: src/Content/Conversation.php:330
Expand Down Expand Up @@ -7024,6 +7024,10 @@ msgstr ""
msgid "Item was not removed"
msgstr ""

#: src/Module/Filer/SaveTag.php:59
msgid "Folder:"
msgstr ""

#: src/Module/Filer/SaveTag.php:59
msgid "- select -"
msgstr ""
Expand Down Expand Up @@ -8179,8 +8183,8 @@ msgstr ""
msgid "User \"%s\" deleted"
msgstr ""

#: src/Module/Moderation/Users/Active.php:156
#: src/Module/Moderation/Users/Index.php:167
#: src/Module/Moderation/Users/Active.php:157
#: src/Module/Moderation/Users/Index.php:168
#, php-format
msgid "User \"%s\" blocked"
msgstr ""
Expand All @@ -8197,8 +8201,8 @@ msgstr[1] ""
msgid "Blocked Users"
msgstr ""

#: src/Module/Moderation/Users/Blocked.php:154
#: src/Module/Moderation/Users/Index.php:172
#: src/Module/Moderation/Users/Blocked.php:155
#: src/Module/Moderation/Users/Index.php:174
#, php-format
msgid "User \"%s\" unblocked"
msgstr ""
Expand Down
4 changes: 2 additions & 2 deletions view/templates/filer_dialog.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

{{include file="field_combobox.tpl"}}
<div class="settings-submit-wrapper">
<input id="filer_save" type="button" class="settings-submit" value="{{$submit}}" />
</div>
<input id="filer_save" type="button" class="btn btn-primary" value="{{$submit}}" />
</div>
30 changes: 18 additions & 12 deletions view/theme/frio/templates/jot-header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -296,27 +296,33 @@
}
function itemFiler(id) {
const bordercolor = $("input").css("border-color");
var modal = $('#modal').modal();
$.get('filer/', function (data) {
$.colorbox({html: data});
$("#id_term").keypress(function () {
$(this).css("border-color", bordercolor);
})
$("#select_term").change(function () {
$("#id_term").css("border-color", bordercolor);
})
modal
.find('#modal-body')
.append(data);
modal
.find('#modal-header h4')
.append("{{$fileas}}");
// Ensure focus after the modal is fully visible
modal.on('shown.bs.modal', function () {
$('#id_term').trigger('focus');
});
$("#filer_save").click(function (e) {
e.preventDefault();
const reply = $("#id_term").val();
if (reply && reply.length) {
const term = $("#id_term").val();
if (term && term.length) {
commentBusy = true;
formModified = true;
$('body').css('cursor', 'wait');
$.get('filer/' + id + '?term=' + reply)
$.get('filer/' + id + '?term=' + term)
.done(function () {
$.colorbox.close();
$('#modal-body').empty();
$('#modal').modal('hide');
resetFormModifiedFlag();
})
.always(function () {
Expand Down

0 comments on commit df17de7

Please sign in to comment.