diff options
Diffstat (limited to 'pyload/web/app/scripts')
| -rw-r--r-- | pyload/web/app/scripts/helpers/formatSize.js | 7 | ||||
| -rw-r--r-- | pyload/web/app/scripts/views/accounts/accountView.js | 3 | 
2 files changed, 8 insertions, 2 deletions
| diff --git a/pyload/web/app/scripts/helpers/formatSize.js b/pyload/web/app/scripts/helpers/formatSize.js index 3b62e74c7..926c4793d 100644 --- a/pyload/web/app/scripts/helpers/formatSize.js +++ b/pyload/web/app/scripts/helpers/formatSize.js @@ -1,10 +1,15 @@  // Format bytes in human readable format -define('helpers/formatSize', ['handlebars'], function(Handlebars) { +define('helpers/formatSize', ['handlebars', './gettext'], function(Handlebars, gettext) {      'use strict';      var sizes = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'];      function formatSize(bytes, options) {          if (!bytes || bytes === 0) return '0 B'; +        if (bytes === -1) +            return gettext('not available'); +        if (bytes === -2) +            return gettext('unlimited'); +          var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10);          // round to two digits          return (bytes / Math.pow(1024, i)).toFixed(2) + ' ' + sizes[i]; diff --git a/pyload/web/app/scripts/views/accounts/accountView.js b/pyload/web/app/scripts/views/accounts/accountView.js index 89f69d7e7..7d1f04315 100644 --- a/pyload/web/app/scripts/views/accounts/accountView.js +++ b/pyload/web/app/scripts/views/accounts/accountView.js @@ -4,7 +4,8 @@ define(['jquery', 'underscore', 'backbone', 'app', 'hbs!tpl/accounts/account'],          return Backbone.Marionette.ItemView.extend({ -            tagName: 'tr', +            tagName: 'div', +            className: 'row-fluid',              template: template,              events: { | 
