mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-08-15 12:59:37 +00:00
report: indentation cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
51ef4bbe9c
commit
22b6f5db77
@ -1,7 +1,7 @@
|
|||||||
/*global Blob,Proxmox*/
|
/*global Blob,Proxmox*/
|
||||||
Ext.define('PMG.SubscriptionKeyEdit', {
|
Ext.define('PMG.SubscriptionKeyEdit', {
|
||||||
extend: 'Proxmox.window.Edit',
|
extend: 'Proxmox.window.Edit',
|
||||||
|
|
||||||
title: gettext('Upload Subscription Key'),
|
title: gettext('Upload Subscription Key'),
|
||||||
width: 300,
|
width: 300,
|
||||||
autoLoad: true,
|
autoLoad: true,
|
||||||
@ -56,29 +56,29 @@ Ext.define('PMG.Subscription', {
|
|||||||
layout: 'fit',
|
layout: 'fit',
|
||||||
modal: true,
|
modal: true,
|
||||||
buttons: [
|
buttons: [
|
||||||
'->',
|
'->',
|
||||||
{
|
{
|
||||||
text: gettext('Download'),
|
text: gettext('Download'),
|
||||||
handler: function() {
|
handler: function() {
|
||||||
var fileContent = Ext.String.htmlDecode(reportWindow.getComponent('system-report-view').html);
|
var fileContent = Ext.String.htmlDecode(reportWindow.getComponent('system-report-view').html);
|
||||||
var fileName = getReportFileName();
|
var fileName = getReportFileName();
|
||||||
|
|
||||||
// Internet Explorer
|
// Internet Explorer
|
||||||
if (window.navigator.msSaveOrOpenBlob) {
|
if (window.navigator.msSaveOrOpenBlob) {
|
||||||
navigator.msSaveOrOpenBlob(new Blob([fileContent]), fileName);
|
navigator.msSaveOrOpenBlob(new Blob([fileContent]), fileName);
|
||||||
} else {
|
} else {
|
||||||
var element = document.createElement('a');
|
var element = document.createElement('a');
|
||||||
element.setAttribute('href', 'data:text/plain;charset=utf-8,'
|
element.setAttribute('href', 'data:text/plain;charset=utf-8,'
|
||||||
+ encodeURIComponent(fileContent));
|
+ encodeURIComponent(fileContent));
|
||||||
element.setAttribute('download', fileName);
|
element.setAttribute('download', fileName);
|
||||||
element.style.display = 'none';
|
element.style.display = 'none';
|
||||||
document.body.appendChild(element);
|
document.body.appendChild(element);
|
||||||
element.click();
|
element.click();
|
||||||
document.body.removeChild(element);
|
document.body.removeChild(element);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
items: view
|
items: view
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user