mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
Merge pull request #879 from openclassify/muammertop
ads image upload limit
This commit is contained in:
commit
0c470597bb
@ -22,7 +22,8 @@ return [
|
|||||||
'fields' => [
|
'fields' => [
|
||||||
'latest-limit',
|
'latest-limit',
|
||||||
'popular_ads_limit',
|
'popular_ads_limit',
|
||||||
'default_view_type',
|
'ads_image_limit',
|
||||||
|
'default_view_type',
|
||||||
'price_area_hidden',
|
'price_area_hidden',
|
||||||
'hide_listing_standard_price',
|
'hide_listing_standard_price',
|
||||||
'hide_zero_price',
|
'hide_zero_price',
|
||||||
|
|||||||
@ -362,4 +362,10 @@ return [
|
|||||||
"default_value" => '#00a651',
|
"default_value" => '#00a651',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'ads_image_limit' => [
|
||||||
|
"type" => "anomaly.field_type.integer",
|
||||||
|
"config" => [
|
||||||
|
"default_value" => 25
|
||||||
|
]
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|||||||
@ -16,6 +16,7 @@ $(function () {
|
|||||||
var dropzone = new Dropzone('.dropzone:not(data-initialized)',
|
var dropzone = new Dropzone('.dropzone:not(data-initialized)',
|
||||||
{
|
{
|
||||||
paramName: 'upload',
|
paramName: 'upload',
|
||||||
|
maxFiles: imageCount,
|
||||||
resizeWidth: settings_image['resize_width'],
|
resizeWidth: settings_image['resize_width'],
|
||||||
resizeHeight: settings_image['resize_height'],
|
resizeHeight: settings_image['resize_height'],
|
||||||
autoProcessQueue: true,
|
autoProcessQueue: true,
|
||||||
|
|||||||
@ -15,6 +15,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<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 = {
|
var settings_image = {
|
||||||
'resize_width':"{{ setting_value('visiosoft.module.advs::full_image_width') }}",
|
'resize_width':"{{ setting_value('visiosoft.module.advs::full_image_width') }}",
|
||||||
'resize_height':"{{ setting_value('visiosoft.module.advs::full_image_height') }}"
|
'resize_height':"{{ setting_value('visiosoft.module.advs::full_image_height') }}"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user