diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php index 92d4a8d3c..8ac2928e0 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php @@ -37,6 +37,8 @@ return [ 'create_ad' => [ 'title' => 'visiosoft.module.advs::section.create_ad', 'fields' => [ + 'steps_color', + 'create_ad_button_color', 'hide_standard_price_field', 'hide_options_field', 'hide_village_field', diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php index d3c42dd98..70cb3439a 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php @@ -350,4 +350,16 @@ return [ 'bind' => 'override_text', 'env' => 'OVERRIDE_TEXT', ], + 'steps_color' => [ + "type" => "anomaly.field_type.colorpicker", + "config" => [ + "default_value" => '#209579', + ] + ], + 'create_ad_button_color' => [ + "type" => "anomaly.field_type.colorpicker", + "config" => [ + "default_value" => '#00a651', + ] + ], ]; diff --git a/addons/default/visiosoft/advs-module/resources/css/post-category.css b/addons/default/visiosoft/advs-module/resources/css/post-category.css index e3b8d8645..62a146a6d 100644 --- a/addons/default/visiosoft/advs-module/resources/css/post-category.css +++ b/addons/default/visiosoft/advs-module/resources/css/post-category.css @@ -52,8 +52,9 @@ display: none; } -.next-stap img { +.next-stap svg { width: 60px; + height: 60px; } .next-stap p { @@ -62,7 +63,7 @@ } .btn-1 { - background-color: #00a651; + background-color: {{ setting_value('visiosoft.module.advs::create_ad_button_color') }}; padding: 5px 30px 7px; color: #fff; border: 1px solid #dadada; diff --git a/addons/default/visiosoft/advs-module/resources/css/step.scss b/addons/default/visiosoft/advs-module/resources/css/step.scss index b898317a4..fd08b6c4d 100644 --- a/addons/default/visiosoft/advs-module/resources/css/step.scss +++ b/addons/default/visiosoft/advs-module/resources/css/step.scss @@ -6,16 +6,10 @@ min-width: 0; &.current { - &::after { - background: linear-gradient(to right, #209579 50%, #dfdfdf 50%); - } - .bullet { - color: #209579; background-color: #fff; - border: .2rem solid #209579; @media only screen and (min-width: 768px) { - border: .3rem solid #209579; + border-width: .3rem; } } @@ -43,7 +37,6 @@ left: 0; z-index: -1; width: 100%; - background-color: #209579; @media only screen and (min-width: 768px) { height: .3rem; top: 1.4rem; @@ -58,7 +51,6 @@ display: inline-block; position: relative; line-height: 20px; - background-color: #209579; @media only screen and (min-width: 768px) { height: 3rem; width: 3rem; diff --git a/addons/default/visiosoft/advs-module/resources/css/step2.css b/addons/default/visiosoft/advs-module/resources/css/step2.css new file mode 100644 index 000000000..8cc7f023c --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/css/step2.css @@ -0,0 +1,18 @@ +{% set stepsColor = setting_value('visiosoft.module.advs::steps_color') %} + +#stepProgressBar .step.current .bullet { + color: {{ stepsColor }}; + border: 0.2rem solid {{ stepsColor }}; +} + +#stepProgressBar .step .bullet { + background-color: {{ stepsColor }}; +} + +#stepProgressBar .step.current::after { + background: linear-gradient(to right, {{ stepsColor }} 50%, #dfdfdf 50%); +} + +#stepProgressBar .step::after { + background-color: {{ stepsColor }}; +} diff --git a/addons/default/visiosoft/advs-module/resources/js/cats.js b/addons/default/visiosoft/advs-module/resources/js/cats.js index 2b0536cac..0879d9127 100644 --- a/addons/default/visiosoft/advs-module/resources/js/cats.js +++ b/addons/default/visiosoft/advs-module/resources/js/cats.js @@ -26,7 +26,7 @@ $(document).ready(function () { success: function (response) { hideLoader(); if(response['title'] != undefined){ - response['success'] ? $('.cross-icon').hide() : $('.check-icon').hide(); + response['success'] ? $('.post-icon > svg:last-of-type').hide() : $('.post-icon > svg:first-of-type').hide(); let btn = ''; if (response['link']) { diff --git a/addons/default/visiosoft/advs-module/resources/js/currency_format.js b/addons/default/visiosoft/advs-module/resources/js/currency_format.js deleted file mode 100644 index 5a28e4909..000000000 --- a/addons/default/visiosoft/advs-module/resources/js/currency_format.js +++ /dev/null @@ -1,8 +0,0 @@ -$("input[data-type='currency']").on('blur', function() { - const value = this.value.replace(/,/g, ''); - this.value = parseFloat(value).toLocaleString('en-US', { - style: 'decimal', - maximumFractionDigits: 2, - minimumFractionDigits: 2 - }); -}); \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php index c773d2cce..ab4017740 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php @@ -211,4 +211,12 @@ return [ 'name' => 'Override Text', 'instructions' => 'Old Value:New Value' ], + 'steps_color' => [ + 'name' => 'Steps Color', + 'instructions' => 'Changes the progressive steps color.' + ], + 'create_ad_button_color' => [ + 'name' => 'Create Ad Button Color', + 'instructions' => 'Changes the button that shows up when the new ad category selection is finished.' + ], ]; diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/price-filter.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/price-filter.twig index b62dff2d0..797959112 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/price-filter.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/price-filter.twig @@ -19,14 +19,12 @@
diff --git a/addons/default/visiosoft/advs-module/resources/views/list/table.twig b/addons/default/visiosoft/advs-module/resources/views/list/table.twig index be5e4b1a9..c4a94399b 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/table.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/table.twig @@ -20,7 +20,7 @@ - {{ addBlock('ad-list/partials/table',{'featured_advs':featured_advs})|raw }} + {{ addBlock('ad-list/partials/table',{'featured_advs':featured_advs,'seenList':seenList})|raw }} {% for adv in advs %} diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig index 92757a6ff..24285d9fe 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/partials/steps.twig @@ -1,4 +1,5 @@ diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig index 330d1154c..7bbde4831 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig @@ -47,9 +47,9 @@
-
- - +
+ {{ img('visiosoft.module.advs::images/check.svg').data|raw }} + {{ img('visiosoft.module.advs::images/cross.svg').data|raw }}
diff --git a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php index e24fcf009..72f9efe81 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php +++ b/addons/default/visiosoft/advs-module/src/Adv/AdvRepository.php @@ -445,7 +445,9 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface public function extendAds($allAds, $isAdmin = false) { - if (!is_numeric($allAds)) { + if (is_array($allAds)) { + $advs = $this->newQuery()->whereIn('id', $allAds); + } elseif (!is_numeric($allAds)) { if ($isAdmin && auth()->user()->hasRole('admin')) { $advs = $this->newQuery(); } else { diff --git a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php index 484e10959..7a6e8f6af 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -1244,7 +1244,12 @@ class AdvsController extends PublicController public function extendAll($isAdmin = null) { - $adsExtended = $this->adv_repository->extendAds(true, $isAdmin); + if (\request()->unpublished) { + $allAds = $this->adv_model->pendingAdvsByUser()->pluck('id')->all(); + } else { + $allAds = true; + } + $adsExtended = $this->adv_repository->extendAds($allAds, $isAdmin); $this->messages->success(trans('visiosoft.module.advs::message.extended', ['number' => $adsExtended])); return $this->redirect->back(); } diff --git a/addons/default/visiosoft/location-module/resources/js/filterLocation.js b/addons/default/visiosoft/location-module/resources/js/filterLocation.js index a7846951c..a7c9d9149 100644 --- a/addons/default/visiosoft/location-module/resources/js/filterLocation.js +++ b/addons/default/visiosoft/location-module/resources/js/filterLocation.js @@ -38,6 +38,7 @@ $('.filter-country-btn').on('click', function () { //City $('.filter-city-btn').on('click', function () { var countries_value = $('input[name="country[]"]').val(); + countries_value += ',' + defaultCountry var selected__city_request = $('input[name="city[]"]').val(); if (cities == undefined || $(this).attr('data-parent') != countries_value) { $(this).attr('data-parent', countries_value); @@ -203,8 +204,8 @@ function SelectOnClick() { if ($(this).attr('data-field') == "country") { $('.selected-city').html(''); $('input[name="city[]"]').val(''); - text_html.html(input_text) - $(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true); + // text_html.html(input_text) + // $(".filter-location-body li[data-id='" + id + "'] input[type='checkbox']").prop('checked', true); } if (input_val != "") { @@ -242,10 +243,11 @@ function locationCrud(params, url, type, beforeSend, callback) { } function item(field_name, id, value, abv = '') { + var selected = defaultCountry === id ? "checked" : ""; if (field_name === 'country') { return '
  • \n' + '
  • diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig b/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig index 75107fb3b..225679fb3 100644 --- a/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig +++ b/addons/default/visiosoft/profile-module/resources/views/profile/ads.twig @@ -35,6 +35,9 @@ {{ trans('visiosoft.module.profile::button.extend_all') }} + + {{ trans('visiosoft.module.profile::button.extend_unpublished') }} + {% endif %}

    {{ user.name }}

    - +
    @@ -122,7 +124,7 @@ - {{ profileForm.fields.gsm_phone.input|raw }} + {{ profileForm.fields.gsm_phone.setAttributes({'maxlength': '14'}).input|raw }}
    @@ -130,7 +132,7 @@ - {{ profileForm.fields.office_phone.input|raw }} + {{ profileForm.fields.office_phone.setAttributes({'maxlength': '14'}).input|raw }}
    @@ -138,7 +140,7 @@ - {{ profileForm.fields.land_phone.input|raw }} + {{ profileForm.fields.land_phone.setAttributes({'maxlength': '14'}).input|raw }}
    @@ -146,7 +148,7 @@ - {{ profileForm.fields.birthday.configSet('date_format','Y-m-d').setPlaceholder(now|date('Y-m-d')).input|raw }} + {{ profileForm.fields.birthday.configSet('date_format','Y-m-d').setPlaceholder(now|date(config_get('streams::datetime.date_format'))).input|raw }}
    @@ -221,7 +223,6 @@
    {{ profileForm.close()|raw }} -