Fix the stepper beyond page 1.
This commit is contained in:
parent
f45f87b70b
commit
3a824f69d4
@ -180,7 +180,7 @@ var StepperManager = (function StepperManagerClosure() {
|
|||||||
this.selectStepper(pageNumber, false);
|
this.selectStepper(pageNumber, false);
|
||||||
return stepper;
|
return stepper;
|
||||||
},
|
},
|
||||||
selectStepper: function selectStepper(pageNumber, selectPanel) {
|
selectStepper: function selectStepper(pageNumber, selectPanel, change) {
|
||||||
if (selectPanel)
|
if (selectPanel)
|
||||||
this.manager.selectPanel(1);
|
this.manager.selectPanel(1);
|
||||||
for (var i = 0; i < steppers.length; ++i) {
|
for (var i = 0; i < steppers.length; ++i) {
|
||||||
@ -190,6 +190,11 @@ var StepperManager = (function StepperManagerClosure() {
|
|||||||
else
|
else
|
||||||
stepper.panel.setAttribute('hidden', true);
|
stepper.panel.setAttribute('hidden', true);
|
||||||
}
|
}
|
||||||
|
var options = stepperChooser.options;
|
||||||
|
for (var i = 0; i < options.length; ++i) {
|
||||||
|
var option = options[i];
|
||||||
|
option.selected = option.value == pageNumber;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
saveBreakPoints: function saveBreakPoints(pageNumber, bps) {
|
saveBreakPoints: function saveBreakPoints(pageNumber, bps) {
|
||||||
breakPoints[pageNumber] = bps;
|
breakPoints[pageNumber] = bps;
|
||||||
@ -234,7 +239,7 @@ var Stepper = (function StepperClosure() {
|
|||||||
for (var i = 0; i < IRQueue.fnArray.length; i++) {
|
for (var i = 0; i < IRQueue.fnArray.length; i++) {
|
||||||
var line = c('tr');
|
var line = c('tr');
|
||||||
line.className = 'line';
|
line.className = 'line';
|
||||||
line.id = 'idx' + i;
|
line.dataset.idx = i;
|
||||||
table.appendChild(line);
|
table.appendChild(line);
|
||||||
var checked = this.breakPoints.indexOf(i) != -1;
|
var checked = this.breakPoints.indexOf(i) != -1;
|
||||||
var args = IRQueue.argsArray[i] ? IRQueue.argsArray[i] : [];
|
var args = IRQueue.argsArray[i] ? IRQueue.argsArray[i] : [];
|
||||||
@ -299,13 +304,14 @@ var Stepper = (function StepperClosure() {
|
|||||||
},
|
},
|
||||||
goTo: function goTo(idx) {
|
goTo: function goTo(idx) {
|
||||||
var allRows = this.panel.getElementsByClassName('line');
|
var allRows = this.panel.getElementsByClassName('line');
|
||||||
for (var x = 0; x < allRows.length; x++) {
|
for (var x = 0, xx = allRows.length; x < xx; ++x) {
|
||||||
allRows[x].style.backgroundColor = null;
|
var row = allRows[x];
|
||||||
}
|
if (row.dataset.idx == idx) {
|
||||||
var row = document.getElementById('idx' + idx);
|
row.style.backgroundColor = 'rgb(251,250,207)';
|
||||||
if (row) {
|
row.scrollIntoView();
|
||||||
row.style.backgroundColor = 'rgb(251,250,207)';
|
} else {
|
||||||
row.scrollIntoView();
|
row.style.backgroundColor = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user