From ed13c43e933864e8018f4af6cdb831ecfccf05fd Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 29 Dec 2009 20:26:32 +0000 Subject: [PATCH] - Fix several issues with the files properties in Web UI (introduced recently) --- src/httpconnection.cpp | 3 ++- src/json.h | 1 + src/webui/prop-files.html | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/httpconnection.cpp b/src/httpconnection.cpp index 3f066620f..6a9706600 100644 --- a/src/httpconnection.cpp +++ b/src/httpconnection.cpp @@ -193,7 +193,7 @@ void HttpConnection::respond() else list.prepend("webui"); url = ":/" + list.join("/"); - qDebug("Resource URL: %s", url.toLocal8Bit().data()); + //qDebug("Resource URL: %s", url.toLocal8Bit().data()); QFile file(url); if(!file.open(QIODevice::ReadOnly)) { @@ -258,6 +258,7 @@ void HttpConnection::respondFilesPropertiesJson(QString hash) { generator.setStatusLine(200, "OK"); generator.setContentTypeByExt("js"); generator.setMessage(string); + //qDebug("JSON: %s", string.toLocal8Bit().data()); write(); } diff --git a/src/json.h b/src/json.h index b0d105f75..a524255ef 100644 --- a/src/json.h +++ b/src/json.h @@ -86,6 +86,7 @@ namespace json { return result; } default: + qDebug("Unknown QVariantType: %d", (int)v.type()); return "undefined"; } } diff --git a/src/webui/prop-files.html b/src/webui/prop-files.html index 496ad65d7..7d7cded88 100644 --- a/src/webui/prop-files.html +++ b/src/webui/prop-files.html @@ -27,7 +27,7 @@ var createDownloadedCB = function(id, downloaded) { if(downloaded) CB.set('checked', 'checked'); CB.set('id', 'cbPrio'+id); - select.addEvent('change', function(e){ + CB.addEvent('change', function(e){ var checked = 0; if($defined($('cbPrio'+id).get('checked')) && $('cbPrio'+id).get('checked')) checked = 1; @@ -66,7 +66,6 @@ var createDownloadedCB = function(id, downloaded) { var tds = tr.getElements('td'); for(var i=0; i