Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 1D579E00CEF; Tue, 24 May 2016 04:55:43 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 80ADBE00C22 for ; Tue, 24 May 2016 04:53:12 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 24 May 2016 04:53:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,359,1459839600"; d="scan'208";a="961194401" Received: from icarus.isw.intel.com ([10.237.224.37]) by orsmga001.jf.intel.com with ESMTP; 24 May 2016 04:53:11 -0700 From: Belen Barros Pena To: toaster@yoctoproject.org Date: Tue, 24 May 2016 12:39:27 +0100 Message-Id: <1464090003-23469-71-git-send-email-belen.barros.pena@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464090003-23469-1-git-send-email-belen.barros.pena@linux.intel.com> References: <1464090003-23469-1-git-send-email-belen.barros.pena@linux.intel.com> Subject: [PATCH 070/106] toaster: Fix the toastertable table headings X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2016 11:55:43 -0000 For tables implemented with toaster tables, make sure the table heading shows: * Proper borders * Different states for sortable, not sortable and sorted column headings * Lighter help bubbles using the correct icon * Correct selected / not selected states for filters Also use the new responsive tables provided by Bootstrap 3. Signed-off-by: Belen Barros Pena --- bitbake/lib/toaster/toastergui/static/css/default.css | 15 +++++++++++++++ bitbake/lib/toaster/toastergui/static/js/table.js | 12 +++++++----- .../lib/toaster/toastergui/templates/toastertable.html | 14 ++++++++------ 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css index 1485337..137e6f5 100644 --- a/bitbake/lib/toaster/toastergui/static/css/default.css +++ b/bitbake/lib/toaster/toastergui/static/css/default.css @@ -32,6 +32,8 @@ img.logo { height: 30px; vertical-align: bottom; } .build-result .project-name { margin-top: -10px; margin-bottom: 5px; } /* Styles for the help information */ +.get-help { color: #CCCCCC; } +.get-help:hover { color: #999999; cursor: pointer; } .get-help-green { color: #468847; } .get-help-green:hover { color: #347132; cursor: pointer; } .get-help-blue { color: #3A87AD; } @@ -50,3 +52,16 @@ span[class^="remove-search-btn-"]:hover { color: #333; } /* Override the default font-weight for labels: it's a bit too much */ label { font-weight: normal; } + +/* Firefox workaround for awkward fieldset styling. See http://getbootstrap.com/css/#tables-responsive */ +@-moz-document url-prefix() { fieldset { display: table-cell; } } + +/* Table heading sortable / not sortable states */ +thead > tr > th > a { font-weight: normal; } +thead > tr > th > a.sorted { font-weight: bold; color: #333; } + +/* Give some extra space to the 'clear filter' buttons */ +.tooltip .btn { margin: 5px; } + +/* In table headings, separate the help bubble from the column heading */ +thead > tr > th > .glyphicon-question-sign { margin-right: 5px; } diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index be32bb3..5e3171f 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -169,7 +169,7 @@ function tableInit(ctx){ if (tableChromeDone === true) return; - var tableHeadRow = table.find("thead"); + var tableHeadRow = table.find("thead > tr"); var editColMenu = $("#table-chrome-"+ctx.tableName).find(".editcol"); tableHeadRow.html(""); @@ -190,7 +190,7 @@ function tableInit(ctx){ /* Setup the help text */ if (col.help_text.length > 0) { - var help_text = $(' '); + var help_text = $(' '); help_text.tooltip({title: col.help_text}); header.append(help_text); } @@ -227,12 +227,12 @@ function tableInit(ctx){ } else { /* Not orderable */ header.css("font-weight", "normal"); - header.append('' + col.title + ' '); + header.append('' + col.title + ' '); } /* Setup the filter button */ if (col.filter_name){ - var filterBtn = $(''); + var filterBtn = $(''); filterBtn.data('filter-name', col.filter_name); filterBtn.prop('id', col.filter_name); @@ -279,11 +279,12 @@ function tableInit(ctx){ /* Toggles the active state of the filter button */ function filterBtnActive(filterBtn, active){ if (active) { + filterBtn.removeClass("btn-link"); filterBtn.addClass("btn-primary"); filterBtn.tooltip({ html: true, - title: '', + title: '', placement: 'bottom', delay: { hide: 1500, @@ -292,6 +293,7 @@ function tableInit(ctx){ }); } else { filterBtn.removeClass("btn-primary"); + filterBtn.addClass("btn-link"); filterBtn.tooltip('destroy'); } } diff --git a/bitbake/lib/toaster/toastergui/templates/toastertable.html b/bitbake/lib/toaster/toastergui/templates/toastertable.html index debf6e6..3419862 100644 --- a/bitbake/lib/toaster/toastergui/templates/toastertable.html +++ b/bitbake/lib/toaster/toastergui/templates/toastertable.html @@ -88,12 +88,14 @@ - - - - - -
+
+ + + + + +
+
-- 1.9.1