From 3a4356dbfea07088b38881abe2c2b5d6bb6c7cf7 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Fri, 8 Aug 2014 17:50:02 +0100 Subject: bitbake: toaster: create project section navigation structure We create the navigation structure for the project section. This includes adding URLs for configuration, builds, all layers, layer details and all targets pages. Changes to existing pages to exemplify navigation links. (Bitbake rev: 6f0cb9d106129eb496a4c009d95b0727378e97c1) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- .../toaster/toastergui/templates/newproject.html | 5 ++- .../lib/toaster/toastergui/templates/project.html | 47 +++++++++++---------- bitbake/lib/toaster/toastergui/urls.py | 11 ++++- bitbake/lib/toaster/toastergui/views.py | 48 +++++++++++++++++++++- 4 files changed, 85 insertions(+), 26 deletions(-) (limited to 'bitbake/lib') 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 () { -