Fixed playlist.html spinner that broke in last commit.
Fixed some song selecting issues + the one mentioned in ticket #60 (comment 04/22/06 14:17:24: Modified by abetner)
This commit is contained in:
parent
db6e5dc480
commit
0c407a7eca
|
@ -2175,8 +2175,10 @@ Rico.GridViewPort.prototype = {
|
||||||
clearRows: function() {
|
clearRows: function() {
|
||||||
if (!this.isBlank) {
|
if (!this.isBlank) {
|
||||||
this.liveGrid.table.className = this.liveGrid.options.loadingClass;
|
this.liveGrid.table.className = this.liveGrid.options.loadingClass;
|
||||||
for (var i=0; i < this.visibleRows; i++)
|
for (var i=0; i < this.visibleRows; i++) {
|
||||||
|
SelectedRows.updateState(this.table.rows[i]);
|
||||||
this.populateRow(this.table.rows[i], this.buffer.getBlankRow());
|
this.populateRow(this.table.rows[i], this.buffer.getBlankRow());
|
||||||
|
}
|
||||||
this.isBlank = true;
|
this.isBlank = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2215,7 +2217,7 @@ Rico.GridViewPort.prototype = {
|
||||||
this.populateRow(this.table.rows[i + contentOffset], rows[i]);
|
this.populateRow(this.table.rows[i + contentOffset], rows[i]);
|
||||||
}
|
}
|
||||||
for (var i=0; i < blankSize; i++) {// blank out the rest
|
for (var i=0; i < blankSize; i++) {// blank out the rest
|
||||||
SelectedRows.updateState(this.table.rows[i + contentOffset]);
|
SelectedRows.updateState(this.table.rows[i + blankOffset]);
|
||||||
this.populateRow(this.table.rows[i + blankOffset], this.buffer.getBlankRow());
|
this.populateRow(this.table.rows[i + blankOffset], this.buffer.getBlankRow());
|
||||||
}
|
}
|
||||||
this.isPartialBlank = blankSize > 0;
|
this.isPartialBlank = blankSize > 0;
|
||||||
|
|
|
@ -38,7 +38,7 @@ var Spinner = {
|
||||||
},
|
},
|
||||||
decRequestCount: function (caller) {
|
decRequestCount: function (caller) {
|
||||||
Spinner.count--;
|
Spinner.count--;
|
||||||
if (/index/.test(caller.url)) {
|
if (/type=browse/.test(caller.url)) {
|
||||||
Spinner.count = 0;
|
Spinner.count = 0;
|
||||||
$('spinner').style.visibility = 'hidden';
|
$('spinner').style.visibility = 'hidden';
|
||||||
}
|
}
|
||||||
|
@ -519,7 +519,8 @@ SelectedRows = {
|
||||||
$A($('songs_data').getElementsByTagName('tr')).each(SelectedRows.unsetSelected);
|
$A($('songs_data').getElementsByTagName('tr')).each(SelectedRows.unsetSelected);
|
||||||
},
|
},
|
||||||
updateState: function (tr,songId,index) {
|
updateState: function (tr,songId,index) {
|
||||||
if (songId && index) {
|
if (songId && (index || 0 === index)) {
|
||||||
|
// 0 == false but we want to catch index == 0
|
||||||
tr.setAttribute('songid',songId);
|
tr.setAttribute('songid',songId);
|
||||||
tr.setAttribute('index',index);
|
tr.setAttribute('index',index);
|
||||||
if (SelectedRows.isSelected(tr)) {
|
if (SelectedRows.isSelected(tr)) {
|
||||||
|
@ -528,8 +529,8 @@ SelectedRows = {
|
||||||
SelectedRows.unsetSelected(tr);
|
SelectedRows.unsetSelected(tr);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tr.removeAttribute('songid');
|
tr.setAttribute('songid','');
|
||||||
tr.removeAttribute('index');
|
tr.setAttribute('index','');
|
||||||
SelectedRows.unsetSelected(tr);
|
SelectedRows.unsetSelected(tr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue