From 3f20a0e96389718242cb7b017d90465c6d526a07 Mon Sep 17 00:00:00 2001 From: themohooks <81331307+themohooks@users.noreply.github.com> Date: Tue, 9 Jul 2024 00:00:18 +0300 Subject: [PATCH] fix bugs --- app/Models/Comment.php | 2 +- views/pages/Photo.php | 7 ++++++- views/pages/Profile/UploadPhoto.php | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/Models/Comment.php b/app/Models/Comment.php index 827ae9e..98f9158 100644 --- a/app/Models/Comment.php +++ b/app/Models/Comment.php @@ -40,7 +40,7 @@ class Comment {
+ -
'.$symb.Vote::countcommrates($this->c['id'], -1).'
+
'.$symb.Vote::countcommrates($this->c['id'], -1).'
+'.Vote::countcommrates($this->c['id'], 1).' / '.Vote::countcommrates($this->c['id'], 0).'
diff --git a/views/pages/Photo.php b/views/pages/Photo.php index c75b787..022f5c6 100644 --- a/views/pages/Photo.php +++ b/views/pages/Photo.php @@ -196,9 +196,12 @@ if ($photo->i('id') !== null) { +
- + content('type') != 'none') { + ?>

Параметры съёмки

@@ -227,6 +230,7 @@ if ($photo->i('id') !== null) {
+ content('lat') != null && $photo->content('lng') != null) { ?>
@@ -331,6 +335,7 @@ marker.bindPopup("Выбранная точка").openPopup(); window.location.replace(jsonData.twofaurl); }, 1000); } else if (jsonData.errorcode == "0") { + $('#wtext').val(''); Notify.noty('success', 'Комментарий отправлен!'); //$("#result").html(""); $.ajax({ diff --git a/views/pages/Profile/UploadPhoto.php b/views/pages/Profile/UploadPhoto.php index 0d9e595..b346b6b 100644 --- a/views/pages/Profile/UploadPhoto.php +++ b/views/pages/Profile/UploadPhoto.php @@ -852,7 +852,7 @@ $user = new User(Auth::userid()); var percent = $('.percent'); var status = $('#status'); var continuepost = 0; - + $('#submitbtn').prop("disabled", true); @@ -891,6 +891,7 @@ $user = new User(Auth::userid()); Notify.noty('danger', escapeHtml(err.message)); $("#r").html(''); scrollProgressBarWidth(0); + $('#submitbtn').prop("disabled", false); } if (jsonData.errorcode == "1") { @@ -901,6 +902,7 @@ $user = new User(Auth::userid()); //$("#prgrsg").html('
100%
'); Notify.noty('danger', 'В посте нет контента!'); scrollProgressBarWidth(0); + $('#submitbtn').prop("disabled", false); } else if (jsonData.errorcode == "101") { $("#r").html(''); @@ -909,6 +911,7 @@ $user = new User(Auth::userid()); $("#prgrsg").html(''); //$("#prgrsg").html('
100%
'); Notify.noty('danger', 'В посте больше 10 медиафайлов'); + $('#submitbtn').prop("disabled", false); scrollProgressBarWidth(0); } else if (jsonData.errorcode == "0") { Notify.noty('success', 'Успешная публикация!'); @@ -945,6 +948,7 @@ $user = new User(Auth::userid()); //$("#prgrsg").html('
100%
'); Notify.noty('danger', 'Неизвестная ошибка'); scrollProgressBarWidth(0); + $('#submitbtn').prop("disabled", false); } }, error: function(xhr, status, error) { @@ -954,6 +958,7 @@ $user = new User(Auth::userid()); //$("#prgrsg").html('
100%
'); Notify.noty('danger', 'Не удалось опубликовать пост'); scrollProgressBarWidth(0); + $('#submitbtn').prop("disabled", false); }, cache: false, contentType: false,