Make sure the layers table displays properly with Bootstrap 3.

Signed-off-by: Belen Barros Pena <[email protected]>
---
 bitbake/lib/toaster/toastergui/static/css/default.css   |  8 ++++++--
 bitbake/lib/toaster/toastergui/tables.py                |  8 ++++----
 bitbake/lib/toaster/toastergui/templates/layer_btn.html | 12 ++++++------
 3 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css 
b/bitbake/lib/toaster/toastergui/static/css/default.css
index da5f54b..bb71074 100644
--- a/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -20,7 +20,7 @@ img.logo { height: 30px; vertical-align: bottom; }
 #new-project-button { margin-right: 0; }
 
 /* Increase popovers width to fit commit SHAs */
-.popover { min-width: 350px; }
+.popover { max-width: 350px; }
 
 /* Increase bottom margin of definition lists inside popovers for the Toaster 
version information in the top navbar */
 .popover-content dd { margin-bottom: 15px; }
@@ -78,6 +78,8 @@ tbody > tr > td > .glyphicon-minus-sign { color: #a94442; }
 .glyphicon-download-alt:hover,
 .glyphicon-edit:hover { color: #23527c; cursor: pointer; text-decoration: 
none; }
 .glyphicon-trash { color: #a94442; }
+.btn-danger > .glyphicon-trash,
+.btn-danger > .glyphicon-trash:hover { color: #fff; }
 .glyphicon-trash:hover { color: #843534; cursor: pointer; }
 
 /* Set the font size for icons inside headings and lead paragraphs */
@@ -158,7 +160,9 @@ td > .tooltip-inner { padding: 10px; }
 /* Set sane widths for table columns */
 #newcustomimagestable .get_description_or_summary,
 #imagerecipestable .get_description_or_summary,
-#softwarerecipestable .get_description_or_summary { width: 30%; }
+#softwarerecipestable .get_description_or_summary,
+#machinestable .description,
+#layerstable .layer__summary { width: 30%; }
 
 /* Override the rather ugly default code styles */
 code { color: #333; background-color: transparent; }
diff --git a/bitbake/lib/toaster/toastergui/tables.py 
b/bitbake/lib/toaster/toastergui/tables.py
index 337a335..dead0d7 100644
--- a/bitbake/lib/toaster/toastergui/tables.py
+++ b/bitbake/lib/toaster/toastergui/tables.py
@@ -118,7 +118,7 @@ class LayersTable(ToasterTable):
         </a>
         {% if data.get_vcs_link_url %}
         <a target="_blank" href="{{ data.get_vcs_link_url }}">
-           <i class="icon-share get-info"></i>
+           <span class="glyphicon glyphicon-new-window"></span>
         </a>
         {% endif %}
         '''
@@ -135,7 +135,7 @@ class LayersTable(ToasterTable):
         </a>
         {% if data.dirpath and data.get_vcs_dirpath_link_url %}
         <a target="_blank" href="{{ data.get_vcs_dirpath_link_url }}">
-          <i class="icon-share get-info"></i>
+          <span class="glyphicon glyphicon-new-window"></span>
         </a>
         {% endif %}'''
 
@@ -166,8 +166,8 @@ class LayersTable(ToasterTable):
         deps_template = '''
         {% with ods=data.dependencies.all%}
         {% if ods.count %}
-            <a class="btn" title="<a href='{% url "layerdetails" extra.pid 
data.id %}'>{{data.layer.name}}</a> dependencies"
-        data-content="<ul class='unstyled'>
+            <a class="btn btn-default" title="<a href='{% url "layerdetails" 
extra.pid data.id %}'>{{data.layer.name}}</a> dependencies"
+        data-content="<ul class='list-unstyled'>
         {% for i in ods%}
         <li><a href='{% url "layerdetails" extra.pid i.depends_on.pk 
%}'>{{i.depends_on.layer.name}}</a></li>
         {% endfor %}
diff --git a/bitbake/lib/toaster/toastergui/templates/layer_btn.html 
b/bitbake/lib/toaster/toastergui/templates/layer_btn.html
index 1be29fe..b2f73eb 100644
--- a/bitbake/lib/toaster/toastergui/templates/layer_btn.html
+++ b/bitbake/lib/toaster/toastergui/templates/layer_btn.html
@@ -1,17 +1,17 @@
-<button class="btn btn-danger btn-block layer-exists-{{data.pk}} layerbtn"  
data-layer='{ "id": {{data.pk}}, "name":  "{{data.layer.name}}", 
"layerdetailurl": "{%url 'layerdetails' extra.pid data.pk%}"}' 
data-directive="remove"
+<a class="btn btn-danger btn-block layer-exists-{{data.pk}} layerbtn"  
data-layer='{ "id": {{data.pk}}, "name":  "{{data.layer.name}}", 
"layerdetailurl": "{%url 'layerdetails' extra.pid data.pk%}"}' 
data-directive="remove"
     {% if data.pk not in extra.current_layers %}
     style="display:none;"
     {% endif %}
   >
-  <i class="icon-trash"></i>
+  <span class="glyphicon glyphicon-trash"></span>
   Remove layer
-</button>
-<button class="btn btn-block layer-add-{{data.pk}} layerbtn" data-layer='{ 
"id": {{data.pk}}, "name":  "{{data.layer.name}}", "layerdetailurl": "{%url 
'layerdetails' extra.pid data.pk%}"}' data-directive="add"
+</a>
+<a class="btn btn-default btn-block layer-add-{{data.pk}} layerbtn" 
data-layer='{ "id": {{data.pk}}, "name":  "{{data.layer.name}}", 
"layerdetailurl": "{%url 'layerdetails' extra.pid data.pk%}"}' 
data-directive="add"
     {% if data.pk in extra.current_layers %}
     style="display:none;"
     {% endif %}
   >
-  <i class="glyphicon glyphicon-plus"></i>
+  <span class="glyphicon glyphicon-plus"></span>
   Add layer
-</button>
+</a>
 
-- 
1.9.1

-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to