Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 80C9AE00BB6; Tue, 8 Dec 2015 13:17:22 -0800 (PST) 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.41 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-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 3FF0FE0070F for ; Tue, 8 Dec 2015 13:16:40 -0800 (PST) Received: by pacdm15 with SMTP id dm15so17808941pac.3 for ; Tue, 08 Dec 2015 13:16:40 -0800 (PST) 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=WIli20k53nRk2K/vL9OJxgOk1o4t6WWkylLiZayfc3w=; b=ZYnkPk4QM6RbhlwNjGs54dEYGwoAHq4xQ/oBeEkk5zLVXxQXidpb/I/qiVHfnttsCI VBcpEiOktzLmTmnMOdOTtDciAeEtmBiY71nTCjgUETFbcFNcTsZOiosKIHJBOit7CswW 3dixpA2tvtW7Djnd2YMQXY0118NWLSOVWM7JoXFpHLdfkOQcp07wIpGItIn/8Fpd+2tu bqTQpSuK+LPYXv2rKiXULGTbFU/XMNWHUksJTNx/XV3cV+29i1xwmK135ZPeMFEX4Ac9 lezOTrZ+ELzjw2YufXyr0irW/RKaB/0YJ5t/bGYOq2qst0zmjEAXwHKirb36Hf9oAkNr tzag== 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=WIli20k53nRk2K/vL9OJxgOk1o4t6WWkylLiZayfc3w=; b=XOkM9APmuCQmZOo3ic1ZItyYXFfCrPvYQIukZh+wf2T3J617uJWRYanXtkqiRzSan8 T+uI7jBC52bexCQi6UXMqbMddx5zyL4PgTdnSwLFuOPYlbWuA+sDgYCgxy9Hel/m61r2 jqE6W02VU7XES4FUUjrXxF6SBgIB37JpnEP8Y0/Yefez9DhO/ps6snVWEaIdQn423/Mo GnE+C4qBDjS05rTKd2xAtm7cFY/rkqhVSMuhJq5PRTzaiVXDclCuM8Jr67j3NdKql/HG xlsa7E6uXJknqdRqEPjfRXSK8freU7M6IkWQyKxXznQI71Y0TKhn3zBY8ZIUqQWTmpXI oHdA== X-Gm-Message-State: ALoCoQmxU2um5vetKLMB5Y/iqRNoiKvBP2/44xVd38eK7yoJYnd/1snpJq1jN02GF0uz4ZrZyLK1staV1BD0qR1RkosmoOD13A== X-Received: by 10.66.255.10 with SMTP id am10mr2955179pad.79.1449609400131; Tue, 08 Dec 2015 13:16:40 -0800 (PST) Received: from draco.ger.corp.intel.com ([192.55.54.40]) by smtp.gmail.com with ESMTPSA id v64sm6675766pfi.50.2015.12.08.13.16.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 08 Dec 2015 13:16:39 -0800 (PST) From: Michael Wood To: toaster@yoctoproject.org Date: Tue, 8 Dec 2015 21:15:50 +0000 Message-Id: <1449609380-11073-5-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449609380-11073-1-git-send-email-michael.g.wood@intel.com> References: <1449609380-11073-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 04/34] toaster: tablejs Add an event handler to manually trigger a data reload 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, 08 Dec 2015 21:17:22 -0000 Allow users of ToasterTable to manually trigger a refresh of the data. This can be useful if an action has happened in-page and the data is now invalid. Such as new data being added or removed from the model. Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/static/js/table.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bitbake/lib/toaster/toastergui/static/js/table.js b/bitbake/lib/toaster/toastergui/static/js/table.js index c69c205..f587788 100644 --- a/bitbake/lib/toaster/toastergui/static/js/table.js +++ b/bitbake/lib/toaster/toastergui/static/js/table.js @@ -454,6 +454,13 @@ function tableInit(ctx){ }); } + /* Allow pages to trigger reload event */ + table.on('reload', function(e, newTableParams){ + if (newTableParams) + loadData(newTableParams); + else + loadData(tableParams) + }); $(".get-help").tooltip({container:'body', html:true, delay:{show:300}}); -- 2.1.4