From 359ad6ff5ab4c178591af01e35b5f8bb40380b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Mon, 13 Mar 2023 10:37:12 +0100 Subject: [PATCH] fix a warning and suggestions for pullrequest * fix indentation to tabs * remove unneeded calls for dropzone.min.js and dropzone.min.css * removed debug output --- composer.json | 4 +- composer.lock | 38 ++++++++- src/Content/Conversation.php | 1 - src/Core/ACL.php | 2 - src/Module/Item/Compose.php | 1 - view/templates/item/compose.tpl | 97 +++++++++++----------- view/theme/frio/templates/comment_item.tpl | 79 +++++++++--------- view/theme/frio/templates/head.tpl | 2 +- view/theme/frio/templates/jot.tpl | 81 +++++++++--------- 9 files changed, 164 insertions(+), 141 deletions(-) diff --git a/composer.json b/composer.json index b21c94fde..92dce029f 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "asika/simple-console": "^1.0", "bacon/bacon-qr-code": "^2.0.0", "divineomega/password_exposed": "^2.8", + "enyo/dropzone": "^5.9", "ezyang/htmlpurifier": "^4.7", "friendica/json-ld": "^1.0", "geekwright/po": "^2.0", @@ -72,8 +73,7 @@ "npm-asset/textcomplete": "^0.18.2", "npm-asset/typeahead.js": "^0.11.1", "kornrunner/blurhash": "^1.2", - "psr/clock": "^1.0", - "enyo/dropzone": "^5.9" + "psr/clock": "^1.0" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index f9b96b1d9..3e8ec70de 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5af9ac9003f4653f3aa1860dd5a4d821", + "content-hash": "c9e005c79c8556215c30a66c470659eb", "packages": [ { "name": "asika/simple-console", @@ -550,6 +550,42 @@ "description": "This PHP package provides a `password_exposed` helper function, that uses the haveibeenpwned.com API to check if a password has been exposed in a data breach.", "time": "2019-01-25T12:00:28+00:00" }, + { + "name": "enyo/dropzone", + "version": "v5.9.3", + "source": { + "type": "git", + "url": "https://github.com/dropzone/dropzone-packagist.git", + "reference": "286b2dc1f1195bd12169e4c9d5f91cfbe46e245f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dropzone/dropzone-packagist/zipball/286b2dc1f1195bd12169e4c9d5f91cfbe46e245f", + "reference": "286b2dc1f1195bd12169e4c9d5f91cfbe46e245f", + "shasum": "" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matias Meno", + "email": "m@tias.me", + "homepage": "http://www.yesmeno.com" + } + ], + "description": "Handles drag and drop of files for you.", + "homepage": "http://www.dropzonejs.com", + "keywords": [ + "drag and drop", + "dragndrop", + "file upload", + "upload" + ], + "time": "2021-09-21T17:03:36+00:00" + }, { "name": "ezyang/htmlpurifier", "version": "v4.14.0", diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 7cf207627..249190b1a 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -445,7 +445,6 @@ 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 45f8e1128..4ed8d602a 100644 --- a/src/Core/ACL.php +++ b/src/Core/ACL.php @@ -59,10 +59,8 @@ 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 1bb56a3f7..f53158b1f 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -164,7 +164,6 @@ 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 449c3af4c..21d89d5c4 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -1,11 +1,11 @@

{{$l10n.compose_title}}

- {{if $l10n.always_open_compose}} + {{if $l10n.always_open_compose}}

{{$l10n.always_open_compose nofilter}}

{{/if}}
- {{**}} + {{**}} @@ -13,11 +13,11 @@
- {{if $l10n.placeholdercategory}} + {{if $l10n.placeholdercategory}}
- {{/if}} + {{/if}}

@@ -55,12 +55,12 @@ @@ -71,7 +71,7 @@ -

+

@@ -96,42 +96,41 @@
diff --git a/view/theme/frio/templates/comment_item.tpl b/view/theme/frio/templates/comment_item.tpl index 90a7a2993..b57bf8a07 100644 --- a/view/theme/frio/templates/comment_item.tpl +++ b/view/theme/frio/templates/comment_item.tpl @@ -61,49 +61,46 @@
-
+
diff --git a/view/theme/frio/templates/head.tpl b/view/theme/frio/templates/head.tpl index 4f42f0937..b506ad278 100644 --- a/view/theme/frio/templates/head.tpl +++ b/view/theme/frio/templates/head.tpl @@ -55,7 +55,7 @@ media="screen" /> - {{foreach $stylesheets as $stylesheetUrl => $media}} diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl index 285b8e8d7..015d967be 100644 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@ -152,7 +152,7 @@ -
+
{{if $content}}{{/if}} @@ -180,47 +180,42 @@ can load different content into the jot moadl (e.g. the item edit jot) }); -