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) {