mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 18:32:15 +02:00
Use libtoaster.createCustomRecipe rather than own implementation of this function. (Bitbake rev: 74fa98752b1cf1ad18d35ab6dd25fe7e409133c5) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
29 lines
754 B
JavaScript
29 lines
754 B
JavaScript
"use strict";
|
|
|
|
/* Used for the newcustomimage_modal actions */
|
|
function newCustomImageModalInit(){
|
|
|
|
var newCustomImgBtn = $("#create-new-custom-image-btn");
|
|
var imgCustomModal = $("#new-custom-image-modal");
|
|
|
|
newCustomImgBtn.click(function(e){
|
|
e.preventDefault();
|
|
|
|
var name = imgCustomModal.find('input').val();
|
|
var baseRecipeId = imgCustomModal.data('recipe');
|
|
|
|
if (name.length > 0) {
|
|
imgCustomModal.modal('hide');
|
|
libtoaster.createCustomRecipe(name, baseRecipeId, function(ret) {
|
|
if (ret.error !== "ok") {
|
|
console.warn(ret.error);
|
|
} else {
|
|
window.location.replace(ret.url + '?notify=new');
|
|
}
|
|
});
|
|
} else {
|
|
console.warn("TODO No name supplied");
|
|
}
|
|
});
|
|
}
|