From 5dcfb032286ff2b2805a6649ead0523a4dba17cf Mon Sep 17 00:00:00 2001 From: Ewout Van Schil Date: Fri, 27 Jul 2018 22:30:21 +0200 Subject: [PATCH] Fix icon-reset not working and show alert to save when uploading icon --- app/views/projects/settings.scala.html | 2 +- public/javascripts/iconUpload.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/projects/settings.scala.html b/app/views/projects/settings.scala.html index a5d8c8366..37d7a0575 100755 --- a/app/views/projects/settings.scala.html +++ b/app/views/projects/settings.scala.html @@ -89,7 +89,7 @@

Description

} -
+
@CSRF.formField
diff --git a/public/javascripts/iconUpload.js b/public/javascripts/iconUpload.js index e3cd39b1a..e87f15291 100644 --- a/public/javascripts/iconUpload.js +++ b/public/javascripts/iconUpload.js @@ -65,6 +65,7 @@ $(function() { $('#update-icon').val('true'); input.val(''); updateButton(); + $('.setting-icon').prepend('
Don\'t forget to save changes!
'); } }); }); @@ -77,6 +78,8 @@ $(function() { $.ajax({ url: url + '/reset', type: 'post', + cache: false, + contentType: 'application/json', complete: function() { reset.empty().text('Reset'); }, @@ -84,6 +87,7 @@ $(function() { preview.css('background-image', 'url(' + url + ')'); input.val(''); updateButton(); + $('.setting-icon .alert').detach(); } }); });