diff --git a/Web/static/img/delete.png b/Web/static/img/delete.png
new file mode 100644
index 00000000..352df253
Binary files /dev/null and b/Web/static/img/delete.png differ
diff --git a/Web/static/img/miniature.png b/Web/static/img/miniature.png
new file mode 100644
index 00000000..6eeb6277
Binary files /dev/null and b/Web/static/img/miniature.png differ
diff --git a/Web/static/img/upload.png b/Web/static/img/upload.png
new file mode 100644
index 00000000..e6280bc4
Binary files /dev/null and b/Web/static/img/upload.png differ
diff --git a/Web/static/js/openvk.cls.js b/Web/static/js/openvk.cls.js
index 0ecc385e..571223a0 100644
--- a/Web/static/js/openvk.cls.js
+++ b/Web/static/js/openvk.cls.js
@@ -65,7 +65,6 @@ function toggleMenu(id) {
});
}
}
-
document.addEventListener("DOMContentLoaded", function() { //BEGIN
u("#_photoDelete").on("click", function(e) {
@@ -88,7 +87,66 @@ document.addEventListener("DOMContentLoaded", function() { //BEGIN
return e.preventDefault();
});
-
+ u("#_avatarDelete").on("click", function(e) {
+ var formHtml = "
";
+ u("body").append(formHtml);
+
+ MessageBox(tr('prevention'), tr('delete_photo'), [
+ tr('delete'),
+ tr('close')
+ ], [
+ (function() {
+ u("#tmpPhDelF").nodes[0].submit();
+ }),
+ (function() {
+ u("#tmpPhDelF").remove();
+ }),
+ ]);
+
+ return e.preventDefault();
+ });
+ u("#_newPicture").on("click", function(e) {
+ MessageBox(tr('new_photo'),
+ "
", [
+ tr('upload_button'),
+ tr('close')
+ ], [
+ (function() {
+ u("#tmpPhDelF").nodes[0].submit();
+ }),
+ (function() {
+ u("#tmpPhDelF").remove();
+ }),
+ ]);
+
+ return e.preventDefault();
+ });
+ u("#_newAvatarPicture").on("click", function(e) {
+ MessageBox(tr('new_photo'),
+ "
", [
+ tr('upload_button'),
+ tr('close')
+ ], [
+ (function() {
+ u("#tmpPhDelF").nodes[0].submit();
+ }),
+ (function() {
+ u("#tmpPhDelF").remove();
+ }),
+ ]);
+
+ return e.preventDefault();
+ });
/* @rem-pai why this func wasn't named as "#_deleteDialog"? It looks universal IMO */
u("#_noteDelete").on("click", function(e) {
diff --git a/locales/en.strings b/locales/en.strings
index 98f165b4..bf10cae5 100644
--- a/locales/en.strings
+++ b/locales/en.strings
@@ -210,6 +210,9 @@
"reply" = "Reply";
+"updated_photo_m" = "updated his avatar";
+"updated_photo_f" = "updated her avatar";
+
/* Friends */
"friends" = "Friends";
@@ -326,6 +329,7 @@
"search_group" = "Search group";
"search_by_groups" = "Search by groups";
"search_group_desc" = "Here you can browse through the existing groups and choose a group to suit your needs...";
+"add_photo" = "Add photo";
/* Albums */
@@ -351,6 +355,18 @@
"albums_list_one" = "You have one album";
"albums_list_other" = "You have $1 albums";
+"new_photo" = "Upload new photo";
+
+"real_photo" = "It will be easier for your friends to recognize you, if you upload your real picture.";
+"formats" = "You can upload an image in JPG, GIF or PNG format.";
+"upload_problems" = "If you're having troubles during uploading, try selecting a smaller photo.";
+"webcam_avatar" = "If your computer has a webcam, you can take a photo from the webcam »";
+
+"delete_photo" = "Are you sure you want to delete the photo?";
+"change_miniature" = "Change miniature";
+"good_photo" = "A good photo will make your community more recognizable.";
+"leave_photo" = "Leave post on the wall";
+
/* Notes */
"notes" = "Notes";
@@ -992,7 +1008,6 @@
"error_upload_failed" = "Failed to upload a photo";
"error_old_password" = "Old password does not match";
"error_new_password" = "New password does not match";
-"error_weak_password" = "Password isn't strong enough. It should has at least 8 symbols, at least one capital letter and at least one digit.";
"error_shorturl_incorrect" = "The short address has an incorrect format.";
"error_repost_fail" = "Failed to share post";
"error_data_too_big" = "Attribute '$1' must be at most $2 $3 long";
@@ -1194,7 +1209,7 @@
"warning" = "Warning";
"question_confirm" = "This action can't be undone. Do you really wanna do it?";
-
+"prevention" = "Prevention";
/* User alerts */
"user_alert_scam" = "This account has been reported a lot for scam. Please be careful, especially if he asked for money.";
diff --git a/locales/ru.strings b/locales/ru.strings
index 98928cd5..de6fb383 100644
--- a/locales/ru.strings
+++ b/locales/ru.strings
@@ -187,6 +187,8 @@
"version_incompatibility" = "Не удалось отобразить это вложение. Возможно, база данных несовместима с текущей версией OpenVK.";
"graffiti" = "Граффити";
"reply" = "Ответить";
+"updated_photo_m" = "обновил фотографию на странице";
+"updated_photo_f" = "обновила фотографию на странице";
/* Friends */
@@ -310,6 +312,7 @@
"search_group" = "Поиск группы";
"search_by_groups" = "Поиск по группам";
"search_group_desc" = "Здесь Вы можете просмотреть существующие группы и выбрать группу себе по вкусу...";
+"add_photo" = "Загрузить фотографию";
/* Albums */
@@ -335,6 +338,20 @@
"albums_list_many" = "У Вас $1 альбомов";
"albums_list_other" = "У Вас $1 альбомов";
+"new_photo" = "Загрузка новой фотографии";
+"real_photo" = "Друзьям будет проще узнать Вас, если вы загрузите свою настоящую фотографию.";
+
+"formats" = "Вы можете загрузить изображение в формате JPG, GIF или PNG.";
+"upload_problems" = "Если у Вас возникают проблемы с загрузкой, попробуйте выбрать фотографию меньшего размера.";
+"webcam_avatar" = "Если Ваш компьютер оснащён веб-камерой, Вы можете сделать моментальную фотографию »";
+
+"select_file" = "Выбрать файл";
+"delete_photo" = "Вы уверены, что хотите удалить фотографию?";
+
+"change_miniature" = "Изменить миниатюру";
+"good_photo" = "Хорошее фото сделает Ваше сообщество более узнаваемым.";
+"leave_photo" = "Оставить пост на стене";
+
/* Notes */
"notes" = "Заметки";
@@ -905,7 +922,6 @@
"error_upload_failed" = "Не удалось загрузить фото";
"error_old_password" = "Старый пароль не совпадает";
"error_new_password" = "Новые пароли не совпадает";
-"error_weak_password" = "Ненадёжный пароль. Пароль должен содержать не менее 8 символов, цифры, прописные и строчные буквы";
"error_shorturl_incorrect" = "Короткий адрес имеет некорректный формат.";
"error_repost_fail" = "Не удалось поделиться записью";
"error_data_too_big" = "Аттрибут '$1' не может быть длиннее $2 $3";
@@ -1082,7 +1098,7 @@
"close" = "Закрыть";
"warning" = "Внимание";
"question_confirm" = "Это действие нельзя отменить. Вы действительно уверены в том что хотите сделать?";
-
+"prevention" = "Предупреждение";
/* User alerts */
"user_alert_scam" = "На этот аккаунт много жаловались в связи с мошенничеством. Пожалуйста, будьте осторожны, особенно если у вас попросят денег.";