From 575560495845fa3a6b8d077d9a6550e5026ba7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Kiripolszky?= Date: Wed, 3 Oct 2018 11:56:00 +0200 Subject: [PATCH] add button to reset CLI output history --- locales/en/messages.json | 3 +++ src/js/tabs/cli.js | 5 +++++ src/tabs/cli.html | 1 + 3 files changed, 9 insertions(+) diff --git a/locales/en/messages.json b/locales/en/messages.json index 5a1fb045..e5ea8382 100644 --- a/locales/en/messages.json +++ b/locales/en/messages.json @@ -2093,6 +2093,9 @@ "cliSaveToFileBtn": { "message": "Save to File" }, + "cliClearOutputHistoryBtn": { + "message": "Clear output history" + }, "loggingNote": { "message": "Data will be logged in this tab only, leaving the tab will cancel logging and application will return to its normal \"configurator\" state.
You are free to select the global update period, data will be written into the log file every 1 second for performance reasons." diff --git a/src/js/tabs/cli.js b/src/js/tabs/cli.js index 4fbb55a9..76b04fad 100644 --- a/src/js/tabs/cli.js +++ b/src/js/tabs/cli.js @@ -102,6 +102,11 @@ TABS.cli.initialize = function (callback) { }); }); + $('.tab-cli .clear').click(function() { + self.outputHistory = ""; + $('.tab-cli .window .wrapper').empty(); + }); + // Tab key detection must be on keydown, // `keypress`/`keyup` happens too late, as `textarea` will have already lost focus. textarea.keydown(function (event) { diff --git a/src/tabs/cli.html b/src/tabs/cli.html index 21f01e75..2ba6514f 100644 --- a/src/tabs/cli.html +++ b/src/tabs/cli.html @@ -16,6 +16,7 @@
+