diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/layerBtn.js | 9 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/table.js | 2 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/tests/test.js | 2 |
3 files changed, 3 insertions, 10 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 | ||
3 | function layerBtnsInit(ctx) { | 3 | function 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 | } |
diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index bc81e67a6a..40b5022deb 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js | |||
@@ -130,7 +130,7 @@ function tableInit(ctx){ | |||
130 | tableBody.append(row); | 130 | tableBody.append(row); |
131 | 131 | ||
132 | /* If we have layerbtns then initialise them */ | 132 | /* If we have layerbtns then initialise them */ |
133 | layerBtnsInit(ctx); | 133 | layerBtnsInit(); |
134 | 134 | ||
135 | /* If we have popovers initialise them now */ | 135 | /* If we have popovers initialise them now */ |
136 | $('td > a.btn').popover({ | 136 | $('td > a.btn').popover({ |
diff --git a/bitbake/lib/toaster/toastergui/static/js/tests/test.js b/bitbake/lib/toaster/toastergui/static/js/tests/test.js index d610113029..f0df6e4ac1 100644 --- a/bitbake/lib/toaster/toastergui/static/js/tests/test.js +++ b/bitbake/lib/toaster/toastergui/static/js/tests/test.js | |||
@@ -152,7 +152,7 @@ QUnit.test("Layer details page init", function(assert){ | |||
152 | }); | 152 | }); |
153 | 153 | ||
154 | QUnit.test("Layer btns init", function(assert){ | 154 | QUnit.test("Layer btns init", function(assert){ |
155 | assert.throws(layerBtnsInit({ projectLayers : [] })); | 155 | assert.throws(layerBtnsInit()); |
156 | }); | 156 | }); |
157 | 157 | ||
158 | QUnit.test("Table init", function(assert){ | 158 | QUnit.test("Table init", function(assert){ |