[js, css, php] popup styles fixed. backups download link added.

This commit is contained in:
naumov-socolov 2012-02-10 05:28:40 +03:00
parent d91adf9b1e
commit 34a9ee322f
4 changed files with 37 additions and 4 deletions

View file

@ -37,13 +37,13 @@
.d-popup span.close:active{
background-position:0 -33px;
}
.d-popup-title{
font-size:11px;
text-transform:uppercase;
text-align:center;
color:#fffdd4;
margin:0 0 9px;
color:#fffaba;
margin:5px 0 16px;
letter-spacing: 2px;
}
.d-popup-items{
font-size:12px;
@ -64,4 +64,22 @@
}
.d-popup .prop-value{
color:#fff;
margin-bottom: 5px;
}
.d-popup-content{
color: #fff;
font-size: 13px;
line-height: 24px;
}
.d-popup-content li{
margin-bottom: 5px;
color: #fff;
font-size: 12px;
}
.d-popup-content li strong{
color: #BDB9AE;
text-transfom: uppercese;
font-weight: normal;
font-size: 10px;
margin-right: 7px;
}

View file

@ -498,6 +498,10 @@ App.HTML.Build.backup_list = function(backups)
tpl.set(':OWNER', App.Env.initialParams.auth_user.uid.uid);
tpl.set(':CREATED_AT_WDAY', App.Constants.KEY.WDAYS[created_date.getDay()]);
tpl.set(':SIZE', App.Helpers.getMbHuman(bckp.SIZE) + ' ' + App.Helpers.getMbHuman(bckp.SIZE, true));
// tpl.set(':DOWNLOAD_LINK', '/backup/' + App.Env.initialParams.auth_user.uid.uid + '.' + key + '.tar');
tpl.set(':DOWNLOAD_LINK', '/dispatch.php?jedi_method=MAIN.downloadBackup&key=' + key);
acc[acc.length++] = tpl.finalize()
});

View file

@ -1076,7 +1076,7 @@ App.Templates.html = {
<span class="backup-size">\
<span class="backup-size-inner">~!:SIZE~!</span>\
</span>\
<a class="backup-url" href="return alert(\'Not available at the time\');">download</a>\
<a class="backup-url" href="~!:DOWNLOAD_LINK~!">download</a>\
</div>\
<div class="props-ext">\
<!-- div class="backup-actions">\

View file

@ -144,6 +144,17 @@ MAIL;
return $this->reply($rs['status'], @$rs['data']);
}
public function downloadBackupExecute(Request $request)
{
$user = VestaSession::getInstance()->getUser();
header('Content-type: application/x-tar');
header('Content-Disposition: attachment; filename="'.$user['uid'].'.'.$_REQUEST['key'].'.tar"');
header('X-Accel-Redirect: /backup/'.$user['uid'].'.'.$_REQUEST['key'].'.tar');
exit;
}
/**
* Get Initial params.
* Global constants / variables / configs