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
This commit is contained in:
Jakobus Schürz 2023-03-13 10:37:12 +01:00
parent 6a7f17559e
commit 359ad6ff5a
9 changed files with 164 additions and 141 deletions

View File

@ -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": [
{

38
composer.lock generated
View File

@ -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",

View File

@ -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 = '';

View File

@ -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());

View File

@ -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')) {

View File

@ -99,7 +99,7 @@
Dropzone.autoDiscover = false;
var dropzoneCompose = new Dropzone( '#comment-edit-form-{{$id}}', {
paramName: "userfile", // The name that will be used to transfer the file
maxFilesize: 2, // MB
maxFilesize: 6, // MB - change this to use systemsettings
previewsContainer: '#dz-previewsCompose',
preventDuplicates: true,
clickable: true,
@ -129,7 +129,6 @@
items.forEach((item) => {
if (item.kind === 'file') {
// adds the file to your dropzone instance
console.log(item);
dropzoneCompose.addFile(item.getAsFile())
}
})

View File

@ -69,7 +69,7 @@
Dropzone.autoDiscover = false;
var dropzone{{$id}} = new Dropzone( '#comment-edit-wrapper-{{$id}}', {
paramName: "userfile", // The name that will be used to transfer the file
maxFilesize: 6, // MB
maxFilesize: 6, // MB - change this to use systemsettings
previewsContainer: '#dz-preview-{{$id}}',
preventDuplicates: true,
clickable: true,
@ -99,11 +99,8 @@
items.forEach((item) => {
if (item.kind === 'file') {
// adds the file to your dropzone instance
console.log(item);
dropzone{{$id}}.addFile(item.getAsFile())
}
})
});
</script>

View File

@ -55,7 +55,7 @@
media="screen" />
<link rel="stylesheet" href="view/theme/frio/css/font-awesome.custom.css?v={{$smarty.const.FRIENDICA_VERSION}}"
type="text/css" media="screen" />
<link rel="stylesheet" href="/vendor/enyo/dropzone/dist/min/dropzone.min.css?v={{$smarty.const.FRIENDICA_VERSION}}"
<link rel="stylesheet" href="vendor/enyo/dropzone/dist/min/dropzone.min.css?v={{$smarty.const.FRIENDICA_VERSION}}"
type="text/css" media="screen" />
{{foreach $stylesheets as $stylesheetUrl => $media}}

View File

@ -182,9 +182,8 @@ can load different content into the jot moadl (e.g. the item edit jot)
<script>
Dropzone.autoDiscover = false;
var dropzoneJot = new Dropzone( '#jot-modal-body', {
//var dropzone{{$id}} = new Dropzone( document.body, {
paramName: "userfile", // The name that will be used to transfer the file
maxFilesize: 6, // MB
maxFilesize: 6, // MB - change this to use systemsettings
previewsContainer: '#dz-preview-jot',
url: "/media/photo/upload?response=url&album=",
accept: function(file, done) {
@ -215,12 +214,8 @@ can load different content into the jot moadl (e.g. the item edit jot)
items.forEach((item) => {
if (item.kind === 'file') {
// adds the file to your dropzone instance
console.log(item);
dropzoneJot.addFile(item.getAsFile())
}
})
})
</script>