diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/basebuildpage.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/basebuildpage.html | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html index e9927ebbaa..8d7c562640 100644 --- a/bitbake/lib/toaster/toastergui/templates/basebuildpage.html +++ b/bitbake/lib/toaster/toastergui/templates/basebuildpage.html | |||
@@ -117,30 +117,32 @@ | |||
117 | {% endwith %} | 117 | {% endwith %} |
118 | 118 | ||
119 | <!-- new custom image from image recipe in this build --> | 119 | <!-- new custom image from image recipe in this build --> |
120 | <button class="btn btn-default btn-block navbar-btn" data-role="new-custom-image-trigger">New custom image</button> | 120 | {% if build.has_image_targets %} |
121 | {% include 'newcustomimage_modal.html' %} | 121 | <button class="btn btn-default btn-block navbar-btn" data-role="new-custom-image-trigger">New custom image</button> |
122 | <script> | 122 | {% include 'newcustomimage_modal.html' %} |
123 | // imageRecipes includes both custom image recipes and built-in | 123 | <script> |
124 | // image recipes, any of which can be used as the basis for a | 124 | // imageRecipes includes both custom image recipes and built-in |
125 | // new custom image | 125 | // image recipes, any of which can be used as the basis for a |
126 | var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }}; | 126 | // new custom image |
127 | var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }}; | ||
127 | 128 | ||
128 | $(document).ready(function () { | 129 | $(document).ready(function () { |
129 | var newCustomImageModal = $('#new-custom-image-modal'); | 130 | var newCustomImageModal = $('#new-custom-image-modal'); |
130 | var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]'); | 131 | var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]'); |
131 | 132 | ||
132 | // show create new custom image modal to select an image built | 133 | // show create new custom image modal to select an image built |
133 | // during this build as the basis for the custom recipe | 134 | // during this build as the basis for the custom recipe |
134 | newCustomImageTrigger.click(function () { | 135 | newCustomImageTrigger.click(function () { |
135 | if (!imageRecipes.length) { | 136 | if (!imageRecipes.length) { |
136 | return; | 137 | return; |
137 | } | 138 | } |
138 | 139 | ||
139 | newCustomImageModalSetRecipes(imageRecipes); | 140 | newCustomImageModalSetRecipes(imageRecipes); |
140 | newCustomImageModal.modal('show'); | 141 | newCustomImageModal.modal('show'); |
142 | }); | ||
141 | }); | 143 | }); |
142 | }); | 144 | </script> |
143 | </script> | 145 | {% endif %} |
144 | </ul> | 146 | </ul> |
145 | 147 | ||
146 | </div> | 148 | </div> |