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 <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexandru DAMIAN
2015-06-24 14:53:21 +01:00
committed by Richard Purdie
parent 583e320764
commit f28116ec10
11 changed files with 33 additions and 17 deletions

View File

@@ -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)

View File

@@ -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();

View File

@@ -39,7 +39,7 @@
<div class="row-fluid">
<div class="alert">
<form class="no-results input-append" id="searchform">
<input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
<input id="search" name="search" class="input-xxlarge" type="text" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
<button class="btn" type="submit" value="Search">Search</button>
<button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all variables</button>
</form>

View File

@@ -28,7 +28,7 @@ $(document).ready(function() {
<form id="searchform" class="navbar-search input-append pull-left">
{% endif %}
<input id="search" class="input-xlarge" type="text" placeholder="Search {{search_what}}" name="search" value="{{request.GET.search}}">
<input id="search" class="input-xlarge" type="text" placeholder="Search {{search_what}}" name="search" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}">
<input type="hidden" value="name:+" name="orderby">
<input type="hidden" value="l" name="page">
{% if request.GET.search %}

View File

@@ -9,7 +9,7 @@
<thead>
<!-- Table header row; generated from "tablecols" entry in the context dict -->
<tr>
{% for tc in tablecols %}<th class="{{tc.dclass}} {{tc.clclass}}">
{% for tc in tablecols %}<th class="{%if tc.dclass%}{{tc.dclass}}{% endif %} {%if tc.class %}{{tc.clclass}}{% endif %}">
{%if tc.qhelp%}<i class="icon-question-sign get-help" title="{{tc.qhelp}}"></i>{%endif%}
{%if tc.orderfield%}<a {%if tc.ordericon%} class="sorted" {%endif%}href="javascript:reload_params({'page': 1, 'orderby' : '{{tc.orderfield}}' })">{{tc.name}}</a>{%else%}<span class="muted">{{tc.name}}</span>{%endif%}
{%if tc.ordericon%} <i class="icon-caret-{{tc.ordericon}}"></i>{%endif%}

View File

@@ -11,7 +11,9 @@
{% block projectinfomain %}
<div class="page-header">
<h1>{{title}} (<span class="table-count-{{table_name}}"></span>)
{% if project.release %}
<i class="icon-question-sign get-help heading-help" title="This page lists {{title}} compatible with the release selected for this project, which is {{project.release.description}}"></i>
{% endif %}
</h1>
</div>
<div id="zone1alerts" style="display:none">

View File

@@ -9,6 +9,7 @@
{% block projectinfomain %}
{% if project and project.release %}
<script src="{% static 'js/layerDepsModal.js' %}"></script>
<script src="{% static 'js/importlayer.js' %}"></script>
<script>
@@ -31,9 +32,7 @@
</div>
<form>
{% if project %}
<span class="help-block" style="padding-left:19px;">The layer you are importing must be compatible with <strong>{{project.release.description}}</strong>, which is the release you are using in this project.</span>
{% endif %}
<fieldset class="air">
<legend>Layer repository information</legend>
<div class="alert alert-error" id="import-error" style="display:none">
@@ -131,4 +130,16 @@
</div>
</form>
{% else %} {#project and project release#}
<div class="page-header">
<h1>Import layer</h1>
</div>
<div class="alert alert-info" id="import-error" >
<h3>Unsupported project type</h3>
<p>This project does not support importing layers.</p>
<ul></ul>
</div>
{% endif %}
{% endblock %}

View File

@@ -53,7 +53,7 @@
<div class="row-fluid">
<div class="alert">
<form class="no-results input-append" id="searchform">
<input id="search" name="search" class="input-xxlarge" type="text" value="{{request.GET.search}}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
<input id="search" name="search" class="input-xxlarge" type="text" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
<button class="btn" type="submit" value="Search">Search</button>
<button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all packages</button>
</form>

View File

@@ -29,7 +29,7 @@
<div class="row-fluid" id="no-results-{{table_name}}" style="display:none">
<div class="alert">
<form class="no-results input-append">
<input class="input-xlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/>
<input class="input-xlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>
<a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
<i class="icon-remove"></i>
</a>
@@ -44,7 +44,7 @@
<div class="row-fluid" id="table-chrome-{{table_name}}">
<div class="navbar-search input-append pull-left">
<input class="input-xlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/>
<input class="input-xlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{% if request.GET.search %}{{request.GET.search}}{% endif %}"/>
<a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
<i class="icon-remove"></i>
</a>

View File

@@ -29,7 +29,7 @@
<div class="row-fluid" id="no-results-{{table_name}}" style="display:none">
<div class="alert">
<form class="no-results input-append">
<input class="input-xxlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/>
<input class="input-xxlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search %}{{request.GET.search}}{%endif%}"/>
<a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
<i class="icon-remove"></i>
</a>
@@ -46,7 +46,7 @@
<div class="navbar-inner">
<div class="navbar-search input-append pull-left">
<input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{{request.GET.search}}"/>
<input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
<a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
<i class="icon-remove"></i>
</a>

View File

@@ -165,8 +165,8 @@ def _lv_to_dict(prj, x = None):
return {"id": x.pk,
"name": x.layer.name,
"tooltip": x.layer.vcs_url+" | "+x.get_vcs_reference(),
"detail": "(" + x.layer.vcs_url + (")" if x.up_branch == None else " | "+x.get_vcs_reference()+")"),
"tooltip": "%s | %s" % (x.layer.vcs_url,x.get_vcs_reference()),
"detail": "(%s" % x.layer.vcs_url + (")" if x.up_branch == None else " | "+x.get_vcs_reference()+")"),
"giturl": x.layer.vcs_url,
"layerdetailurl" : reverse('layerdetails', args=(prj.id,x.pk)),
"revision" : x.get_vcs_reference(),
@@ -559,10 +559,10 @@ def task( request, build_id, task_id ):
uri_list= [ ]
variables = Variable.objects.filter(build=build_id)
v=variables.filter(variable_name='SSTATE_DIR')
if v.count > 0:
if v.count() > 0:
uri_list.append(v[0].variable_value)
v=variables.filter(variable_name='SSTATE_MIRRORS')
if (v.count > 0):
if (v.count() > 0):
for mirror in v[0].variable_value.split('\\n'):
s=re.sub('.* ','',mirror.strip(' \t\n\r'))
if len(s): uri_list.append(s)
@@ -2124,9 +2124,10 @@ if True:
login(request, user)
# save the project
release = Release.objects.get(pk = request.POST.get('projectversion', None ))
if ptype == "analysis":
release = None
else:
release = Release.objects.get(pk = request.POST.get('projectversion', None ))
prj = Project.objects.create_project(name = request.POST['projectname'], release = release)
prj.user_id = request.user.pk