diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/machines.js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/machines.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/machines.js b/bitbake/lib/toaster/toastergui/static/js/machines.js index 973a037be7..fbcafc26b5 100644 --- a/bitbake/lib/toaster/toastergui/static/js/machines.js +++ b/bitbake/lib/toaster/toastergui/static/js/machines.js | |||
@@ -45,7 +45,7 @@ function machinesPageInit (ctx) { | |||
45 | 45 | ||
46 | var layerName = addLayerBtn.data('layer-name'); | 46 | var layerName = addLayerBtn.data('layer-name'); |
47 | alertMsg.children("#layer-affected-name").text(layerName); | 47 | alertMsg.children("#layer-affected-name").text(layerName); |
48 | alertMsg.children("#project-affected-name").text(ctx.projectName).attr('href', ctx.projectPageUrl); | 48 | alertMsg.children("#project-affected-name").text(libtoaster.ctx.projectName).attr('href', libtoaster.ctx.projectPageUrl); |
49 | 49 | ||
50 | $("#alert-area").show(); | 50 | $("#alert-area").show(); |
51 | } | 51 | } |
@@ -61,12 +61,11 @@ function machinesPageInit (ctx) { | |||
61 | name : $(this).data('layer-name'), | 61 | name : $(this).data('layer-name'), |
62 | }; | 62 | }; |
63 | 63 | ||
64 | libtoaster.getLayerDepsForProject(ctx.xhrDataTypeaheadUrl, ctx.projectId, layer.id, function (data) { | 64 | libtoaster.getLayerDepsForProject(libtoaster.ctx.projectId, layer.id, function (data) { |
65 | /* got result for dependencies */ | 65 | /* got result for dependencies */ |
66 | if (data.list.length == 0){ | 66 | if (data.list.length == 0){ |
67 | var editData = { layerAdd : layer.id }; | 67 | var editData = { layerAdd : layer.id }; |
68 | libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, editData, | 68 | libtoaster.editCurrentProject(editData, function() { |
69 | function() { | ||
70 | setLayerInCurrentPrj(btn); | 69 | setLayerInCurrentPrj(btn); |
71 | }); | 70 | }); |
72 | return; | 71 | return; |
@@ -84,9 +83,8 @@ function machinesPageInit (ctx) { | |||
84 | 83 | ||
85 | $(".select-machine-btn").click(function(){ | 84 | $(".select-machine-btn").click(function(){ |
86 | var data = { machineName : $(this).data('machine-name') }; | 85 | var data = { machineName : $(this).data('machine-name') }; |
87 | libtoaster.editProject(ctx.xhrEditProjectUrl, ctx.projectId, data, | 86 | libtoaster.editCurrentProject(data, function (){ |
88 | function (){ | 87 | window.location.replace(libtoaster.ctx.projectPageUrl+"#/machineselected"); |
89 | window.location.replace(ctx.projectPageUrl+"#/machineselected"); | ||
90 | }, null); | 88 | }, null); |
91 | }); | 89 | }); |
92 | 90 | ||