mirror of
https://git.yoctoproject.org/poky
synced 2026-02-09 02:03:04 +01:00
This patch clones the Simple UI to provide the base code for the development of the Toaster GUI. The clone takes the place of the application that was reserved for Javascript MVC code. The templates used for Simple UI are renamed to start with an "simple_" to prevent name resolution conflict with the Toaster GUI templates. Minor changes are made to the settings.py and urls.py in the toaster main section to account for the newly enabled application. (Bitbake rev: e2fde84f16da017ba0d71aef6a1fa8e2b9255db4) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
65 lines
2.3 KiB
HTML
65 lines
2.3 KiB
HTML
{% extends "simple_base.html" %}
|
|
|
|
{% block pagecontent %}
|
|
<script>
|
|
function showhideTableColumn(i, sh) {
|
|
if (sh)
|
|
$('td:nth-child('+i+'),th:nth-child('+i+')').show();
|
|
else
|
|
$('td:nth-child('+i+'),th:nth-child('+i+')').hide();
|
|
}
|
|
|
|
|
|
function filterTableRows(test) {
|
|
if (test.length > 0) {
|
|
var r = test.split(/[ ,]+/).map(function (e) { return new RegExp(e, 'i') });
|
|
$('tr.data').map( function (i, el) {
|
|
(! r.map(function (j) { return j.test($(el).html())}).reduce(function (c, p) { return c && p;} )) ? $(el).hide() : $(el).show();
|
|
});
|
|
} else
|
|
{
|
|
$('tr.data').show();
|
|
}
|
|
}
|
|
</script>
|
|
<div style="margin-bottom: 0.5em">
|
|
|
|
{% block pagename %}
|
|
{% endblock %}
|
|
<div align="left" style="display:inline-block; width: 40%; margin-left: 2em"> Filter: <input type="search" id="filterstring" style="width: 80%" onkeyup="filterTableRows($('#filterstring').val())" autocomplete="off">
|
|
</div>
|
|
{% if hideshowcols %}
|
|
<div align="right" style="display: inline-block; width: 40%">Show/Hide columns:
|
|
{% for i in hideshowcols %}
|
|
<span>{{i.name}} <input type="checkbox" id="ct{{i.name}}" onchange="showhideTableColumn({{i.order}}, $('#ct{{i.name}}').is(':checked'))" checked autocomplete="off"></span> |
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div style="display: block; float:right; margin-left: auto; margin-right:5em"><span class="pagination" style="vertical-align: top; margin-right: 3em">Showing {{objects.start_index}} to {{objects.end_index}} out of {{objects.paginator.count}} entries. </span>
|
|
<ul class="pagination" style="display: block-inline">
|
|
{%if objects.has_previous %}
|
|
<li><a href="?page={{objects.previous_page_number}}">«</a></li>
|
|
{%else%}
|
|
<li class="disabled"><a href="#">«</a></li>
|
|
{%endif%}
|
|
{% for i in objects.page_range %}
|
|
<li{%if i == objects.number %} class="active" {%endif%}><a href="?page={{i}}">{{i}}</a></li>
|
|
{% endfor %}
|
|
{%if objects.has_next%}
|
|
<li><a href="?page={{objects.next_page_number}}">»</a></li>
|
|
{%else%}
|
|
<li class="disabled"><a href="#">»</a></li>
|
|
{%endif%}
|
|
</ul>
|
|
</div>
|
|
|
|
<table class="table table-striped table-condensed" style="width:95%">
|
|
{% block pagetable %}
|
|
{% endblock %}
|
|
</table>
|
|
</div>
|
|
|
|
{% endblock %}
|