Merge pull request #87 from robbielj/patch-2

Clean up a placeholder character which may prevent webui from loading normally
This commit is contained in:
hamza zia 2014-03-23 21:10:56 +08:00
commit 534218f0e1
5 changed files with 8 additions and 8 deletions

View File

@ -285,7 +285,7 @@ function(
if (files) {
var cfiles = ctx.files;
for (var i = 0; i < files.length; ++i) {
var cfile = cfiles[i] || (cfiles[i] = {});
var cfile = cfiles[i] || (cfiles[i] = {});
var file = files[i];
if (file.path !== cfile.path) {
cfile.path = file.path;
@ -318,7 +318,7 @@ function(
delete ctx.bittorrent;
}
ctx.name = btName || dlName || "Unknown";
ctx.name = btName || dlName || "Unknown";
// collapse the download details initially
if (ctx.collapsed === undefined) {
@ -353,7 +353,7 @@ function(
return (d.totalLength-d.completedLength) / d.downloadSpeed;
}
scope.getProgressClass = function(d) {
scope.getProgressClass = function(d) {
switch (d.status) {
case "paused":
return "progress-info";

View File

@ -61,7 +61,7 @@ angular
},
yaxis: {
position: "right",
ticks: function(axis) {
ticks: function(axis) {
var res = [0];
var round = Math.max(1, Math.ceil(axis.max / yTickBase));
var step = Math.max(1, Math.ceil(round / yTicks));

View File

@ -12,7 +12,7 @@ angular.module('webui.filters.bytes', ["webui.services.utils"])
return function(time) {
time = parseInt(time, 10);
if (!time || !isFinite(time)) return "∞";
if (!time || !isFinite(time)) return "∞";
var secs = time % 60;
if (time < 60) return secs + "s";
var mins = Math.floor((time % 3600) / 60)

View File

@ -39,7 +39,7 @@ function(syscall, time, alerts, utils, rootScope, uri) {
timeout = null;
subscriptions = _.filter(subscriptions, function(e) {
return !!e && e.once !== 2;
return !!e && e.once !== 2;
});
var subs = subscriptions.slice();
if (!subs.length) {

View File

@ -11,7 +11,7 @@ angular.module('webui.services.utils', [])
return rndBuffer;
};
if (!window.crypto || !crypto.getRandomValues) {
if (!window.crypto || !crypto.getRandomValues) {
return rnd16Weak;
}
return function() {
@ -82,7 +82,7 @@ angular.module('webui.services.utils', [])
return function() {
var r = rnd16();
r[6] = (r[6] & 0xf) | 0x40; // Version 4
r[8] = (r[8] & 0x3f) | 0x80; // Version 4y
r[8] = (r[8] & 0x3f) | 0x80; // Version 4y
return bt[r[0]] + bt[r[1]] + bt[r[2]] + bt[r[3]] + "-" +
bt[r[4]] + bt[r[5]] + "-" +
bt[r[6]] + bt[r[7]] + "-" +