From e4ee7b7ac855fc6a4540ec8fb04b344e9dc32ef2 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 10 Jul 2020 11:13:54 +0200 Subject: [PATCH] ui: fingerprint: add copy button Signed-off-by: Thomas Lamprecht --- www/Dashboard.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/www/Dashboard.js b/www/Dashboard.js index 9ac30b21..23bdd541 100644 --- a/www/Dashboard.js +++ b/www/Dashboard.js @@ -105,13 +105,23 @@ Ext.define('PBS.Dashboard', { items: [ { xtype: 'textfield', + inputId: 'fingerprintField', value: fingerprint, editable: false, }, ], buttons: [ { - text: gettext("OK"), + xtype: 'button', + handler: function(b) { + var el = document.getElementById('fingerprintField'); + el.select(); + document.execCommand("copy"); + }, + text: gettext('Copy') + }, + { + text: gettext("Close"), handler: function() { this.up('window').close(); },