Merge branch 'easy-image-attach' into jakob-new
This commit is contained in:
commit
ecf6a5be3f
8 changed files with 40 additions and 8 deletions
|
@ -1139,7 +1139,11 @@ function photos_content(App $a)
|
|||
'$preview' => DI::l10n()->t('Preview'),
|
||||
'$loading' => DI::l10n()->t('Loading...'),
|
||||
'$qcomment' => $qcomment,
|
||||
'$rand_num' => Crypto::randomDigits(12)
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
// Dropzone
|
||||
//'$max_imagesize' => DI::config()->get('system', 'maximagesize'),
|
||||
// don't know, if DI::config.. does not work here, so it is set to a manual value
|
||||
'$max_imagesize' => 100000,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -1194,7 +1198,11 @@ function photos_content(App $a)
|
|||
'$submit' => DI::l10n()->t('Submit'),
|
||||
'$preview' => DI::l10n()->t('Preview'),
|
||||
'$qcomment' => $qcomment,
|
||||
'$rand_num' => Crypto::randomDigits(12)
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
// Dropzone
|
||||
//'$max_imagesize' => DI::config()->get('system', 'maximagesize'),
|
||||
// don't know, if DI::config.. does not work here, so it is set to a manual value
|
||||
'$max_imagesize' => 200000
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -1268,7 +1276,11 @@ function photos_content(App $a)
|
|||
'$submit' => DI::l10n()->t('Submit'),
|
||||
'$preview' => DI::l10n()->t('Preview'),
|
||||
'$qcomment' => $qcomment,
|
||||
'$rand_num' => Crypto::randomDigits(12)
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
// Dropzone
|
||||
//'$max_imagesize' => DI::config()->get('system', 'maximagesize'),
|
||||
// don't know, if DI::config.. does not work here, so it is set to a manual value
|
||||
'$max_imagesize' => 300000
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -408,6 +408,11 @@ class Conversation
|
|||
|
||||
'$compose_link_title' => $this->l10n->t('Open Compose page'),
|
||||
'$always_open_compose' => $this->pConfig->get($this->session->getLocalUserId(), 'frio', 'always_open_compose', false),
|
||||
// Dropzone
|
||||
//'$max_imagesize' => DI::config()->get('system', 'maximagesize'),
|
||||
// DI::config.. does not work here, so it is set to a manual value
|
||||
'$max_imagesize' => 600000,
|
||||
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
@ -240,6 +240,9 @@ class Compose extends BaseModule
|
|||
'deny_cid' => $contact_deny_list,
|
||||
'deny_gid' => $group_deny_list,
|
||||
]),
|
||||
|
||||
// Dropzone
|
||||
'$max_imagesize' => DI::config()->get('system', 'maximagesize')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,6 +182,11 @@ class Edit extends BaseModule
|
|||
'$shortpermset' => $this->t('Permissions'),
|
||||
|
||||
'$compose_link_title' => $this->t('Open Compose page'),
|
||||
// Dropzone
|
||||
//'$max_imagesize' => DI::config()->get('system', 'maximagesize'),
|
||||
// DI::config.. does not work here, so it is set to a manual value
|
||||
'$max_imagesize' => 500000,
|
||||
|
||||
]);
|
||||
|
||||
return $output;
|
||||
|
|
|
@ -1068,7 +1068,9 @@ class Post
|
|||
'$prompttext' => DI::l10n()->t('Please enter a image/video/audio/webpage URL:'),
|
||||
'$preview' => DI::l10n()->t('Preview'),
|
||||
'$indent' => $indent,
|
||||
'$rand_num' => Crypto::randomDigits(12)
|
||||
'$rand_num' => Crypto::randomDigits(12),
|
||||
// Dropzone
|
||||
'$max_imagesize' => DI::config()->get('system', 'maximagesize'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -97,9 +97,11 @@
|
|||
</div>
|
||||
<script>
|
||||
Dropzone.autoDiscover = false;
|
||||
console.log('compose.tpl', {{$max_imagesize}} / 100000);
|
||||
var maxis = {{$max_imagesize}} / 100000;
|
||||
var dropzoneCompose = new Dropzone( '#comment-edit-form-{{$id}}', {
|
||||
paramName: "userfile", // The name that will be used to transfer the file
|
||||
maxFilesize: 6, // MB - change this to use systemsettings
|
||||
maxFilesize: maxis, // MB
|
||||
previewsContainer: '#dz-previewsCompose',
|
||||
preventDuplicates: true,
|
||||
clickable: true,
|
||||
|
|
|
@ -67,9 +67,11 @@
|
|||
|
||||
<script>
|
||||
Dropzone.autoDiscover = false;
|
||||
console.log('comment_item.tpl', {{$max_imagesize}} / 100000);
|
||||
var maxis = {{$max_imagesize}} / 100000;
|
||||
var dropzone{{$id}} = new Dropzone( '#comment-edit-wrapper-{{$id}}', {
|
||||
paramName: "userfile", // The name that will be used to transfer the file
|
||||
maxFilesize: 6, // MB - change this to use systemsettings
|
||||
maxFilesize: maxis, // MB
|
||||
previewsContainer: '#dz-preview-{{$id}}',
|
||||
preventDuplicates: true,
|
||||
clickable: true,
|
||||
|
|
|
@ -181,9 +181,11 @@ can load different content into the jot moadl (e.g. the item edit jot)
|
|||
</script>
|
||||
<script>
|
||||
Dropzone.autoDiscover = false;
|
||||
console.log('jot.tpl', {{$max_imagesize}} / 100000);
|
||||
var maxis = {{$max_imagesize}} / 100000;
|
||||
var dropzoneJot = new Dropzone( '#jot-modal-body', {
|
||||
paramName: "userfile", // The name that will be used to transfer the file
|
||||
maxFilesize: 6, // MB - change this to use systemsettings
|
||||
maxFilesize: maxis, // MB
|
||||
previewsContainer: '#dz-preview-jot',
|
||||
url: "/media/photo/upload?response=url&album=",
|
||||
accept: function(file, done) {
|
||||
|
@ -208,7 +210,6 @@ can load different content into the jot moadl (e.g. the item edit jot)
|
|||
},
|
||||
});
|
||||
|
||||
// document.onpaste = function(event){
|
||||
$('#jot-modal-body').on('paste', function(event){
|
||||
const items = (event.clipboardData || event.originalEvent.clipboardData).items;
|
||||
items.forEach((item) => {
|
||||
|
|
Loading…
Reference in a new issue