Trim history option in settings (UI only)
This commit is contained in:
@@ -30,6 +30,13 @@ define([
|
||||
});
|
||||
}
|
||||
|
||||
UIElements.prettySize = function (bytes) {
|
||||
var kB = Util.bytesToKilobytes(bytes);
|
||||
if (kB < 1024) { return kB + Messages.KB; }
|
||||
var mB = Util.bytesToMegabytes(bytes);
|
||||
return mB + Messages.MB;
|
||||
};
|
||||
|
||||
UIElements.updateTags = function (common, href) {
|
||||
var existing, tags;
|
||||
NThen(function(waitFor) {
|
||||
|
||||
@@ -224,6 +224,7 @@
|
||||
else if (bytes >= oneMegabyte) { return 'MB'; }
|
||||
};
|
||||
|
||||
|
||||
// given a path, asynchronously return an arraybuffer
|
||||
Util.fetch = function (src, cb, progress) {
|
||||
var CB = Util.once(cb);
|
||||
|
||||
@@ -182,13 +182,6 @@ define([
|
||||
}
|
||||
};
|
||||
|
||||
var prettySize = function (bytes) {
|
||||
var kB = Util.bytesToKilobytes(bytes);
|
||||
if (kB < 1024) { return kB + Messages.KB; }
|
||||
var mB = Util.bytesToMegabytes(bytes);
|
||||
return mB + Messages.MB;
|
||||
};
|
||||
|
||||
queue.next = function () {
|
||||
if (queue.queue.length === 0) {
|
||||
clearTimeout(queue.to);
|
||||
@@ -251,7 +244,7 @@ define([
|
||||
// name
|
||||
$('<td>').append($link).appendTo($tr);
|
||||
// size
|
||||
$('<td>').text(prettySize(estimate)).appendTo($tr);
|
||||
$('<td>').text(UIElements.prettySize(estimate)).appendTo($tr);
|
||||
// progress
|
||||
$('<td>', {'class': 'cp-fileupload-table-progress'}).append($progressContainer).appendTo($tr);
|
||||
// cancel
|
||||
|
||||
Reference in New Issue
Block a user