diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/layers.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/layers.html | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/layers.html b/bitbake/lib/toaster/toastergui/templates/layers.html new file mode 100644 index 0000000000..281b72aec5 --- /dev/null +++ b/bitbake/lib/toaster/toastergui/templates/layers.html | |||
@@ -0,0 +1,178 @@ | |||
1 | {% extends "baseprojectpage.html" %} | ||
2 | {% load projecttags %} | ||
3 | {% load humanize %} | ||
4 | |||
5 | {% block localbreadcrumb %} | ||
6 | <li>Layers</li> | ||
7 | {% endblock %} | ||
8 | |||
9 | {% block projectinfomain %} | ||
10 | <div class="page-header"> | ||
11 | <h1> | ||
12 | All layers | ||
13 | <i class="icon-question-sign get-help heading-help" title="This page lists all the layers compatible with Yocto Project 1.7 'Dxxxx' that Toaster knows about. They include community-created layers suitable for use on top of OpenEmbedded Core and any layers you have imported"></i> | ||
14 | </h1> | ||
15 | </div> | ||
16 | <!--div class="alert"> | ||
17 | <div class="input-append" style="margin-bottom:0px;"> | ||
18 | <input class="input-xxlarge" type="text" placeholder="Search layers" value="browser" /> | ||
19 | <a class="add-on btn"> | ||
20 | <i class="icon-remove"></i> | ||
21 | </a> | ||
22 | <button class="btn" type="button">Search</button> | ||
23 | <a class="btn btn-link" href="#">Show all layers</a> | ||
24 | </div> | ||
25 | </div--> | ||
26 | <div id="layer-added" class="alert alert-info lead" style="display:none;"></div> | ||
27 | <div id="layer-removed" class="alert alert-info lead" style="display:none;"> | ||
28 | <button type="button" class="close" data-dismiss="alert">×</button> | ||
29 | <strong>1</strong> layer deleted from <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a> | ||
30 | </div> | ||
31 | |||
32 | |||
33 | {% include "basetable_top.html" %} | ||
34 | {% for lv in objects %} | ||
35 | <tr class="data"> | ||
36 | <td class="layer"><a href="{% url 'layerdetails' lv.id %}">{{lv.layer.name}}</a></td> | ||
37 | <td class="description">{{lv.layer.summary}}</td> | ||
38 | <td class="source"><a href="{% url 'layerdetails' lv.pk %}">{{lv.layer_source.name}}</a></td> | ||
39 | <td class="git-repo"><a href="{% url 'layerdetails' lv.pk %}"><code>{{lv.layer.layer_index_url}}</code></a></td> | ||
40 | <td class="git-subdir" style="display: table-cell;"><a href="{% url 'layerdetails' lv.pk %}"><code>{{lv.dirpath}}</code></a></td> | ||
41 | <td class="branch">{% if lv.branch %}{{lv.branch}}{% else %}{{lv.up_branch.name}}{% endif %}</td> | ||
42 | <td class="dependencies">{% for lvs in lv.dependencies.all %}{{lvs.layer.name}}<br/>{%endfor%}</td> | ||
43 | <td class="add-layers"> | ||
44 | <button id="remove-layer-{{lv.pk}}" class="btn btn-danger btn-block remove-layer" title="1 layer deleted" style="display:none;"> | ||
45 | <i class="icon-trash"></i> | ||
46 | Delete layer | ||
47 | </button> | ||
48 | <button id="add-layer-{{lv.pk}}" class="btn btn-block add-layer" title="1 layer added"> | ||
49 | <i class="icon-plus"></i> | ||
50 | Add layer | ||
51 | </button> | ||
52 | </td> | ||
53 | </tr> | ||
54 | {% endfor %} | ||
55 | {% include "basetable_bottom.html" %} | ||
56 | |||
57 | <!-- Modals --> | ||
58 | |||
59 | <!-- 'Layer dependencies modal' --> | ||
60 | <div id="dependencies-message" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> | ||
61 | <div class="modal-header"> | ||
62 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> | ||
63 | <h3>meta-acer dependencies</h3> | ||
64 | </div> | ||
65 | <div class="modal-body"> | ||
66 | <p><strong>meta-acer</strong> depends on some layers that are not added to your project. Select the ones you want to add:</p> | ||
67 | <ul class="unstyled"> | ||
68 | <li> | ||
69 | <label class="checkbox"> | ||
70 | <input type="checkbox" checked="checked"> | ||
71 | meta-android | ||
72 | </label> | ||
73 | </li> | ||
74 | <li> | ||
75 | <label class="checkbox"> | ||
76 | <input type="checkbox" checked="checked"> | ||
77 | meta-oe | ||
78 | </label> | ||
79 | </li> | ||
80 | </ul> | ||
81 | </div> | ||
82 | <div class="modal-footer"> | ||
83 | <button id="add-layer-dependencies" type="submit" class="btn btn-primary" data-dismiss="modal" >Add layers</button> | ||
84 | <button class="btn" data-dismiss="modal">Cancel</button> | ||
85 | </div> | ||
86 | </div> | ||
87 | |||
88 | <script src="assets/js/jquery-1.9.1.min.js" type='text/javascript'></script> | ||
89 | <script src="assets/js/jquery.tablesorter.min.js" type='text/javascript'></script> | ||
90 | <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script> | ||
91 | <script src="assets/js/bootstrap.min.js" type='text/javascript'></script> | ||
92 | <script src="assets/js/prettify.js" type='text/javascript'></script> | ||
93 | <script src="assets/js/jit.js" type='text/javascript'></script> | ||
94 | <script src="assets/js/main.js" type='text/javascript'></script> | ||
95 | |||
96 | <script> | ||
97 | $(document).ready(function() { | ||
98 | |||
99 | //show or hide selected columns on load | ||
100 | $("input:checkbox").each(function(){ | ||
101 | var selectedType = $(this).val(); | ||
102 | if($(this).is(":checked")){ | ||
103 | $("."+selectedType).show(); | ||
104 | } | ||
105 | else{ | ||
106 | $("."+selectedType).hide(); | ||
107 | } | ||
108 | }); | ||
109 | |||
110 | // enable add layer button | ||
111 | $('#add-layer-with-deps').removeAttr('disabled'); | ||
112 | |||
113 | //edit columns functionality (show / hide table columns) | ||
114 | $("input:checkbox").change(); | ||
115 | $("input:checkbox").change(function(){ | ||
116 | var selectedType = $(this).val(); | ||
117 | if($(this).is(":checked")){ | ||
118 | $("."+selectedType).show(); | ||
119 | } | ||
120 | else{ | ||
121 | $("."+selectedType).hide(); | ||
122 | } | ||
123 | }); | ||
124 | |||
125 | //turn edit columns dropdown into a multi-select menu | ||
126 | $('.dropdown-menu input, .dropdown-menu label').click(function(e) { | ||
127 | e.stopPropagation(); | ||
128 | }); | ||
129 | |||
130 | //show tooltip with applied filter | ||
131 | $('#filtered').tooltip({container:'table', placement:'bottom', delay:{hide:1500}, html:true}); | ||
132 | |||
133 | $('#filtered').click(function() { | ||
134 | $(this).tooltip('hide'); | ||
135 | }); | ||
136 | |||
137 | //show layer added tooltip | ||
138 | $("#remove-layer, #add-layer, #add-layer-with-deps2").tooltip({ trigger: 'manual' }); | ||
139 | |||
140 | // add layer without dependencies | ||
141 | $("#add-layer").click(function(){ | ||
142 | $('#layer-removed').hide(); | ||
143 | $('#layer-added').html('<button type="button" class="close" data-dismiss="alert">×</button><strong>1</strong> layer added to <a href="project-with-targets.html">your project</a>: <a href="#">meta-aarch64</a>').fadeIn(); | ||
144 | $('#add-layer').tooltip('show'); | ||
145 | $("#add-layer").hide(); | ||
146 | $(".add-layers .tooltip").delay(2000).fadeOut(function(){ | ||
147 | $("#remove-layer").delay(300).fadeIn(); | ||
148 | }); | ||
149 | }); | ||
150 | |||
151 | // add layer with dependencies | ||
152 | $(document).on("click", "#add-layer-dependencies", function() { | ||
153 | $('#layer-removed').hide(); | ||
154 | $('#layer-added').html('<button type="button" class="close" data-dismiss="alert">×</button><strong>3</strong> layers added to <a href="project-with-targets.html">your project</a>: <a href="#">meta-acer</a> and its dependencies <a href="#">meta-android</a> and <a href="#">meta-oe</a>').delay(400).fadeIn(function(){ | ||
155 | $('#add-layer-with-deps').tooltip('show'); | ||
156 | $("#add-layer-with-deps, #add-layer-with-deps").hide(); | ||
157 | $(".add-layers .tooltip").delay(2000).fadeOut(function(){ | ||
158 | $("#remove-layer-with-deps").delay(300).fadeIn(); | ||
159 | }); | ||
160 | }); | ||
161 | }); | ||
162 | |||
163 | // delete layer | ||
164 | $("#remove-layer").click(function(){ | ||
165 | $('#layer-added').hide(); | ||
166 | $('#layer-removed').show(); | ||
167 | $('#remove-layer').tooltip('show'); | ||
168 | $("#remove-layer").hide(); | ||
169 | $(".add-layers .tooltip").delay(2000).fadeOut(function(){ | ||
170 | $("#add-layer").delay(300).fadeIn(); | ||
171 | }); | ||
172 | }); | ||
173 | |||
174 | }); | ||
175 | |||
176 | </script> | ||
177 | |||
178 | {% endblock %} | ||