From 29d7b4ef243a838592c80bba6c7c577494131a3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jakobus=20Sch=C3=BCrz?= Date: Mon, 13 Mar 2023 03:32:28 +0100 Subject: [PATCH] fix path for js and css loading --- src/Content/Conversation.php | 1 + src/Core/ACL.php | 2 + src/Module/Item/Compose.php | 2 +- view/templates/item/compose.tpl | 50 +++++++++++++++++++++- view/theme/frio/templates/comment_item.tpl | 48 ++++++++++++++++++++- view/theme/frio/templates/head.tpl | 3 ++ view/theme/frio/templates/jot.tpl | 48 ++++++++++++++++++++- 7 files changed, 148 insertions(+), 6 deletions(-) diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 249190b1ad..7cf2076271 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -445,6 +445,7 @@ class Conversation $this->page->registerFooterScript(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.js')); $this->page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.css')); $this->page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput-typeahead.css')); + $this->page->registerStylesheet(Theme::getPathForFile('vendor/enyo/dropzone/dist/min/dropzone.min.css')); $live_update_div = ''; diff --git a/src/Core/ACL.php b/src/Core/ACL.php index 4ed8d602a4..45f8e1128b 100644 --- a/src/Core/ACL.php +++ b/src/Core/ACL.php @@ -59,8 +59,10 @@ class ACL $page->registerFooterScript(Theme::getPathForFile('asset/typeahead.js/dist/typeahead.bundle.js')); $page->registerFooterScript(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.js')); + $page->registerFooterScript(Theme::getPathForFile('../vendor/enyo/dropzone/dist/min/dropzone.min.js')); $page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput.css')); $page->registerStylesheet(Theme::getPathForFile('js/friendica-tagsinput/friendica-tagsinput-typeahead.css')); + $page->registerStylesheet(Theme::getPathForFile('../vendor/enyo/dropzone/dist/min/dropzone.min.css')); $contacts = self::getValidMessageRecipientsForUser(DI::userSession()->getLocalUserId()); diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php index d44fe2cd7d..1bb56a3f7f 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -164,7 +164,7 @@ class Compose extends BaseModule $this->page->registerFooterScript(Theme::getPathForFile('js/ajaxupload.js')); $this->page->registerFooterScript(Theme::getPathForFile('js/linkPreview.js')); $this->page->registerFooterScript(Theme::getPathForFile('js/compose.js')); - + $this->page->registerFooterScript(Theme::getPathForFile('../vendor/enyo/dropzone/dist/min/dropzone.min.js')); $contact = Contact::getById($a->getContactId()); if ($this->pConfig->get(DI::userSession()->getLocalUserId(), 'system', 'set_creation_date')) { diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index 50e21b149f..1143a5efb4 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -1,10 +1,17 @@ -
+

{{$l10n.compose_title}}

{{if $l10n.always_open_compose}}

{{$l10n.always_open_compose nofilter}}

{{/if}}
-
+ + + {{**}} @@ -71,6 +78,7 @@ +

@@ -94,3 +102,41 @@
+ diff --git a/view/theme/frio/templates/comment_item.tpl b/view/theme/frio/templates/comment_item.tpl index 7bce14ee1b..ee09b36f35 100644 --- a/view/theme/frio/templates/comment_item.tpl +++ b/view/theme/frio/templates/comment_item.tpl @@ -1,8 +1,8 @@ {{if $threaded}} -
+
{{else}} -
+
{{/if}}
@@ -61,6 +61,50 @@
+
+ diff --git a/view/theme/frio/templates/head.tpl b/view/theme/frio/templates/head.tpl index 7851dacbd4..b506ad2786 100644 --- a/view/theme/frio/templates/head.tpl +++ b/view/theme/frio/templates/head.tpl @@ -55,6 +55,8 @@ media="screen" /> + {{foreach $stylesheets as $stylesheetUrl => $media}} @@ -137,6 +139,7 @@ {{/if}} + {{* Include the strings which are needed for some js functions (e.g. translation) They are loaded into the html so that js functions can use them *}} diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl index c38e8531c6..285b8e8d7f 100644 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@ -70,7 +70,7 @@
-