From 5af57723f73abdc3575d7332804607180f080c53 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 18 Feb 2020 14:17:34 +0300 Subject: [PATCH 1/4] add topfields parameters --- .../views/list/partials/list-filter.twig | 348 +++++++++--------- 1 file changed, 176 insertions(+), 172 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig index 72a6defd1..bd079cce5 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig @@ -1,200 +1,204 @@ {% set formHtml %} -
-{% endset %} -{% if 'cat' in param|keys %} + + {% endset %} + {% if 'cat' in param|keys %} {% if not param['cat'] is empty %} - {% set catId = entries('cats', 'category').find(param['cat']) %} - {% set cityId = null %} - {% if 'city' in param|keys %} - {% set citiesArray = param['city'][0]|split(',') %} - {% if count(citiesArray) is same as(1) %} - {% set cityId = entries('location', 'cities').find(param['city'][0]) %} - {% endif %} + {% set catId = entries('cats', 'category').find(param['cat']) %} + {% set cityId = null %} + {% if 'city' in param|keys %} + {% set citiesArray = param['city'][0]|split(',') %} + {% if count(citiesArray) is same as(1) %} + {% set cityId = entries('location', 'cities').find(param['city'][0]) %} {% endif %} - {% set formHtml %} - - {% endset %} {% endif %} -{% endif %} -{{ formHtml }} -
- - -
-
-
+ {% set formHtml %} + + {% endset %} + {% endif %} + {% endif %} + {{ formHtml }} +
+ + +
+
+
- {{ addBlock('ads-list/partials/list-filter',{ - 'mainCats':mainCats, - 'subCats':subCats, - 'ranges':ranges, - 'checkboxes':checkboxes, - 'radio':radio, - 'countries':countries, - 'cities':cities, - 'districts':districts, - 'neighborhoods':neighborhoods, - 'villages':villages, - 'param':param - })|raw }} + {{ addBlock('ads-list/partials/list-filter',{ + 'mainCats':mainCats, + 'subCats':subCats, + 'ranges':ranges, + 'checkboxes':checkboxes, + 'topfields' : topfields, + 'radio':radio, + 'countries':countries, + 'cities':cities, + 'districts':districts, + 'neighborhoods':neighborhoods, + 'villages':villages, + 'param':param + })|raw }} - -
- -
-
-
- - -
-
- - -
-
- - + +
+ +
+
+
+ + +
+
+ + +
+
+ + +
-
- + - -
- -
-
-
- - -
-
- - + +
+ +
+
+
+ + +
+
+ + +
-
- + - -
- -
-
-
- - + +
+ +
+
+
+ + +
-
- + - -
- -
-
- {% set active_currencies = setting_value('visiosoft.module.advs::enabled_currencies') %} -
- -
-
- + +
+ +
+
+ {% set active_currencies = setting_value('visiosoft.module.advs::enabled_currencies') %} +
+ +
+
+ + +
+
+ +
-
- -
-
-
- + -
-
-
- -
+
+
+
+ +
+
-
- \ No newline at end of file + \ No newline at end of file From 0641db14f5dd30bd6d3335e548c2a081d0b91a62 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 18 Feb 2020 18:59:10 +0300 Subject: [PATCH 2/4] remove old js --- .../advs-module/resources/js/list.js | 29 ++----------------- composer.json | 14 +++++---- 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/js/list.js b/addons/default/visiosoft/advs-module/resources/js/list.js index c0d926667..60a1dc800 100644 --- a/addons/default/visiosoft/advs-module/resources/js/list.js +++ b/addons/default/visiosoft/advs-module/resources/js/list.js @@ -1,25 +1,3 @@ -const filter = {}; - -filter.checkUser = () => { - $.ajax({ - type: 'get', - url: '/check_user', - success: function (response) { - if (response.success == true) { - $('#search-fav-modal').modal('toggle'); - } else { - window.location.replace("/login"); - } - }, - error: function (err) { - reject(Error("It broke")); - } - }); -}; - - - - $('.sort-by-item').on('click', function () { let searchParams = new URLSearchParams(window.location.search); var sort_by = searchParams.get('sort_by'); @@ -37,7 +15,8 @@ $('.sort-by-item').on('click', function () { } else { goURL = url + "&sort_by=" + value; } - window.location.replace(goURL); + console.log(goURL) + window.location.href = goURL; }); @@ -151,10 +130,6 @@ $(document).ready(function () { $(value).prev('input').prop('checked', false); $(this).hide(); }); - - $('#save-search').on('click', function () { - filter.checkUser(); - }); }); $('.ad-info-right-bar-video').tooltip({ diff --git a/composer.json b/composer.json index e1a21b042..eb84f5a01 100644 --- a/composer.json +++ b/composer.json @@ -80,7 +80,7 @@ "visiosoft/integer-field_type": "~2.1.0", "guzzlehttp/guzzle": "~6.3.3" }, - "replace" : { + "replace": { "anomaly/streams-platform": "*" }, "require-dev": { @@ -92,16 +92,20 @@ "symfony/dom-crawler": "3.1.*", "anomaly/installer-module": "~2.3.0" }, - "repositories": [ - { + "repositories": { + "0": { "type": "composer", "url": "https://packages.pyrocms.com" }, - { + "1": { "type": "composer", "url": "https://community.pyrocms.com" + }, + "repo-name": { + "type": "composer", + "url": "https://repo.openclassify.com/satis" } - ], + }, "autoload": { "classmap": [ "database" From 1a8560943efa3002bd33408a91968935a7f43f2f Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 18 Feb 2020 19:00:12 +0300 Subject: [PATCH 3/4] Revert "remove old js" This reverts commit 0641db14 --- .../advs-module/resources/js/list.js | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/js/list.js b/addons/default/visiosoft/advs-module/resources/js/list.js index 60a1dc800..c0d926667 100644 --- a/addons/default/visiosoft/advs-module/resources/js/list.js +++ b/addons/default/visiosoft/advs-module/resources/js/list.js @@ -1,3 +1,25 @@ +const filter = {}; + +filter.checkUser = () => { + $.ajax({ + type: 'get', + url: '/check_user', + success: function (response) { + if (response.success == true) { + $('#search-fav-modal').modal('toggle'); + } else { + window.location.replace("/login"); + } + }, + error: function (err) { + reject(Error("It broke")); + } + }); +}; + + + + $('.sort-by-item').on('click', function () { let searchParams = new URLSearchParams(window.location.search); var sort_by = searchParams.get('sort_by'); @@ -15,8 +37,7 @@ $('.sort-by-item').on('click', function () { } else { goURL = url + "&sort_by=" + value; } - console.log(goURL) - window.location.href = goURL; + window.location.replace(goURL); }); @@ -130,6 +151,10 @@ $(document).ready(function () { $(value).prev('input').prop('checked', false); $(this).hide(); }); + + $('#save-search').on('click', function () { + filter.checkUser(); + }); }); $('.ad-info-right-bar-video').tooltip({ From 0b6422c26dcc7eaccf5ef70d6e1c3329c0ee9134 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 18 Feb 2020 19:02:51 +0300 Subject: [PATCH 4/4] revert composer --- composer.json | 274 +++++++++++++++++++++++++------------------------- 1 file changed, 135 insertions(+), 139 deletions(-) diff --git a/composer.json b/composer.json index eb84f5a01..97affb5a5 100644 --- a/composer.json +++ b/composer.json @@ -1,142 +1,138 @@ { - "name": "openclassify/openclassify", - "description": "OpenClassify is the extensible and most advanced open source classified app build with Laravel.", - "type": "project", - "keywords": [ - "OpenClassify", - "classified", - "open Classify" - ], - "license": "MIT", - "authors": [ - { - "name": "Visiosoft, Inc.", - "email": "support@visiosoft.com.tr" - } - ], - "require": { - "wikimedia/composer-merge-plugin": "~1.4.0", - "anomaly/streams-composer-plugin": "~1.1.0", - "visiosoft/streams-platform": "^1.7", - "anomaly/default_authenticator-extension": "~2.1.0", - "anomaly/throttle_security_check-extension": "~2.1.0", - "anomaly/private_storage_adapter-extension": "~1.0.0", - "anomaly/default_page_handler-extension": "~2.1.0", - "anomaly/user_security_check-extension": "~2.1.0", - "anomaly/xml_feed_widget-extension": "~2.1.0", - "anomaly/page_link_type-extension": "~2.1.0", - "anomaly/url_link_type-extension": "~2.1.0", - "anomaly/relationship-field_type": "~2.2.0", - "anomaly/colorpicker-field_type": "~2.3.0", - "anomaly/polymorphic-field_type": "~2.1.0", - "anomaly/checkboxes-field_type": "~2.4.0", - "anomaly/encrypted-field_type": "~2.1.0", - "anomaly/datetime-field_type": "~3.0.0", - "anomaly/repeater-field_type": "~1.3.0", - "anomaly/language-field_type": "~2.2.0", - "anomaly/multiple-field_type": "~2.3.0", - "anomaly/textarea-field_type": "~2.1.0", - "anomaly/markdown-field_type": "~3.1.0", - "anomaly/wysiwyg-field_type": "~3.1.0", - "anomaly/boolean-field_type": "~2.3.0", - "anomaly/country-field_type": "~2.3.0", - "anomaly/decimal-field_type": "~2.1.0", - "anomaly/integer-field_type": "~2.1.0", - "anomaly/editor-field_type": "~3.1.0", - "anomaly/select-field_type": "~2.3.0", - "anomaly/slider-field_type": "~3.0.0", - "anomaly/addon-field_type": "~2.2.0", - "anomaly/email-field_type": "~2.1.0", - "anomaly/state-field_type": "~2.3.0", - "anomaly/files-field_type": "~2.3.0", - "anomaly/tags-field_type": "~2.4.0", - "anomaly/slug-field_type": "~2.1.0", - "anomaly/text-field_type": "~2.2.0", - "anomaly/file-field_type": "~2.2.0", - "anomaly/url-field_type": "~2.2.0", - "anomaly/configuration-module": "~2.1.0", - "anomaly/preferences-module": "~2.2.0", - "anomaly/navigation-module": "~2.4.0", - "anomaly/dashboard-module": "~2.2.0", - "anomaly/redirects-module": "~2.3.0", - "anomaly/variables-module": "~2.4.0", - "anomaly/settings-module": "~2.4.0", - "anomaly/addons-module": "~2.3.0", - "anomaly/blocks-module": "~1.3.0", - "anomaly/search-module": "~3.0.0", - "anomaly/system-module": "~1.0.0", - "anomaly/users-module": "~2.5.0", - "anomaly/pages-module": "~2.6.0", - "anomaly/posts-module": "~2.6.0", - "anomaly/files-module": "~2.6.0", - "anomaly/contact-plugin": "~1.2.0", - "anomaly/helper-plugin": "~2.1.0", - "anomaly/robots-extension": "~2.1.0", - "anomaly/sitemap-extension": "~2.2.0", - "anomaly/html_block-extension": "~1.0.0", - "anomaly/wysiwyg_block-extension": "~1.0.0", - "ammadeuss/laravel-html-dom-parser": "^1.1", - "visiosoft/decimal-field_type": "~2.1.0", - "visiosoft/integer-field_type": "~2.1.0", - "guzzlehttp/guzzle": "~6.3.3" - }, - "replace": { - "anomaly/streams-platform": "*" - }, - "require-dev": { - "filp/whoops": "~2.0", - "phpunit/phpunit": "^7.0", - "fzaninotto/faker": "~1.4", - "mockery/mockery": "0.9.*", - "symfony/css-selector": "3.1.*", - "symfony/dom-crawler": "3.1.*", - "anomaly/installer-module": "~2.3.0" - }, - "repositories": { - "0": { - "type": "composer", - "url": "https://packages.pyrocms.com" - }, - "1": { - "type": "composer", - "url": "https://community.pyrocms.com" - }, - "repo-name": { - "type": "composer", - "url": "https://repo.openclassify.com/satis" - } - }, - "autoload": { - "classmap": [ - "database" - ], - "psr-4": { - "App\\": "app/" - } - }, - "autoload-dev": { - "classmap": [ - "tests/TestCase.php" - ] - }, - "extra": { - "merge-plugin": { - "include": [ - "addons/*/*/*/composer.json", - "core/*/*/composer.json" - ], - "recurse": true, - "replace": false - }, - "laravel": { - "dont-discover": [ - "*" - ] - } - }, - "config": { - "bin-dir": "bin", - "preferred-install": "dist", - "optimize-autoloader": true + "name": "openclassify/openclassify", + "description": "OpenClassify is the extensible and most advanced open source classified app build with Laravel.", + "type": "project", + "keywords": [ + "OpenClassify", + "classified", + "open Classify" + ], + "license": "MIT", + "authors": [ + { + "name": "Visiosoft, Inc.", + "email": "support@visiosoft.com.tr" } + ], + "require": { + "wikimedia/composer-merge-plugin": "~1.4.0", + "anomaly/streams-composer-plugin": "~1.1.0", + "visiosoft/streams-platform": "^1.7", + "anomaly/default_authenticator-extension": "~2.1.0", + "anomaly/throttle_security_check-extension": "~2.1.0", + "anomaly/private_storage_adapter-extension": "~1.0.0", + "anomaly/default_page_handler-extension": "~2.1.0", + "anomaly/user_security_check-extension": "~2.1.0", + "anomaly/xml_feed_widget-extension": "~2.1.0", + "anomaly/page_link_type-extension": "~2.1.0", + "anomaly/url_link_type-extension": "~2.1.0", + "anomaly/relationship-field_type": "~2.2.0", + "anomaly/colorpicker-field_type": "~2.3.0", + "anomaly/polymorphic-field_type": "~2.1.0", + "anomaly/checkboxes-field_type": "~2.4.0", + "anomaly/encrypted-field_type": "~2.1.0", + "anomaly/datetime-field_type": "~3.0.0", + "anomaly/repeater-field_type": "~1.3.0", + "anomaly/language-field_type": "~2.2.0", + "anomaly/multiple-field_type": "~2.3.0", + "anomaly/textarea-field_type": "~2.1.0", + "anomaly/markdown-field_type": "~3.1.0", + "anomaly/wysiwyg-field_type": "~3.1.0", + "anomaly/boolean-field_type": "~2.3.0", + "anomaly/country-field_type": "~2.3.0", + "anomaly/decimal-field_type": "~2.1.0", + "anomaly/integer-field_type": "~2.1.0", + "anomaly/editor-field_type": "~3.1.0", + "anomaly/select-field_type": "~2.3.0", + "anomaly/slider-field_type": "~3.0.0", + "anomaly/addon-field_type": "~2.2.0", + "anomaly/email-field_type": "~2.1.0", + "anomaly/state-field_type": "~2.3.0", + "anomaly/files-field_type": "~2.3.0", + "anomaly/tags-field_type": "~2.4.0", + "anomaly/slug-field_type": "~2.1.0", + "anomaly/text-field_type": "~2.2.0", + "anomaly/file-field_type": "~2.2.0", + "anomaly/url-field_type": "~2.2.0", + "anomaly/configuration-module": "~2.1.0", + "anomaly/preferences-module": "~2.2.0", + "anomaly/navigation-module": "~2.4.0", + "anomaly/dashboard-module": "~2.2.0", + "anomaly/redirects-module": "~2.3.0", + "anomaly/variables-module": "~2.4.0", + "anomaly/settings-module": "~2.4.0", + "anomaly/addons-module": "~2.3.0", + "anomaly/blocks-module": "~1.3.0", + "anomaly/search-module": "~3.0.0", + "anomaly/system-module": "~1.0.0", + "anomaly/users-module": "~2.5.0", + "anomaly/pages-module": "~2.6.0", + "anomaly/posts-module": "~2.6.0", + "anomaly/files-module": "~2.6.0", + "anomaly/contact-plugin": "~1.2.0", + "anomaly/helper-plugin": "~2.1.0", + "anomaly/robots-extension": "~2.1.0", + "anomaly/sitemap-extension": "~2.2.0", + "anomaly/html_block-extension": "~1.0.0", + "anomaly/wysiwyg_block-extension": "~1.0.0", + "ammadeuss/laravel-html-dom-parser": "^1.1", + "visiosoft/decimal-field_type": "~2.1.0", + "visiosoft/integer-field_type": "~2.1.0", + "guzzlehttp/guzzle": "~6.3.3" + }, + "replace": { + "anomaly/streams-platform": "*" + }, + "require-dev": { + "filp/whoops": "~2.0", + "phpunit/phpunit": "^7.0", + "fzaninotto/faker": "~1.4", + "mockery/mockery": "0.9.*", + "symfony/css-selector": "3.1.*", + "symfony/dom-crawler": "3.1.*", + "anomaly/installer-module": "~2.3.0" + }, + "repositories": [ + { + "type": "composer", + "url": "https://packages.pyrocms.com" + }, + { + "type": "composer", + "url": "https://community.pyrocms.com" + } + ], + "autoload": { + "classmap": [ + "database" + ], + "psr-4": { + "App\\": "app/" + } + }, + "autoload-dev": { + "classmap": [ + "tests/TestCase.php" + ] + }, + "extra": { + "merge-plugin": { + "include": [ + "addons/*/*/*/composer.json", + "core/*/*/composer.json" + ], + "recurse": true, + "replace": false + }, + "laravel": { + "dont-discover": [ + "*" + ] + } + }, + "config": { + "bin-dir": "bin", + "preferred-install": "dist", + "optimize-autoloader": true + } }