mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
- Fix several issues with the files properties in Web UI (introduced recently)
This commit is contained in:
parent
b5a9fe71e1
commit
ed13c43e93
@ -193,7 +193,7 @@ void HttpConnection::respond()
|
|||||||
else
|
else
|
||||||
list.prepend("webui");
|
list.prepend("webui");
|
||||||
url = ":/" + list.join("/");
|
url = ":/" + list.join("/");
|
||||||
qDebug("Resource URL: %s", url.toLocal8Bit().data());
|
//qDebug("Resource URL: %s", url.toLocal8Bit().data());
|
||||||
QFile file(url);
|
QFile file(url);
|
||||||
if(!file.open(QIODevice::ReadOnly))
|
if(!file.open(QIODevice::ReadOnly))
|
||||||
{
|
{
|
||||||
@ -258,6 +258,7 @@ void HttpConnection::respondFilesPropertiesJson(QString hash) {
|
|||||||
generator.setStatusLine(200, "OK");
|
generator.setStatusLine(200, "OK");
|
||||||
generator.setContentTypeByExt("js");
|
generator.setContentTypeByExt("js");
|
||||||
generator.setMessage(string);
|
generator.setMessage(string);
|
||||||
|
//qDebug("JSON: %s", string.toLocal8Bit().data());
|
||||||
write();
|
write();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +86,7 @@ namespace json {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
qDebug("Unknown QVariantType: %d", (int)v.type());
|
||||||
return "undefined";
|
return "undefined";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ var createDownloadedCB = function(id, downloaded) {
|
|||||||
if(downloaded)
|
if(downloaded)
|
||||||
CB.set('checked', 'checked');
|
CB.set('checked', 'checked');
|
||||||
CB.set('id', 'cbPrio'+id);
|
CB.set('id', 'cbPrio'+id);
|
||||||
select.addEvent('change', function(e){
|
CB.addEvent('change', function(e){
|
||||||
var checked = 0;
|
var checked = 0;
|
||||||
if($defined($('cbPrio'+id).get('checked')) && $('cbPrio'+id).get('checked'))
|
if($defined($('cbPrio'+id).get('checked')) && $('cbPrio'+id).get('checked'))
|
||||||
checked = 1;
|
checked = 1;
|
||||||
@ -66,7 +66,6 @@ var createDownloadedCB = function(id, downloaded) {
|
|||||||
var tds = tr.getElements('td');
|
var tds = tr.getElements('td');
|
||||||
for(var i=0; i<row.length; i++) {
|
for(var i=0; i<row.length; i++) {
|
||||||
if(i==2) {
|
if(i==2) {
|
||||||
tds[i].set('html', '');
|
|
||||||
$('pbf_'+id).setValue(row[i].toFloat());
|
$('pbf_'+id).setValue(row[i].toFloat());
|
||||||
} else {
|
} else {
|
||||||
if(i==3) {
|
if(i==3) {
|
||||||
@ -95,7 +94,7 @@ var createDownloadedCB = function(id, downloaded) {
|
|||||||
{
|
{
|
||||||
var td = new Element('td');
|
var td = new Element('td');
|
||||||
if(i==2) {
|
if(i==2) {
|
||||||
td.adopt(new ProgressBar(row[i].toFloat(), {'id', 'pbf_'+id, 'width':80}));
|
td.adopt(new ProgressBar(row[i].toFloat(), {'id': 'pbf_'+id, 'width':80}));
|
||||||
} else {
|
} else {
|
||||||
if(i == 3) {
|
if(i == 3) {
|
||||||
td.adopt(createDownloadedCB(id,row[i]));
|
td.adopt(createDownloadedCB(id,row[i]));
|
||||||
|
Loading…
Reference in New Issue
Block a user