Change all element.firstChild.nodeValue to
Element.textContent(element) to fix bug #58
This commit is contained in:
parent
2c83da8701
commit
48dba7a057
|
@ -1978,13 +1978,13 @@ Rico.LiveGridBuffer.prototype = {
|
|||
//,dmap.itemid,,dmap.itemname']
|
||||
['dmap.itemname','daap.songtime','daap.songartist','daap.songalbum','daap.songgenre'].each(function (name) {
|
||||
if ('daap.songtime' == name) {
|
||||
var time = parseInt(el.getElementsByTagName(name)[0].firstChild.nodeValue);
|
||||
var time = parseInt(Element.textContent(el.getElementsByTagName(name)[0]));
|
||||
time = Math.round(time / 1000);
|
||||
var seconds = time % 60;
|
||||
seconds = (seconds < 10) ? '0'+seconds : seconds;
|
||||
row.push(Math.floor(time/60)+ ':' + seconds);
|
||||
} else {
|
||||
row.push(el.getElementsByTagName(name)[0].firstChild.nodeValue.truncate(10));
|
||||
row.push(Element.textContent(el.getElementsByTagName(name)[0]).truncate(10));
|
||||
}
|
||||
});
|
||||
newRows.push(row);
|
||||
|
|
|
@ -93,7 +93,7 @@ var Source = {
|
|||
editPlaylistName: function () {
|
||||
input = $('edit_playlist_name');
|
||||
Source.playlistId = $('source').value;
|
||||
playlistName = this._getOptionElement(Source.playlistId).firstChild.nodeValue;
|
||||
playlistName = Element.textContent(this._getOptionElement(Source.playlistId));
|
||||
//###FIXME use prototype Position instead
|
||||
input.style.top = RicoUtil.toDocumentPosition(this._getOptionElement(Source.playlistId)).y + 'px';
|
||||
input.value = playlistName;
|
||||
|
|
|
@ -52,8 +52,8 @@ var Updater = {
|
|||
function rsStats(request) {
|
||||
['service','stat'].each(function (tag) {
|
||||
$A(request.responseXML.getElementsByTagName(tag)).each(function (element) {
|
||||
var node = $(element.firstChild.firstChild.nodeValue.toLowerCase().replace(/\ /,'_'));
|
||||
node.replaceChild(document.createTextNode(element.childNodes[1].firstChild.nodeValue),node.firstChild);
|
||||
var node = $(Element.textContent(element.firstChild).toLowerCase().replace(/\ /,'_'));
|
||||
node.replaceChild(document.createTextNode(Element.textContent(element.childNodes[1])),node.firstChild);
|
||||
});
|
||||
});
|
||||
var thread = $A(request.responseXML.getElementsByTagName('thread'));
|
||||
|
@ -63,8 +63,8 @@ function rsStats(request) {
|
|||
thread.each(function (element) {
|
||||
users++;
|
||||
row = [];
|
||||
row.push(element.childNodes[1].firstChild.nodeValue);
|
||||
row.push(element.childNodes[2].firstChild.nodeValue);
|
||||
row.push(Element.textContent(element.childNodes[1]));
|
||||
row.push(Element.textContent(element.childNodes[2]));
|
||||
threadTable.addTbodyRow(row);
|
||||
});
|
||||
$('session_count').replaceChild(document.createTextNode(users + ' Connected Users'),$('session_count').firstChild);
|
||||
|
|
Loading…
Reference in New Issue