From 41c2983312f49eb08c1bd4549e151e8611a477c7 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Thu, 17 Mar 2022 10:55:52 +0000 Subject: [PATCH] Add warning about http being needed in url --- public/css/app.css | 12 +++++++++++- public/mix-manifest.json | 2 +- resources/assets/sass/_app.scss | 11 ++++++++++- resources/views/items/form.blade.php | 2 ++ resources/views/items/scripts.blade.php | 17 +++++++++++++++++ 5 files changed, 41 insertions(+), 3 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 14d279b19..2e6f369a4 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -320,7 +320,7 @@ body { opacity: 1; width: auto; height: auto; - overflow: auto; + overflow: visible; } .appoptions button.dark { background: #1b1b1b; @@ -825,6 +825,16 @@ body { margin: 0; } +.input { + position: relative; +} +.input .help { + position: absolute; + bottom: -22px; + left: 10px; + color: #c00; +} + div.create { padding: 30px 15px; display: flex; diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 73a541e4b..8eab3e8a9 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { - "/css/app.css": "/css/app.css?id=c5354f371a3887feab28", + "/css/app.css": "/css/app.css?id=bc18c3a0e8475fe00a5a", "/js/app.js": "/js/app.js?id=c95edea425171c6ce8f6" } diff --git a/resources/assets/sass/_app.scss b/resources/assets/sass/_app.scss index e32cb59e7..e4a80b640 100644 --- a/resources/assets/sass/_app.scss +++ b/resources/assets/sass/_app.scss @@ -95,7 +95,7 @@ body { opacity: 1; width: auto; height: auto; - overflow: auto; + overflow: visible; } } button.dark { @@ -624,6 +624,15 @@ body { } } } +.input { + position: relative; + .help { + position: absolute; + bottom: -22px; + left: 10px; + color: #c00; + } +} div.create { padding: 30px 15px; display: flex; diff --git a/resources/views/items/form.blade.php b/resources/views/items/form.blade.php index 3fe559d3c..1cbe07283 100644 --- a/resources/views/items/form.blade.php +++ b/resources/views/items/form.blade.php @@ -38,6 +38,7 @@
{!! Form::text('website', $item->url ?? null, array('placeholder' => __('app.apps.website'), 'id' => 'website', 'class' => 'form-control')) !!} + Don't forget http(s)://
@@ -67,6 +68,7 @@
{!! Form::text('url', $item->url ?? null, array('placeholder' => __('app.url'), 'id' => 'appurl', 'class' => 'form-control')) !!} + Don't forget http(s)://
diff --git a/resources/views/items/scripts.blade.php b/resources/views/items/scripts.blade.php index 5f9d4b943..0e785fe6d 100644 --- a/resources/views/items/scripts.blade.php +++ b/resources/views/items/scripts.blade.php @@ -57,6 +57,23 @@ $('.tags').select2(); + if($('#appurl').val() !== '') { + if ($('#appurl').val().indexOf("://") !== -1) { + $('#appurl').parent().find('.help').hide() + } + } + if($('#website').val() !== '') { + if ($('#website').val().indexOf("://") !== -1) { + $('#website').parent().find('.help').hide() + } + } + $('#appurl, #website').on('input', function () { + if ($(this).val().indexOf("://") !== -1) { + $(this).parent().find('.help').hide() + } + }) + + $('#searchwebsite').on('click', 'button.btn', function (e) { e.preventDefault() let websiteurl = $('#searchwebsite input').val()