mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 15:26:10 -06:00
#1282 fuardayim.com yapılacak alanlar.
This commit is contained in:
parent
61c6277a26
commit
01381a7543
@ -18,6 +18,8 @@ return [
|
||||
'title' => 'visiosoft.module.advs::section.ads',
|
||||
'fields' => [
|
||||
'latest-limit',
|
||||
'default_view_type',
|
||||
'hide_zero_price',
|
||||
'auto_approve',
|
||||
'estimated_pending_time',
|
||||
'default_published_time',
|
||||
|
||||
@ -14,6 +14,19 @@ return [
|
||||
'default_value' => 5,
|
||||
],
|
||||
],
|
||||
'default_view_type' => [
|
||||
'type' => 'anomaly.field_type.select',
|
||||
'config' => [
|
||||
'options' => ['list' => 'List', 'table' => 'Table', 'map' => 'Map', 'gallery' => 'Gallery'],
|
||||
'default_value' => 'list',
|
||||
]
|
||||
],
|
||||
'hide_zero_price' => [
|
||||
'type' => 'anomaly.field_type.boolean',
|
||||
'config' => [
|
||||
'default_value' => false,
|
||||
],
|
||||
],
|
||||
'auto_approve' => [
|
||||
'type' => 'anomaly.field_type.boolean',
|
||||
'bind' => 'adv.auto_approve',
|
||||
|
||||
@ -211,8 +211,9 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
$(".priceField, .priceDecimalField").on('change', function () {
|
||||
var price = parseInt($(".priceField").val().replace(/\./g, ''));
|
||||
var decimal = parseInt($(".priceDecimalField").val());
|
||||
let price = $(".priceField").val() === "" ? '0' : $(".priceField").val();
|
||||
price = parseInt(price.replace(/\./g, ''));
|
||||
let decimal = parseInt($(".priceDecimalField").val());
|
||||
$('.priceHidden').find('input').val(parseFloat(price + "." + decimal));
|
||||
})
|
||||
});
|
||||
|
||||
@ -4,6 +4,13 @@ return [
|
||||
'auto_approve' => [
|
||||
'name' => 'Auto Approve',
|
||||
],
|
||||
'default_view_type' => [
|
||||
'name' => 'Default View Type',
|
||||
],
|
||||
'hide_zero_price' => [
|
||||
'name' => 'Hide Price if Zero',
|
||||
'instructions' => 'Hide the price if the ad price is 0',
|
||||
],
|
||||
'estimated_pending_time' => [
|
||||
'name' => 'Estimated Pending Time',
|
||||
'instructions' => 'In Hours',
|
||||
|
||||
@ -288,6 +288,9 @@ class AdvsController extends PublicController
|
||||
|
||||
public function viewTypeBasedRedirect($viewType, $compact)
|
||||
{
|
||||
if (!$viewType) {
|
||||
$viewType = setting_value('visiosoft.module.advs::default_view_type');
|
||||
}
|
||||
if (isset($viewType) and $viewType == 'table') {
|
||||
return $this->view->make('visiosoft.module.advs::list/table', $compact);
|
||||
} elseif (isset($viewType) and $viewType == 'map') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user