From 2d428c8482bfabf998cb29ab6a3d0c32106cfd17 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 4 Feb 2020 09:52:23 +0300 Subject: [PATCH 1/3] move favicon --- .../advs-module/resources/config/settings/sections.php | 2 +- .../advs-module/resources/config/settings/settings.php | 7 ------- .../visiosoft/profile-module/src/ProfileModuleSeeder.php | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) 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 390e75b9d..b7b6f66a0 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php @@ -9,7 +9,7 @@ return [ 'general' => [ 'title' => 'visiosoft.module.advs::section.general', 'fields' => [ - 'favicon', 'iban_numbers', 'google_statistic_code', 'ogImage', 'free_currencyconverterapi_key', + 'iban_numbers', 'google_statistic_code', 'ogImage', 'free_currencyconverterapi_key', 'enabled_currencies' ], 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 40ac2c46c..7567e529e 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php @@ -17,13 +17,6 @@ return [ 'default_value' => 5, ], ], - "favicon" => [ - "type" => "anomaly.field_type.file", - "config" => [ - "folders" => ['favicon'], - "mode" => "upload", - ] - ], 'auto_approve' => [ 'type' => 'anomaly.field_type.boolean', 'bind' => 'adv.auto_approve', diff --git a/addons/default/visiosoft/profile-module/src/ProfileModuleSeeder.php b/addons/default/visiosoft/profile-module/src/ProfileModuleSeeder.php index f921bf9c3..784b0ef9b 100644 --- a/addons/default/visiosoft/profile-module/src/ProfileModuleSeeder.php +++ b/addons/default/visiosoft/profile-module/src/ProfileModuleSeeder.php @@ -72,7 +72,7 @@ class ProfileModuleSeeder extends Seeder 'slug' => 'favicon', 'disk' => $disk, 'allowed_types' => [ - 'ico','png' + 'ico','png', ], ] ); From 1eb8d34dff7234597271e512d386e7b7f985750f Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 4 Feb 2020 11:35:32 +0300 Subject: [PATCH 2/3] phone field updated --- .../base-theme/resources/css/intlTelInput.css | 11 ++++++++--- .../visiosoft/base-theme/resources/css/theme.css | 4 ---- .../base-theme/resources/js/phonefield.js | 13 +++++++++++++ .../base-theme/resources/js/theme/initialize.js | 15 --------------- .../addons/anomaly/users-module/register.twig | 9 ++++++++- .../resources/views/partials/assets.twig | 2 -- .../resources/views/partials/metadata.twig | 1 - 7 files changed, 29 insertions(+), 26 deletions(-) create mode 100644 addons/default/visiosoft/base-theme/resources/js/phonefield.js diff --git a/addons/default/visiosoft/base-theme/resources/css/intlTelInput.css b/addons/default/visiosoft/base-theme/resources/css/intlTelInput.css index 756992a04..eebd0d0ee 100644 --- a/addons/default/visiosoft/base-theme/resources/css/intlTelInput.css +++ b/addons/default/visiosoft/base-theme/resources/css/intlTelInput.css @@ -916,13 +916,18 @@ .iti__flag { height: 15px; box-shadow: 0px 0px 1px 0px #888; - background-image: url('{{ img("theme::images/flags.png").url }}'); + background-image: url('{{ img("visiosoft.theme.base::images/flags.png").url }}'); background-repeat: no-repeat; background-color: #DBDBDB; background-position: 20px 0; } @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { .iti__flag { - background-image: url('{{ img("theme::images/flags@2x.png").url }}'); } } + background-image: url('{{ img("visiosoft.theme.base::images/flags@2x.png").url }}'); } } .iti__flag.iti__np { - background-color: transparent; } \ No newline at end of file + background-color: transparent; +} + +.iti--allow-dropdown { + width: 100%; +} \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/css/theme.css b/addons/default/visiosoft/base-theme/resources/css/theme.css index 1b6de2d92..466f6e6d0 100644 --- a/addons/default/visiosoft/base-theme/resources/css/theme.css +++ b/addons/default/visiosoft/base-theme/resources/css/theme.css @@ -19,10 +19,6 @@ width: 100%; } -.register-phone .iti--allow-dropdown { - width: 100%; -} - @media only screen and (min-width: 960px) { .login-section, .register-section { diff --git a/addons/default/visiosoft/base-theme/resources/js/phonefield.js b/addons/default/visiosoft/base-theme/resources/js/phonefield.js new file mode 100644 index 000000000..4dbe2ba3a --- /dev/null +++ b/addons/default/visiosoft/base-theme/resources/js/phonefield.js @@ -0,0 +1,13 @@ +var inputQuery = document.querySelector("input[name=\"phone\"]"); +var iti = intlTelInput(inputQuery, { + hiddenInput: "full_phone", + class:"form-control", + initialCountry: "auto", + geoIpLookup: function (success, failure) { + $.get("https://ipinfo.io", function () { + }, "jsonp").always(function (resp) { + var countryCode = (resp && resp.country) ? resp.country : ""; + success(countryCode); + }); + } +}); diff --git a/addons/default/visiosoft/base-theme/resources/js/theme/initialize.js b/addons/default/visiosoft/base-theme/resources/js/theme/initialize.js index 522a3b000..be480dac4 100644 --- a/addons/default/visiosoft/base-theme/resources/js/theme/initialize.js +++ b/addons/default/visiosoft/base-theme/resources/js/theme/initialize.js @@ -3,18 +3,3 @@ // Go! })(window, document); - - -var inputQuery = document.querySelector("input[name=\"phone\"]"); -var iti = intlTelInput(inputQuery, { - hiddenInput: "full_phone", - class:"form-control", - initialCountry: "auto", - geoIpLookup: function (success, failure) { - $.get("https://ipinfo.io", function () { - }, "jsonp").always(function (resp) { - var countryCode = (resp && resp.country) ? resp.country : ""; - success(countryCode); - }); - } -}); diff --git a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/register.twig b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/register.twig index 672b0a049..dbd572ad5 100644 --- a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/register.twig +++ b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/register.twig @@ -103,4 +103,11 @@ -{% endblock %} \ No newline at end of file + + {{ asset_add("scripts.js", "visiosoft.theme.base::js/intlTelInput.min.js") }} + {{ asset_add("scripts.js", "visiosoft.theme.base::js/utils.js") }} + {{ asset_add("scripts.js", "visiosoft.theme.base::js/phonefield.js") }} + {{ asset_add("styles.css", "visiosoft.theme.base::css/intlTelInput.css") }} + +{% endblock %} + diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/assets.twig b/addons/default/visiosoft/base-theme/resources/views/partials/assets.twig index a08bd217d..974c67e87 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/assets.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/assets.twig @@ -8,8 +8,6 @@ {{ asset_add("theme.js", "theme::js/modal_include.js") }} {{ asset_add("theme.js", "theme::js/select2.js") }} {{ asset_add("theme.js", "theme::js/params.js") }} -{{ asset_add("theme.js", "theme::js/intlTelInput.min.js") }} -{{ asset_add("theme.js", "theme::js/utils.js") }} {# Theme Scripts #} {#{{ asset_add("theme.js", "theme::js/plugins/*") }}#} diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/metadata.twig b/addons/default/visiosoft/base-theme/resources/views/partials/metadata.twig index 90e8ea8bb..59f8bdb9a 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/metadata.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/metadata.twig @@ -36,7 +36,6 @@ {{ asset_add("theme.css", "theme::css/theme.css") }} {{ asset_add("theme.css", "theme::css/select2.css") }} {{ asset_add("theme.css", "theme::css/font-awesome.min.css") }} -{{ asset_add("theme.css", "theme::css/intlTelInput.css") }} {{ asset_style("theme.css") }} From f5d1163c1d531bb3301416bda911b44270ec76e1 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Tue, 4 Feb 2020 11:48:17 +0300 Subject: [PATCH 3/3] #808 create index_top block --- .../visiosoft/base-theme/resources/views/index/default.twig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/default/visiosoft/base-theme/resources/views/index/default.twig b/addons/default/visiosoft/base-theme/resources/views/index/default.twig index 6b96bd929..01fc2a7b1 100644 --- a/addons/default/visiosoft/base-theme/resources/views/index/default.twig +++ b/addons/default/visiosoft/base-theme/resources/views/index/default.twig @@ -1,3 +1,5 @@ +{{ addBlock('index_top')|raw }} +
{% if setting_value('visiosoft.theme.base::latest_and_view_all_btn') %}