From 128ea509cd6d9f95faed719695d32db2a89bc09e Mon Sep 17 00:00:00 2001 From: Alessandro Costa de Oliveira Date: Mon, 27 May 2024 14:45:15 -0300 Subject: [PATCH 1/6] composer update uspdev/laravel-usp-theme atualizando o skin ECA --- composer.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composer.lock b/composer.lock index b22ef6a..388b813 100644 --- a/composer.lock +++ b/composer.lock @@ -6712,16 +6712,16 @@ }, { "name": "uspdev/laravel-usp-theme", - "version": "2.8.4", + "version": "2.8.5", "source": { "type": "git", "url": "https://github.com/uspdev/laravel-usp-theme.git", - "reference": "03535217c41643eae5923aa3101d822c8c30d15a" + "reference": "e3f9a0940cafcee7d80605a10176e402ab74da1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/uspdev/laravel-usp-theme/zipball/03535217c41643eae5923aa3101d822c8c30d15a", - "reference": "03535217c41643eae5923aa3101d822c8c30d15a", + "url": "https://api.github.com/repos/uspdev/laravel-usp-theme/zipball/e3f9a0940cafcee7d80605a10176e402ab74da1d", + "reference": "e3f9a0940cafcee7d80605a10176e402ab74da1d", "shasum": "" }, "type": "library", @@ -6756,9 +6756,9 @@ "description": "usp theme for laravel", "support": { "issues": "https://github.com/uspdev/laravel-usp-theme/issues", - "source": "https://github.com/uspdev/laravel-usp-theme/tree/2.8.4" + "source": "https://github.com/uspdev/laravel-usp-theme/tree/2.8.5" }, - "time": "2024-05-07T18:27:19+00:00" + "time": "2024-05-27T17:38:23+00:00" }, { "name": "uspdev/laravel-usp-validators", @@ -9520,5 +9520,5 @@ "php": "^7.3|^8.1" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } From 2e53ef39d90636fcf58299d7cdd882b47673eb0a Mon Sep 17 00:00:00 2001 From: Alessandro Costa de Oliveira Date: Tue, 28 May 2024 11:40:52 -0300 Subject: [PATCH 2/6] =?UTF-8?q?Ajustando=20os=20links=20nos=20coment=C3=A1?= =?UTF-8?q?rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../show/card-comentarios-user.blade.php | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/resources/views/chamados/show/card-comentarios-user.blade.php b/resources/views/chamados/show/card-comentarios-user.blade.php index 51ff8aa..aaa254d 100644 --- a/resources/views/chamados/show/card-comentarios-user.blade.php +++ b/resources/views/chamados/show/card-comentarios-user.blade.php @@ -33,16 +33,36 @@ @section('javascripts_bottom') @parent From 17ea643f15f08643100f0915c7bafa501b582cf4 Mon Sep 17 00:00:00 2001 From: Alessandro Costa de Oliveira Date: Tue, 28 May 2024 13:06:25 -0300 Subject: [PATCH 3/6] Considerando as quebras de linha --- .../views/chamados/show/card-comentarios-user.blade.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/views/chamados/show/card-comentarios-user.blade.php b/resources/views/chamados/show/card-comentarios-user.blade.php index aaa254d..79f6a9a 100644 --- a/resources/views/chamados/show/card-comentarios-user.blade.php +++ b/resources/views/chamados/show/card-comentarios-user.blade.php @@ -48,12 +48,11 @@ function validURL(str) { '(\\#[-a-z\\d_]*)?$','i'); // fragment locator return !!pattern.test(str); } - /* Procura palavra por palavra formato de url e converte em tag html - TODO: Considerar as quebras de linha - */ + /* Procura palavra por palavra formato de url e converte em tag html */ $(function() { $("#comentario").on("blur", function() { var text = $(this).val(); + text = text.replace(/(?:\r\n|\r|\n)/g, "
"); var array = text.trim().split(/\s+/); var html = ''; for (var i = 0; i < array.length; i++) { From fa2e3bbd5a6d897b34e82bb4df5274645a456518 Mon Sep 17 00:00:00 2001 From: Alessandro Costa de Oliveira Date: Tue, 28 May 2024 13:37:57 -0300 Subject: [PATCH 4/6] Considerando o protocolo --- .../views/chamados/show/card-comentarios-user.blade.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/views/chamados/show/card-comentarios-user.blade.php b/resources/views/chamados/show/card-comentarios-user.blade.php index 79f6a9a..ae9153a 100644 --- a/resources/views/chamados/show/card-comentarios-user.blade.php +++ b/resources/views/chamados/show/card-comentarios-user.blade.php @@ -48,15 +48,19 @@ function validURL(str) { '(\\#[-a-z\\d_]*)?$','i'); // fragment locator return !!pattern.test(str); } - /* Procura palavra por palavra formato de url e converte em tag html */ + /* Procura palavra por palavra formato de url e converte em tag html + Precisa considerar as quebras de linha + */ $(function() { $("#comentario").on("blur", function() { var text = $(this).val(); - text = text.replace(/(?:\r\n|\r|\n)/g, "
"); var array = text.trim().split(/\s+/); var html = ''; for (var i = 0; i < array.length; i++) { if (validURL(array[i])) { + if (array[i].search("http://") === -1) { + array[i] = "http://" + array[i]; + } array[i] = "" + array[i] + ""; } html += array[i] + " "; From 29a894613f0810c5056fbf5e39968f5c71ba9d07 Mon Sep 17 00:00:00 2001 From: Alessandro Costa de Oliveira Date: Tue, 28 May 2024 13:57:33 -0300 Subject: [PATCH 5/6] Considerando o protocolo --- resources/views/chamados/show/card-comentarios-user.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/chamados/show/card-comentarios-user.blade.php b/resources/views/chamados/show/card-comentarios-user.blade.php index ae9153a..4304822 100644 --- a/resources/views/chamados/show/card-comentarios-user.blade.php +++ b/resources/views/chamados/show/card-comentarios-user.blade.php @@ -58,7 +58,7 @@ function validURL(str) { var html = ''; for (var i = 0; i < array.length; i++) { if (validURL(array[i])) { - if (array[i].search("http://") === -1) { + if (array[i].search('http://') === -1 && array[i].search('https://') === -1) { array[i] = "http://" + array[i]; } array[i] = "" + array[i] + ""; From ea712a8b36bbd52aa60582b50fe38a019785d236 Mon Sep 17 00:00:00 2001 From: Alessandro Costa de Oliveira Date: Tue, 28 May 2024 14:15:47 -0300 Subject: [PATCH 6/6] Considerando as quebras de linha --- .../views/chamados/show/card-comentarios-user.blade.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/views/chamados/show/card-comentarios-user.blade.php b/resources/views/chamados/show/card-comentarios-user.blade.php index 4304822..15083a9 100644 --- a/resources/views/chamados/show/card-comentarios-user.blade.php +++ b/resources/views/chamados/show/card-comentarios-user.blade.php @@ -48,13 +48,12 @@ function validURL(str) { '(\\#[-a-z\\d_]*)?$','i'); // fragment locator return !!pattern.test(str); } - /* Procura palavra por palavra formato de url e converte em tag html - Precisa considerar as quebras de linha - */ + /* Procura palavra por palavra formato de url e converte em tag html */ $(function() { $("#comentario").on("blur", function() { var text = $(this).val(); - var array = text.trim().split(/\s+/); + var text1 = text.replace(/(?:\r\n|\r|\n)/g, '
'); + var array = text1.trim().split(/\s+/); var html = ''; for (var i = 0; i < array.length; i++) { if (validURL(array[i])) {