diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js/importlayer.js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/importlayer.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/bitbake/lib/toaster/toastergui/static/js/importlayer.js index d14a8abcaf..ec1cc19e90 100644 --- a/bitbake/lib/toaster/toastergui/static/js/importlayer.js +++ b/bitbake/lib/toaster/toastergui/static/js/importlayer.js | |||
@@ -18,7 +18,7 @@ function importLayerPageInit (ctx) { | |||
18 | 18 | ||
19 | $("#new-project-button").hide(); | 19 | $("#new-project-button").hide(); |
20 | 20 | ||
21 | libtoaster.makeTypeahead(layerDepInput, ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: ctx.projectId, include_added: "true" }, function(item){ | 21 | libtoaster.makeTypeahead(layerDepInput, { type : "layers", project_id: libtoaster.ctx.projectId, include_added: "true" }, function(item){ |
22 | currentLayerDepSelection = item; | 22 | currentLayerDepSelection = item; |
23 | 23 | ||
24 | layerDepBtn.removeAttr("disabled"); | 24 | layerDepBtn.removeAttr("disabled"); |
@@ -28,7 +28,7 @@ function importLayerPageInit (ctx) { | |||
28 | /* We automatically add "openembedded-core" layer for convenience as a | 28 | /* We automatically add "openembedded-core" layer for convenience as a |
29 | * dependency as pretty much all layers depend on this one | 29 | * dependency as pretty much all layers depend on this one |
30 | */ | 30 | */ |
31 | $.getJSON(ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: ctx.projectId, include_added: "true" , value: "openembedded-core" }, function(layer) { | 31 | $.getJSON(libtoaster.ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: libtoaster.ctx.projectId, include_added: "true" , value: "openembedded-core" }, function(layer) { |
32 | if (layer.list.length == 1) { | 32 | if (layer.list.length == 1) { |
33 | currentLayerDepSelection = layer.list[0]; | 33 | currentLayerDepSelection = layer.list[0]; |
34 | layerDepBtn.click(); | 34 | layerDepBtn.click(); |
@@ -63,7 +63,7 @@ function importLayerPageInit (ctx) { | |||
63 | 63 | ||
64 | $("#layer-deps-list").append(newLayerDep); | 64 | $("#layer-deps-list").append(newLayerDep); |
65 | 65 | ||
66 | libtoaster.getLayerDepsForProject(ctx.xhrDataTypeaheadUrl, ctx.projectId, currentLayerDepSelection.id, function (data){ | 66 | libtoaster.getLayerDepsForProject(libtoaster.ctx.projectId, currentLayerDepSelection.id, function (data){ |
67 | /* These are the dependencies of the layer added as a dependency */ | 67 | /* These are the dependencies of the layer added as a dependency */ |
68 | if (data.list.length > 0) { | 68 | if (data.list.length > 0) { |
69 | currentLayerDepSelection.url = ctx.layerDetailsUrl+currentLayerDepSelection.id; | 69 | currentLayerDepSelection.url = ctx.layerDetailsUrl+currentLayerDepSelection.id; |
@@ -137,7 +137,7 @@ function importLayerPageInit (ctx) { | |||
137 | vcs_url: vcsURLInput.val(), | 137 | vcs_url: vcsURLInput.val(), |
138 | git_ref: gitRefInput.val(), | 138 | git_ref: gitRefInput.val(), |
139 | dir_path: $("#layer-subdir").val(), | 139 | dir_path: $("#layer-subdir").val(), |
140 | project_id: ctx.projectId, | 140 | project_id: libtoaster.ctx.projectId, |
141 | layer_deps: layerDepsCsv, | 141 | layer_deps: layerDepsCsv, |
142 | }; | 142 | }; |
143 | 143 | ||
@@ -152,7 +152,7 @@ function importLayerPageInit (ctx) { | |||
152 | } else { | 152 | } else { |
153 | /* Success layer import now go to the project page */ | 153 | /* Success layer import now go to the project page */ |
154 | $.cookie('layer-imported-alert', JSON.stringify(data), { path: '/'}); | 154 | $.cookie('layer-imported-alert', JSON.stringify(data), { path: '/'}); |
155 | window.location.replace(ctx.projectPageUrl+'#/layerimported'); | 155 | window.location.replace(libtoaster.ctx.projectPageUrl+'#/layerimported'); |
156 | } | 156 | } |
157 | }, | 157 | }, |
158 | error: function (data) { | 158 | error: function (data) { |
@@ -211,7 +211,7 @@ function importLayerPageInit (ctx) { | |||
211 | var name = $(this).val(); | 211 | var name = $(this).val(); |
212 | 212 | ||
213 | /* Check if the layer name exists */ | 213 | /* Check if the layer name exists */ |
214 | $.getJSON(ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: ctx.projectId, include_added: "true" , value: name }, function(layer) { | 214 | $.getJSON(libtoaster.ctx.xhrDataTypeaheadUrl, { type : "layers", project_id: libtoaster.ctx.projectId, include_added: "true" , value: name }, function(layer) { |
215 | if (layer.list.length > 0) { | 215 | if (layer.list.length > 0) { |
216 | for (var i in layer.list){ | 216 | for (var i in layer.list){ |
217 | if (layer.list[i].name == name) { | 217 | if (layer.list[i].name == name) { |