Merge pull request #879 from openclassify/muammertop

ads image upload limit
This commit is contained in:
Fatih Alp 2020-12-25 22:44:47 +03:00 committed by GitHub
commit 0c470597bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 1 deletions

View File

@ -22,7 +22,8 @@ return [
'fields' => [
'latest-limit',
'popular_ads_limit',
'default_view_type',
'ads_image_limit',
'default_view_type',
'price_area_hidden',
'hide_listing_standard_price',
'hide_zero_price',

View File

@ -362,4 +362,10 @@ return [
"default_value" => '#00a651',
]
],
'ads_image_limit' => [
"type" => "anomaly.field_type.integer",
"config" => [
"default_value" => 25
]
]
];

View File

@ -16,6 +16,7 @@ $(function () {
var dropzone = new Dropzone('.dropzone:not(data-initialized)',
{
paramName: 'upload',
maxFiles: imageCount,
resizeWidth: settings_image['resize_width'],
resizeHeight: settings_image['resize_height'],
autoProcessQueue: true,

View File

@ -15,6 +15,11 @@
</div>
<script>
var imageCount = {{ field_type.value|length < setting_value('visiosoft.module.advs::ads_image_limit')
? setting_value('visiosoft.module.advs::ads_image_limit') - field_type.value|length
: 0 }}
var settings_image = {
'resize_width':"{{ setting_value('visiosoft.module.advs::full_image_width') }}",
'resize_height':"{{ setting_value('visiosoft.module.advs::full_image_height') }}"