summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2015-10-09 10:32:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-11 08:11:29 +0100
commitab896df63ba058f535cb303611574f293c7c680b (patch)
treecacd7c759774a8578e532a41c5ce0e26226040a0 /bitbake/lib/toaster/toastergui/static/js/layerBtn.js
parent41a5f82b4ac0c689df4cfc673ce574c2d70f413c (diff)
downloadpoky-ab896df63ba058f535cb303611574f293c7c680b.tar.gz
bitbake: toaster: Fix stale layer state buttons
Move the "is available to the project" state computation to the template for the Layer add/remove buttons, Recipe build/Add layer as done for the Package add/remove. This is more reliable as we can get an inconsistent state on the front end JS as there are many opportunities for hitting out of date project information. [YOCTO #8294] (Bitbake rev: 43469c3360566ad4897785f14f8717a9bc8b6078) 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/layerBtn.js')
-rw-r--r--bitbake/lib/toaster/toastergui/static/js/layerBtn.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/layerBtn.js b/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
index da0241c62b..7318b3f50e 100644
--- a/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
+++ b/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
@@ -1,6 +1,6 @@
1"use strict"; 1"use strict";
2 2
3function layerBtnsInit(ctx) { 3function layerBtnsInit() {
4 4
5 /* Remove any current bindings to avoid duplicated binds */ 5 /* Remove any current bindings to avoid duplicated binds */
6 $(".layerbtn").unbind('click'); 6 $(".layerbtn").unbind('click');
@@ -80,11 +80,4 @@ function layerBtnsInit(ctx) {
80 imgCustomModal.data('recipe', $(this).data('recipe')); 80 imgCustomModal.data('recipe', $(this).data('recipe'));
81 imgCustomModal.modal('show'); 81 imgCustomModal.modal('show');
82 }); 82 });
83
84 /* Setup the initial state of the buttons */
85
86 for (var i in ctx.projectLayers){
87 $(".layer-exists-" + ctx.projectLayers[i]).show();
88 $(".layer-add-" + ctx.projectLayers[i]).hide();
89 }
90} 83}