From bec5d164717c6987f81d47d75942e94538649dad Mon Sep 17 00:00:00 2001 From: Michael Wood Date: Tue, 21 Apr 2015 11:59:37 +0100 Subject: bitbake: toaster: Refactor and expand layer add remove mechanism We have multiple pages which have buttons to add and remove layers this patch adds functionality to libtoaster to abstract this and implements it in the pages affected. We handle loading and showing the dependencies dialog here too and generating the notification messages. Also implemented is using the selectmachine api from the projectapp to avoid having to handle this in each page that allows selecting machines. A small number of jshint issues, help text and the machine page name have also been fixed. (Bitbake rev: ae7a656ba7fc6f4356b57aa309a9b6d035e51d2e) Signed-off-by: Michael Wood Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/static/js/importlayer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bitbake/lib/toaster/toastergui/static/js/importlayer.js') diff --git a/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/bitbake/lib/toaster/toastergui/static/js/importlayer.js index ec1cc19e90..875cc342b8 100644 --- a/bitbake/lib/toaster/toastergui/static/js/importlayer.js +++ b/bitbake/lib/toaster/toastergui/static/js/importlayer.js @@ -117,10 +117,10 @@ function importLayerPageInit (ctx) { var body = ""+layer.name+"'s dependencies ("+ depNames.join(", ")+") require some layers that are not added to your project. Select the ones you want to add:

"; - show_layer_deps_modal(ctx.projectId, layer, depDepsArray, title, body, false, function(selected){ - /* Add the accepted dependencies to the allDeps array */ - if (selected.length > 0){ - allDeps = allDeps.concat (selected); + showLayerDepsModal(layer, depDepsArray, title, body, false, function(layerObsList){ + /* Add the accepted layer dependencies' ids to the allDeps array */ + for (var key in layerObsList){ + allDeps.push(layerObsList[key].id); } import_and_add (); }); -- cgit v1.2.3-54-g00ecf