Skip to content
Snippets Groups Projects
Commit 663110c8 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

Merge origin/master

parents 3c278e97 9871c181
No related branches found
No related tags found
No related merge requests found
......@@ -22,17 +22,19 @@ function DocumentUtil(){
DocumentUtil.downloadSelectedDocuments = function() {
var alias = db.getCurrentAlias();
// Download selected files (=not oppened)
// Download selected files (=not opened)
if(vars.exists("$local.uids") && vars.get("$local.rows") != '') {
var rows = JSON.parse(vars.get("$local.rows"));
var uids = JSON.parse(vars.get("$local.uids"));
var binaryContents = db.getBinaryContents(uids, alias);
for(var i = 0; i < binaryContents.length; i++) {
var base64data = binaryContents[i];
var filename = rows[i]["NAME"];
if(base64data != null && base64data != '')
neon.download(base64data, filename);
// check if multiplie Files are selected.
// files get packed into a zip archive before downloading
if(binaryContents.length > 1) {
var fileNames = rows.map(function(value) { return value["NAME"]; });
neon.downloadToZip("Dateien.zip", binaryContents, fileNames);
} else {
neon.download(binaryContents[0], rows[0]["NAME"]);
}
}
// Download open file
......
This diff is collapsed.
......@@ -452,35 +452,3 @@ function JDitoUtils()
return dbAliases;
}
}
/**
* Class containing String utility functions
* @class
* @deprecated
* @todo: remove this funciton
*/
function StringUtils(){}
{
/**
* uses the right translate method, depending on the parameters
*
* @param {String} pText string to be translated
* @param {String} pLocale locale for translating
*
* @return {String}
*
*
*/
this.translateStr = function( pText, pLocale )
{
if ( pLocale == undefined )
return translate.text(pText);
else
return translate.text(pText, pLocale)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment