diff --git a/bitbake/lib/toaster/toastergui/templates/newproject.html b/bitbake/lib/toaster/toastergui/templates/newproject.html
index 8f1867a94f..6ee27d12d2 100644
--- a/bitbake/lib/toaster/toastergui/templates/newproject.html
+++ b/bitbake/lib/toaster/toastergui/templates/newproject.html
@@ -28,8 +28,9 @@
diff --git a/bitbake/lib/toaster/toastergui/templates/project.html b/bitbake/lib/toaster/toastergui/templates/project.html
index c859f6bcd1..0ddfeb31ae 100644
--- a/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/bitbake/lib/toaster/toastergui/templates/project.html
@@ -71,10 +71,29 @@ function postEditAjaxRequest(reqdata) {
})
}
+
+
+
$(document).ready(function () {
setEventHandlers();
+
+ /* Provide XHR calls for the "build" buttons.*/
+ $("button#build-all-button").click( function (evt) {
+ var ajax = $.ajax({
+ type:"POST",
+ url:"{% url 'xhr_projectbuild' project.id %}",
+ headers: { 'X-CSRFToken': $.cookie("csrftoken")},
+ success: function (data, textstatus) {
+ if (data.error != "ok") {
+ alert("XHR fail: " + data.error );
+ }
+ },
+ error: function (jqXHR, textstatus, error) { alert("XHR errored:" + error + "(" + textstatus + ")"); },
+ })
+ });
});
+
@@ -97,23 +116,7 @@ $(document).ready(function () {
-