summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/projectpage.js
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-07-06 18:22:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-08 09:57:29 +0100
commit8813726f1d5ea1d78fced7fe52abdf826e529e62 (patch)
tree073689032966641d0f12415002572de1f1d08e72 /bitbake/lib/toaster/toastergui/static/js/projectpage.js
parente1ba2fd331b7f937b8ddf3e83389df5caf33d9e8 (diff)
downloadpoky-8813726f1d5ea1d78fced7fe52abdf826e529e62.tar.gz
bitbake: toaster: add Layer delete front end feature to layerdetails
Add the front end feature to delete a layer from the layer details page. [YOCO #9184] (Bitbake rev: 91815229f60eb9deba7d299f05c69b52ff1df59c) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/projectpage.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/projectpage.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/projectpage.js b/bitbake/lib/toaster/toastergui/static/js/projectpage.js
index 6d92490ba2..df79849e37 100644
--- a/bitbake/lib/toaster/toastergui/static/js/projectpage.js
+++ b/bitbake/lib/toaster/toastergui/static/js/projectpage.js
@@ -58,12 +58,30 @@ function projectPageInit(ctx) {
58 case 'layer-imported': 58 case 'layer-imported':
59 layerImportedNotification(); 59 layerImportedNotification();
60 break; 60 break;
61 case 'layer-deleted':
62 layerDeletedNotification();
61 default: 63 default:
62 break; 64 break;
63 } 65 }
64 } 66 }
65 })(); 67 })();
66 68
69 /* Layer deleted notification */
70 function layerDeletedNotification(){
71 var layer = $.cookie("layer-deleted");
72
73 if (!layer)
74 return;
75
76 var message = "You have deleted <strong>1</strong> layer from your ";
77 message += "project: <strong>" + layer + "</strong>";
78
79 libtoaster.showChangeNotification(message);
80
81 $.removeCookie("layer-deleted", { path: "/"});
82 }
83
84
67 /* Layer imported notification */ 85 /* Layer imported notification */
68 function layerImportedNotification(){ 86 function layerImportedNotification(){
69 var imported = $.cookie("layer-imported-alert"); 87 var imported = $.cookie("layer-imported-alert");