use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\Session\Capability\IHandleUserSessions;
+use Friendica\DI;
use Friendica\Model\Contact;
use Friendica\Model\Post;
use Friendica\Model\User;
use Friendica\Navigation\SystemMessages;
use Friendica\Network\HTTPException;
use Friendica\Util\Crypto;
+use Friendica\Util\Strings;
use Friendica\Util\Profiler;
-use Friendica\DI;
use Psr\Log\LoggerInterface;
/**
'$compose_link_title' => $this->t('Open Compose page'),
// Dropzone
+ //'$max_imagesize' => Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize'));
+ //'$max_imagesize' => \Friendica\\Util\\Strings::getBytesFromShorthand(DI::config()->get('system', 'maximagesize'));
+ // both not working, so just workaround here until fixed
'$max_imagesize' => DI::config()->get('system', 'maximagesize'),
]);
-<div class="generic-page-wrapper">
+<div class="generic-page-wrapper"css>
<h2>{{$l10n.compose_title}}</h2>
{{if $l10n.always_open_compose}}
<p>{{$l10n.always_open_compose nofilter}}</p>
</div>
<script>
Dropzone.autoDiscover = false;
- var maxis = {{$max_imagesize}} / 100000;
+ var maxis = {{$max_imagesize}} / 10^6;
var dropzoneCompose = new Dropzone( '#comment-edit-form-{{$id}}', {
paramName: "userfile", // The name that will be used to transfer the file
maxFilesize: maxis, // MB
</div>
</div>
- <div id="jot-modal-body" class="modal-body dropzone">
+ <div id="jot-modal-body" class="modal-body">
<form id="profile-jot-form" action="{{$action}}" method="post">
<div id="profile-jot-wrapper" aria-labelledby="jot-text-lnk" role="tabpanel" aria-hidden="false">
<div>
{{* The jot modal - We use a own modal for the jot and not the standard modal
from the page template. This is because the special structure of the jot
(e.g.jot navigation tabs in the modal titel area).
-The in the frio theme the jot will loaded regulary and is hidden by default.)
+Then in the frio theme the jot will loaded regulary and is hidden by default.)
The js function jotShow() loads the jot into the modal. With this structure we
-can load different content into the jot moadl (e.g. the item edit jot)
+can load different content into the jot modal (e.g. the item edit jot)
*}}
<div id="jot-modal" class="modal fade" role="dialog">
<div class="modal-dialog">
- <div id="jot-modal-content" class="modal-content"></div>
+ <div id="jot-modal-content" class="modal-content dropzone"></div>
</div>
</div>
-
<script type="text/javascript">
$('iframe').load(function() {
this.style.height = this.contentWindow.document.body.offsetHeight + 'px';
});
</script>
+
<script>
Dropzone.autoDiscover = false;
- var maxis = {{$max_imagesize}} / 100000;
- var dropzoneJot = new Dropzone( '#jot-modal-body', {
+ var maxis = {{$max_filesize}} / 10^6;
+ var dropzoneJot = new Dropzone( '#jot-modal-content', {
paramName: "userfile", // The name that will be used to transfer the file
maxFilesize: maxis, // MB
previewsContainer: '#dz-preview-jot',
},
});
- $('#jot-modal-body').on('paste', function(event){
+ $('#jot-modal-content').on('paste', function(event){
const items = (event.clipboardData || event.originalEvent.clipboardData).items;
items.forEach((item) => {
if (item.kind === 'file') {