summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/layerdetails.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerdetails.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index 8165bad5dd..4c0d0426eb 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -391,7 +391,9 @@ function layerDetailsPageInit (ctx) {
391 }); 391 });
392 392
393 $("#layer-delete-confirmed").click(function(){ 393 $("#layer-delete-confirmed").click(function(){
394 $.cookie("layer-deleted", ctx.layerVersion.name, { path: '/'}); 394
395 var message = $('<span>You have deleted <strong>1</strong> layer from your project: <strong id="deleted-layer-name"></strong>');
396 message.find("#deleted-layer-name").text(ctx.layerVersion.name);
395 397
396 $.ajax({ 398 $.ajax({
397 type: "DELETE", 399 type: "DELETE",
@@ -401,7 +403,8 @@ function layerDetailsPageInit (ctx) {
401 if (data.error != "ok") { 403 if (data.error != "ok") {
402 console.warn(data.error); 404 console.warn(data.error);
403 } else { 405 } else {
404 window.location = data.redirect + "?notify=layer-deleted"; 406 libtoaster.setNotification("layer-deleted", message.html());
407 window.location.replace(data.gotoUrl);
405 } 408 }
406 }, 409 },
407 error: function(data) { 410 error: function(data) {