frontend: redesign download part
This commit is contained in:
parent
2472aebec4
commit
e2593e5f24
2 changed files with 29 additions and 18 deletions
|
@ -92,6 +92,28 @@ angular.module("FICApp")
|
|||
}
|
||||
}
|
||||
})
|
||||
.filter("size", function() {
|
||||
var units = [
|
||||
"o",
|
||||
"kio",
|
||||
"Mio",
|
||||
"Gio",
|
||||
"Tio",
|
||||
"Pio",
|
||||
"Eio",
|
||||
"Zio",
|
||||
"Yio",
|
||||
]
|
||||
return function(input) {
|
||||
var res = input;
|
||||
var unit = 0;
|
||||
while (res > 1024) {
|
||||
unit += 1;
|
||||
res = res / 1024;
|
||||
}
|
||||
return (Math.round(res * 100) / 100) + " " + units[unit];
|
||||
}
|
||||
})
|
||||
.controller("DataController", function($sce, $scope, $http, $rootScope, $timeout) {
|
||||
var actMenu = function() {
|
||||
if ($scope.my && $scope.themes) {
|
||||
|
|
Reference in a new issue