From: Belen Barros Pena Date: Wed, 14 Oct 2015 12:12:14 +0000 (+0100) Subject: toaster: Improve directory structure layout X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6167ee5a7569d8f841c340e672645cc133ea5a31;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git toaster: Improve directory structure layout File names in the directory structure often wrap due to big indenting for nested files and directories, unnecessary width in certain columns, and not using colspan when the symlink and package cells are empty. The wrapping makes the table harder to read. This patch reduces the amount of indenting, limits the width of the 'Size', 'Permissions', 'Owner' and 'Group' columns, and sets colspan to use the white space of the symlink and package names when empty. Signed-off-by: Belen Barros Pena Signed-off-by: Elliot Smith Signed-off-by: Richard Purdie --- diff --git a/lib/toaster/toastergui/static/css/default.css b/lib/toaster/toastergui/static/css/default.css index cce3e315fca..06d9976557e 100644 --- a/lib/toaster/toastergui/static/css/default.css +++ b/lib/toaster/toastergui/static/css/default.css @@ -164,6 +164,10 @@ table { table-layout: fixed; word-wrap: break-word; } /* Remove bottom margin for forms inside modal dialogs */ #dependencies-modal-form { margin-bottom: 0px; } +/* Custom column widths */ +.narrow-col { width: 8%; } +.medium-col { width: 12%; } + /* Configuration styles */ .icon-trash { color: #B94A48; font-size: 16px; padding-left: 5px; } .icon-trash:hover { color: #943A38; text-decoration: none; cursor: pointer; } diff --git a/lib/toaster/toastergui/static/js/jquery.treetable.js b/lib/toaster/toastergui/static/js/jquery.treetable.js index 42e7427cc0f..794b902c587 100644 --- a/lib/toaster/toastergui/static/js/jquery.treetable.js +++ b/lib/toaster/toastergui/static/js/jquery.treetable.js @@ -421,7 +421,7 @@ columnElType: "td", // i.e. 'td', 'th' or 'td,th' expandable: false, expanderTemplate: " ", - indent: 19, + indent: 10, indenterTemplate: "", initialState: "collapsed", nodeIdAttr: "ttId", // maps to data-tt-id diff --git a/lib/toaster/toastergui/templates/dirinfo.html b/lib/toaster/toastergui/templates/dirinfo.html index a5bc48127c7..7819894b651 100644 --- a/lib/toaster/toastergui/templates/dirinfo.html +++ b/lib/toaster/toastergui/templates/dirinfo.html @@ -103,12 +103,16 @@ name += ''; } else { - name = ''; if (o.link_to == null) { - name += ''; + namespan = 2; + if (o.package == null) { + namespan = 3; + } + var colspan = 'colspan="' + namespan + '"'; + name = ''; } else { - name += ''; + name = ''; } name += ' ' + o.name; name += ''; @@ -207,10 +211,10 @@ Directory / File Symbolic link to Source package - Size - Permissions - Owner - Group + Size + Permissions + Owner + Group