ui: fingerprint: add copy button
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1f0d23f792
commit
e4ee7b7ac8
|
@ -105,13 +105,23 @@ Ext.define('PBS.Dashboard', {
|
||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
|
inputId: 'fingerprintField',
|
||||||
value: fingerprint,
|
value: fingerprint,
|
||||||
editable: false,
|
editable: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
buttons: [
|
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() {
|
handler: function() {
|
||||||
this.up('window').close();
|
this.up('window').close();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue