Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id C9707E00E0B; Thu, 26 May 2016 08:12:48 -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=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.46 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B79E8E00DD8 for ; Thu, 26 May 2016 08:12:44 -0700 (PDT) Received: by mail-pa0-f46.google.com with SMTP id eu11so21415360pad.3 for ; Thu, 26 May 2016 08:12:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=F8sIBXmDd2tjPDS8rt2dHfCcd1NcnahoU7GhSwAR1vI=; b=bA/LXnftEfKfoZUVQ6QiDKxUQi+ubY/INYAktj8FC1Ad51siGM+pkUqye3/9VNzbPq 07j287+T8Jg27J0LxHoVye8JvI/tQOghLCVHIT3+lkY7RPbXv+e7osKo505WhMvrIsrs f6SG6+0Xqu1JPAKIs3bTpxJ8/VTHKbOiCwitpcjNZCedayzojqjQ+7+5ZikQEPH7zyYp Ar60t1MvUZx5C2+RnSiyHS9PY2vSGqHDpDNuL1T431ZnPLyJSS1kKGz8+4/0b4rktavK 4oz1Gu5xhAasqhoxHCB6DzqxsN1/iTJv515ZkZ9qvxSUGzEtHmoWEUC/HNCzwMOOjvFF nfcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=F8sIBXmDd2tjPDS8rt2dHfCcd1NcnahoU7GhSwAR1vI=; b=IK2tkLrDZVpBS9tThIvM2okvOy/2YGUj+aBpaHQFRjMCIM8jHiRiaVFb+eP1pEZ+vt QphpNeSBKYVBHU5jZYAPV4NM4YVxicn42DvYjE6fwXT90SzobpZCVN1Umy12Phg8Bmig TneQ/aQsmk9llTnIuV3ZZBwwgJBlZit30Y9taFZsj6AMCaGGVs9FegV/nX0U3YiqzYaD Zsnqcj+/RWB9IZ1+3cepAvkrrO/ISBj9N/IDTq9chKhB20xPhIxL8dJIj0/SwPTZ6hNT ra7qzL9hgelkUZHPbKSEXsq4NLSZ2jRy1/nmtBg48sGnIRY/FOr4NEHTzGZ/OArtGI1H wr+w== X-Gm-Message-State: ALyK8tJDM1xIQaLxAZ4pA7pU5VpKthj6LoGa7jN3BVLsuXpLwl2s6JL7W8F7rSVm3b7bg+lG X-Received: by 10.66.166.78 with SMTP id ze14mr14803745pab.149.1464275564473; Thu, 26 May 2016 08:12:44 -0700 (PDT) Received: from orion.ger.corp.intel.com ([192.55.54.45]) by smtp.gmail.com with ESMTPSA id l67sm6888008pfi.10.2016.05.26.08.12.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 May 2016 08:12:44 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Thu, 26 May 2016 16:12:24 +0100 Message-Id: <1464275547-30446-7-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464275547-30446-1-git-send-email-michael.g.wood@intel.com> References: <1464275547-30446-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH v2 6/9] toaster: table.js Add the ability to highlight a particular row 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: Thu, 26 May 2016 15:12:48 -0000 As in the old build tables it's useful to jump and highlight a particular row in the table using the #hash in the URL. Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/static/js/table.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index 7f76f55..7f9c44f 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -162,6 +162,15 @@ function tableInit(ctx){ table.css("padding-bottom", 0); tableContainer.css("visibility", "visible"); + /* If we have a hash in the url try and highlight that item in the table */ + if (window.location.hash){ + var highlight = $("table a[name="+window.location.hash.replace('#','')); + if (highlight.length > 0){ + highlight.parents("tr").addClass('highlight'); + window.scroll(0, highlight.position().top - 50); + } + } + table.trigger("table-done", [tableData.total, tableParams]); } -- 2.7.4