mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 03:49:32 +02:00
bitbake: toastergui: Switch to using the new toaster typeahead widget
Switch the existing typeahead inputs to use the new typeahead widget. This means we have a defined mechanism and end point for typeaheads which meets the design specification. (Bitbake rev: 31a8ae7909347f7b6edde5bbdf02b86dc1b32ed0) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
73367c2ca8
commit
aff29d2cd8
@@ -16,7 +16,7 @@ function importLayerPageInit (ctx) {
|
||||
var currentLayerDepSelection;
|
||||
var validLayerName = /^(\w|-)+$/;
|
||||
|
||||
libtoaster.makeTypeahead(layerDepInput, libtoaster.ctx.projectLayersUrl, { include_added: "true" }, function(item){
|
||||
libtoaster.makeTypeahead(layerDepInput, libtoaster.ctx.layersTypeAheadUrl, { include_added: "true" }, function(item){
|
||||
currentLayerDepSelection = item;
|
||||
|
||||
layerDepBtn.removeAttr("disabled");
|
||||
@@ -26,11 +26,11 @@ function importLayerPageInit (ctx) {
|
||||
/* We automatically add "openembedded-core" layer for convenience as a
|
||||
* dependency as pretty much all layers depend on this one
|
||||
*/
|
||||
$.getJSON(libtoaster.ctx.projectLayersUrl,
|
||||
{ include_added: "true" , search: "openembedded-core", format: "json" },
|
||||
$.getJSON(libtoaster.ctx.layersTypeAheadUrl,
|
||||
{ include_added: "true" , search: "openembedded-core" },
|
||||
function(layer) {
|
||||
if (layer.rows.length > 0) {
|
||||
currentLayerDepSelection = layer.rows[0];
|
||||
if (layer.results.length > 0) {
|
||||
currentLayerDepSelection = layer.results[0];
|
||||
layerDepBtn.click();
|
||||
}
|
||||
});
|
||||
@@ -211,7 +211,7 @@ function importLayerPageInit (ctx) {
|
||||
var name = $(this).val();
|
||||
|
||||
/* Check if the layer name exists */
|
||||
$.getJSON(libtoaster.ctx.projectLayersUrl,
|
||||
$.getJSON(libtoaster.ctx.layersTypeAheadUrl,
|
||||
{ include_added: "true" , search: name, format: "json" },
|
||||
function(layer) {
|
||||
if (layer.rows.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user