diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/targets.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/targets.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/targets.html b/bitbake/lib/toaster/toastergui/templates/targets.html index 32a644a743..8776a5d548 100644 --- a/bitbake/lib/toaster/toastergui/templates/targets.html +++ b/bitbake/lib/toaster/toastergui/templates/targets.html | |||
@@ -182,6 +182,14 @@ function show_dependencies_modal(layerId, layerName, layerURL, dependencies) { | |||
182 | $('#dependencies_modal').modal('show'); | 182 | $('#dependencies_modal').modal('show'); |
183 | } | 183 | } |
184 | 184 | ||
185 | function updateLayerCountLabels (amount) { | ||
186 | /* Update the filter labels */ | ||
187 | var countLabel = $("#layer_version__projectlayer__project\\:{{project.id}}_count"); | ||
188 | countLabel.text(Number(countLabel.text())+amount); | ||
189 | |||
190 | var countLabelRemaining = $("#layer_version__projectlayer__project\\:NOT{{project.id}}_count"); | ||
191 | countLabelRemaining.text(Number(countLabelRemaining.text())-amount); | ||
192 | } | ||
185 | 193 | ||
186 | var pressedButton = undefined; | 194 | var pressedButton = undefined; |
187 | 195 | ||
@@ -194,6 +202,8 @@ function layerAdd(layerId, layerName, layerURL, pressedButtonId) { | |||
194 | if (_data.error != "ok") { | 202 | if (_data.error != "ok") { |
195 | alert(_data.error); | 203 | alert(_data.error); |
196 | } else { | 204 | } else { |
205 | updateLayerCountLabels(_data.list.length+1); | ||
206 | |||
197 | if (_data.list.length > 0) { | 207 | if (_data.list.length > 0) { |
198 | show_dependencies_modal(layerId, layerName, layerURL, _data.list); | 208 | show_dependencies_modal(layerId, layerName, layerURL, _data.list); |
199 | } | 209 | } |