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