update download function

This commit is contained in:
Luke Pulverenti 2016-03-29 15:08:10 -04:00
parent d6c9993abe
commit e65500d84e
5 changed files with 14 additions and 8 deletions

View File

@ -463,7 +463,7 @@ body:not(.dashboardDocument) .btnNotifications {
}
.adminDrawerLogo {
padding: 15px 1em;
padding: 1.5em 1em 1.2em;
border-bottom: 1px solid #e0e0e0;
margin-bottom: 1em;
display: block;

View File

@ -981,10 +981,17 @@
break;
case 'download':
{
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
require(['fileDownloader'], function (fileDownloader) {
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
});
fileDownloader([{
url: downloadHref,
itemId: itemId
}]);
});
window.location.href = downloadHref;
break;
}

View File

@ -479,7 +479,6 @@
case 'download':
{
require(['fileDownloader'], function (fileDownloader) {
var downloadHref = ApiClient.getUrl("Items/" + itemId + "/Download", {
api_key: ApiClient.accessToken()
});

View File

@ -469,7 +469,7 @@
//html += '</div>';
//html += '</div>';
html += '<a class="adminDrawerLogo clearLink" href="dashboard.html">'
html += '<a class="adminDrawerLogo clearLink" href="home.html">'
html += '<img src="css/images/logo.png" />';
html += '</a>'

View File

@ -2120,9 +2120,9 @@ var AppInfo = {};
}
if (Dashboard.isRunningInCordova() && browser.android) {
define("fileDownloader", 'components/filedownloader', returnFirstDependency);
define("fileDownloader", ['cordova/android/filedownloader'], returnFirstDependency);
} else {
define("fileDownloader", 'cordova/android/filedownloader', returnFirstDependency);
define("fileDownloader", ['components/filedownloader'], returnFirstDependency);
}
}