diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/static/js')
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/libtoaster.js | 3 | ||||
-rw-r--r-- | bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index 2e8863af26..f2c45c833e 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js | |||
@@ -275,7 +275,8 @@ var libtoaster = (function () { | |||
275 | 275 | ||
276 | function _addRmLayer(layerObj, add, doneCb){ | 276 | function _addRmLayer(layerObj, add, doneCb){ |
277 | if (layerObj.xhrLayerUrl === undefined){ | 277 | if (layerObj.xhrLayerUrl === undefined){ |
278 | throw("xhrLayerUrl is undefined") | 278 | alert("ERROR: missing xhrLayerUrl object. Please file a bug."); |
279 | return; | ||
279 | } | 280 | } |
280 | 281 | ||
281 | if (add === true) { | 282 | if (add === true) { |
diff --git a/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js b/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js index dace8e3258..e55fffcef5 100644 --- a/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js +++ b/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js | |||
@@ -25,6 +25,8 @@ function newCustomImageModalInit(){ | |||
25 | var duplicateNameMsg = "An image with this name already exists. Image names must be unique."; | 25 | var duplicateNameMsg = "An image with this name already exists. Image names must be unique."; |
26 | var duplicateImageInProjectMsg = "An image with this name already exists in this project." | 26 | var duplicateImageInProjectMsg = "An image with this name already exists in this project." |
27 | var invalidBaseRecipeIdMsg = "Please select an image to customise."; | 27 | var invalidBaseRecipeIdMsg = "Please select an image to customise."; |
28 | var missingParentRecipe = "The parent recipe file was not found. Cancel this action, build any target (like 'quilt-native') to force all new layers to clone, and try again"; | ||
29 | var unknownError = "Unexpected error: "; | ||
28 | 30 | ||
29 | // set button to "submit" state and enable text entry so user can | 31 | // set button to "submit" state and enable text entry so user can |
30 | // enter the custom recipe name | 32 | // enter the custom recipe name |
@@ -62,6 +64,7 @@ function newCustomImageModalInit(){ | |||
62 | if (nameInput.val().length > 0) { | 64 | if (nameInput.val().length > 0) { |
63 | libtoaster.createCustomRecipe(nameInput.val(), baseRecipeId, | 65 | libtoaster.createCustomRecipe(nameInput.val(), baseRecipeId, |
64 | function(ret) { | 66 | function(ret) { |
67 | showSubmitState(); | ||
65 | if (ret.error !== "ok") { | 68 | if (ret.error !== "ok") { |
66 | console.warn(ret.error); | 69 | console.warn(ret.error); |
67 | if (ret.error === "invalid-name") { | 70 | if (ret.error === "invalid-name") { |
@@ -73,6 +76,10 @@ function newCustomImageModalInit(){ | |||
73 | } else if (ret.error === "image-already-exists") { | 76 | } else if (ret.error === "image-already-exists") { |
74 | showNameError(duplicateImageInProjectMsg); | 77 | showNameError(duplicateImageInProjectMsg); |
75 | return; | 78 | return; |
79 | } else if (ret.error === "recipe-parent-not-exist") { | ||
80 | showNameError(missingParentRecipe); | ||
81 | } else { | ||
82 | showNameError(unknownError + ret.error); | ||
76 | } | 83 | } |
77 | } else { | 84 | } else { |
78 | imgCustomModal.modal('hide'); | 85 | imgCustomModal.modal('hide'); |