From f28116ec108ec0651dac9956707358aac00fef13 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Wed, 24 Jun 2015 14:53:21 +0100 Subject: bitbake: toasterui: fixes after html5 compliance testing This patch brings fixes for issues highlighted by HTML5 compliance testing. (Bitbake rev: 7aecb974d44d9bc711ffba5cc65e770811397fba) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/orm/models.py | 4 +++- bitbake/lib/toaster/toastergui/static/js/base.js | 2 +- bitbake/lib/toaster/toastergui/templates/configvars.html | 2 +- .../toastergui/templates/detail_search_header.html | 2 +- .../toastergui/templates/detail_sorted_header.html | 2 +- .../toastergui/templates/generic-toastertable-page.html | 2 ++ bitbake/lib/toaster/toastergui/templates/importlayer.html | 15 +++++++++++++-- bitbake/lib/toaster/toastergui/templates/target.html | 2 +- .../toaster/toastergui/templates/toastertable-simple.html | 4 ++-- .../lib/toaster/toastergui/templates/toastertable.html | 4 ++-- bitbake/lib/toaster/toastergui/views.py | 11 ++++++----- 11 files changed, 33 insertions(+), 17 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py index 8488aa4648..7e8ab16cf5 100644 --- a/bitbake/lib/toaster/orm/models.py +++ b/bitbake/lib/toaster/orm/models.py @@ -180,7 +180,9 @@ class Project(models.Model): if release == None: release = self.release # layers on the same branch or layers specifically set for this project - queryset = Layer_Version.objects.filter((Q(up_branch__name = release.branch_name) & Q(project = None)) | Q(project = self) | Q(build__project = self)) + queryset = Layer_Version.objects.filter(Q(project = self) | Q(build__project = self)) + if release is not None: + queryset = queryset.filter(Q(up_branch__name = release.branch_name) & Q(project = None)) if layer_name is not None: # we select only a layer name queryset = queryset.filter(layer__name = layer_name) diff --git a/bitbake/lib/toaster/toastergui/static/js/base.js b/bitbake/lib/toaster/toastergui/static/js/base.js index d079f23994..f1711c134f 100644 --- a/bitbake/lib/toaster/toastergui/static/js/base.js +++ b/bitbake/lib/toaster/toastergui/static/js/base.js @@ -39,7 +39,7 @@ function basePageInit(ctx) { libtoaster.getProjectInfo(selectedProject.projectPageUrl, function (data) { - if (data.machine.name === undefined || data.layers.length === 0) { + if (data.machine === null || data.machine.name === undefined || data.layers.length === 0) { /* we can't build anything with out a machine and some layers */ $("#new-build-button #targets-form").hide(); $("#new-build-button .alert").show(); diff --git a/bitbake/lib/toaster/toastergui/templates/configvars.html b/bitbake/lib/toaster/toastergui/templates/configvars.html index 89576733c2..8a572ae397 100644 --- a/bitbake/lib/toaster/toastergui/templates/configvars.html +++ b/bitbake/lib/toaster/toastergui/templates/configvars.html @@ -39,7 +39,7 @@
- {% if request.GET.search %}{% endif %} + {% if request.GET.search %}{% endif %}
diff --git a/bitbake/lib/toaster/toastergui/templates/detail_search_header.html b/bitbake/lib/toaster/toastergui/templates/detail_search_header.html index ca8e158cb1..7bea3f47f6 100644 --- a/bitbake/lib/toaster/toastergui/templates/detail_search_header.html +++ b/bitbake/lib/toaster/toastergui/templates/detail_search_header.html @@ -28,7 +28,7 @@ $(document).ready(function() {