mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03:00
WebUI: Fix indentation.
Fix indentation in client.js and dynamicTable.js.
This commit is contained in:
parent
1a1db877bf
commit
0488ddafa5
2 changed files with 614 additions and 592 deletions
|
@ -67,7 +67,12 @@ window.addEvent('load', function(){
|
|||
id : 'Filters',
|
||||
title : 'Panel',
|
||||
header : false,
|
||||
padding: { top: 0, right: 0, bottom: 0, left: 0 },
|
||||
padding : {
|
||||
top : 0,
|
||||
right : 0,
|
||||
bottom : 0,
|
||||
left : 0
|
||||
},
|
||||
loadMethod : 'xhr',
|
||||
contentURL : 'filters.html',
|
||||
column : 'filtersColumn',
|
||||
|
@ -107,9 +112,11 @@ window.addEvent('load', function(){
|
|||
},
|
||||
onSuccess : function (info) {
|
||||
if (info) {
|
||||
$("DlInfos").set('html', "_(D: %1 - T: %2)".replace("%1", friendlyUnit(info.dl_info_speed, true))
|
||||
$("DlInfos").set('html', "_(D: %1 - T: %2)"
|
||||
.replace("%1", friendlyUnit(info.dl_info_speed, true))
|
||||
.replace("%2", friendlyUnit(info.dl_info_data, false)));
|
||||
$("UpInfos").set('html', "_(U: %1 - T: %2)".replace("%1", friendlyUnit(info.up_info_speed, true))
|
||||
$("UpInfos").set('html', "_(U: %1 - T: %2)"
|
||||
.replace("%1", friendlyUnit(info.up_info_speed, true))
|
||||
.replace("%2", friendlyUnit(info.up_info_data, false)));
|
||||
if(localStorage.getItem('speed_in_browser_title_bar') == 'true')
|
||||
document.title = "_(D:%1 U:%2)".replace("%1", friendlyUnit(info.dl_info_speed, true)).replace("%2", friendlyUnit(info.up_info_speed, true));
|
||||
|
@ -173,7 +180,7 @@ window.addEvent('load', function(){
|
|||
row[8] = friendlyUnit(event.upspeed, true);
|
||||
data[8] = event.upspeed;
|
||||
row[9] = friendlyDuration(event.eta);
|
||||
data[9] = event.eta
|
||||
data[9] = event.eta;
|
||||
if (event.ratio == -1)
|
||||
row[10] = "∞";
|
||||
else
|
||||
|
@ -215,7 +222,12 @@ window.addEvent('load', function(){
|
|||
id : 'transferList',
|
||||
title : 'Panel',
|
||||
header : false,
|
||||
padding: { top: 0, right: 0, bottom: 0, left: 0 },
|
||||
padding : {
|
||||
top : 0,
|
||||
right : 0,
|
||||
bottom : 0,
|
||||
left : 0
|
||||
},
|
||||
loadMethod : 'xhr',
|
||||
contentURL : 'transferlist.html',
|
||||
onContentLoaded : function () {
|
||||
|
@ -234,7 +246,12 @@ window.addEvent('load', function(){
|
|||
id : 'propertiesPanel',
|
||||
title : 'Panel',
|
||||
header : true,
|
||||
padding: { top: 0, right: 0, bottom: 0, left: 0 },
|
||||
padding : {
|
||||
top : 0,
|
||||
right : 0,
|
||||
bottom : 0,
|
||||
left : 0
|
||||
},
|
||||
contentURL : 'prop-general.html',
|
||||
require : {
|
||||
css : ['css/Tabs.css']
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
|
||||
var dynamicTable = new Class({
|
||||
|
||||
initialize: function(){
|
||||
},
|
||||
initialize : function () {},
|
||||
|
||||
setup : function (table, progressIndex, context_menu) {
|
||||
this.table = $(table);
|
||||
|
@ -100,8 +99,7 @@ var dynamicTable = new Class ({
|
|||
return '';
|
||||
},
|
||||
|
||||
altRow: function()
|
||||
{
|
||||
altRow : function () {
|
||||
var trs = this.table.getElements('tr');
|
||||
trs.each(function (el, i) {
|
||||
if (i % 2) {
|
||||
|
@ -113,7 +111,8 @@ var dynamicTable = new Class ({
|
|||
},
|
||||
|
||||
hidePriority : function () {
|
||||
if(this.priority_hidden) return;
|
||||
if (this.priority_hidden)
|
||||
return;
|
||||
$('prioHeader').addClass('invisible');
|
||||
var trs = this.table.getElements('tr');
|
||||
trs.each(function (tr, i) {
|
||||
|
@ -128,7 +127,8 @@ var dynamicTable = new Class ({
|
|||
},
|
||||
|
||||
showPriority : function () {
|
||||
if(!this.priority_hidden) return;
|
||||
if (!this.priority_hidden)
|
||||
return;
|
||||
$('prioHeader').removeClass('invisible');
|
||||
var trs = this.table.getElements('tr');
|
||||
trs.each(function (tr, i) {
|
||||
|
@ -188,16 +188,21 @@ var dynamicTable = new Class ({
|
|||
var tr = new Element('tr');
|
||||
tr.addClass("menu-target");
|
||||
this.rows.set(id, tr);
|
||||
for(var i=0; i<row.length; i++)
|
||||
{
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
var td = new Element('td');
|
||||
if (i == this.progressIndex) {
|
||||
td.adopt(new ProgressBar(row[i].toFloat(), {'id': 'pb_'+id, 'width':80}));
|
||||
td.adopt(new ProgressBar(row[i].toFloat(), {
|
||||
'id' : 'pb_' + id,
|
||||
'width' : 80
|
||||
}));
|
||||
if (typeof data[i] != 'undefined')
|
||||
td.set('data-raw', data[i])
|
||||
} else {
|
||||
if (i == 0) {
|
||||
td.adopt(new Element('img', {'src':row[i], 'class': 'statusIcon'}));
|
||||
td.adopt(new Element('img', {
|
||||
'src' : row[i],
|
||||
'class' : 'statusIcon'
|
||||
}));
|
||||
} else {
|
||||
if (i == 2) {
|
||||
// Priority
|
||||
|
@ -335,7 +340,8 @@ var dynamicTable = new Class ({
|
|||
if (this.applyFilterOnRow(tr, status)) {
|
||||
var tds = tr.getElements('td');
|
||||
for (var i = 0; i < row.length; i++) {
|
||||
if(i==1) continue; // Do not refresh name
|
||||
if (i == 1)
|
||||
continue; // Do not refresh name
|
||||
if (i == this.progressIndex) {
|
||||
$('pb_' + id).setValue(row[i]);
|
||||
} else {
|
||||
|
@ -362,8 +368,7 @@ var dynamicTable = new Class ({
|
|||
},
|
||||
|
||||
removeRow : function (id) {
|
||||
if(this.cur.contains(id))
|
||||
{
|
||||
if (this.cur.contains(id)) {
|
||||
this.cur.erase(id);
|
||||
}
|
||||
if (this.rows.has(id)) {
|
||||
|
|
Loading…
Reference in a new issue