Add metadata to database and UI

This commit is contained in:
sqozz
2017-12-28 08:36:44 +01:00
parent 77e11c3edc
commit b86e6cb7cb
6 changed files with 101 additions and 40 deletions

View File

@ -80,19 +80,6 @@ function fillDetectedFilelist(file) {
reader.readAsArrayBuffer(file)
}
function getNextUnit(bSize) {
units = ["B", "kB", "MB", "GB", "TB", "PB", "To damn high"]
iters = 0
size = bSize
do {
size /= 1024
iters++
} while(size >= 1)
size *= 1024
if(iters > units.length) { iters = units.length }
return [size, units[iters - 1]]
}
// Fill a defined dropdown with values.
// These values will be generated out of the categories.json
function fillDropdownByValue(value, dropdownToFill) {

View File

@ -14,3 +14,17 @@ function getDescriptorByLocalString(language, localString){
}
return localString
}
function getNextUnit(bSize) {
units = ["B", "kB", "MB", "GB", "TB", "PB", "To damn high"]
iters = 0
size = bSize
do {
size /= 1024
iters++
} while(size >= 1)
size *= 1024
if(iters > units.length) { iters = units.length }
return [size, units[iters - 1]]
}