mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:21:16 +02:00
fix behavior after merge.
This commit is contained in:
parent
7b3d2bed15
commit
ba790ae470
2 changed files with 7 additions and 6 deletions
|
@ -396,8 +396,8 @@ function loaded() {
|
||||||
|
|
||||||
elEntityTableHeaderRow = document.querySelectorAll("#entity-table thead th");
|
elEntityTableHeaderRow = document.querySelectorAll("#entity-table thead th");
|
||||||
|
|
||||||
entityList = new ListView(elEntityTableBody, elEntityTableScroll, elEntityTableHeaderRow,
|
entityList = new ListView(elEntityTableBody, elEntityTableScroll, elEntityTableHeaderRow, createRow, updateRow,
|
||||||
createRow, updateRow, clearRow, preRefresh, postRefresh, WINDOW_NONVARIABLE_HEIGHT);
|
clearRow, preRefresh, postRefresh, preRefresh, WINDOW_NONVARIABLE_HEIGHT);
|
||||||
|
|
||||||
entityListContextMenu = new EntityListContextMenu();
|
entityListContextMenu = new EntityListContextMenu();
|
||||||
|
|
||||||
|
@ -448,7 +448,7 @@ function loaded() {
|
||||||
|
|
||||||
function preRefresh() {
|
function preRefresh() {
|
||||||
// move the rename input to the body
|
// move the rename input to the body
|
||||||
if (elRenameInput) {
|
if (!isRenameFieldBeingMoved && elRenameInput) {
|
||||||
isRenameFieldBeingMoved = true;
|
isRenameFieldBeingMoved = true;
|
||||||
document.body.appendChild(elRenameInput);
|
document.body.appendChild(elRenameInput);
|
||||||
// keep the focus
|
// keep the focus
|
||||||
|
|
|
@ -13,8 +13,8 @@ debugPrint = function (message) {
|
||||||
console.log(message);
|
console.log(message);
|
||||||
};
|
};
|
||||||
|
|
||||||
function ListView(elTableBody, elTableScroll, elTableHeaderRow, createRowFunction,
|
function ListView(elTableBody, elTableScroll, elTableHeaderRow, createRowFunction, updateRowFunction, clearRowFunction,
|
||||||
updateRowFunction, clearRowFunction, preRefreshFunction, postRefreshFunction, WINDOW_NONVARIABLE_HEIGHT) {
|
preRefreshFunction, postRefreshFunction, preResizeFunction, WINDOW_NONVARIABLE_HEIGHT) {
|
||||||
this.elTableBody = elTableBody;
|
this.elTableBody = elTableBody;
|
||||||
this.elTableScroll = elTableScroll;
|
this.elTableScroll = elTableScroll;
|
||||||
this.elTableHeaderRow = elTableHeaderRow;
|
this.elTableHeaderRow = elTableHeaderRow;
|
||||||
|
@ -27,6 +27,7 @@ function ListView(elTableBody, elTableScroll, elTableHeaderRow, createRowFunctio
|
||||||
this.clearRowFunction = clearRowFunction;
|
this.clearRowFunction = clearRowFunction;
|
||||||
this.preRefreshFunction = preRefreshFunction;
|
this.preRefreshFunction = preRefreshFunction;
|
||||||
this.postRefreshFunction = postRefreshFunction;
|
this.postRefreshFunction = postRefreshFunction;
|
||||||
|
this.preResizeFunction = preResizeFunction;
|
||||||
|
|
||||||
// the list of row elements created in the table up to max viewable height plus SCROLL_ROWS rows for scrolling buffer
|
// the list of row elements created in the table up to max viewable height plus SCROLL_ROWS rows for scrolling buffer
|
||||||
this.elRows = [];
|
this.elRows = [];
|
||||||
|
@ -248,7 +249,7 @@ ListView.prototype = {
|
||||||
debugPrint("ListView.resize - no valid table body or table scroll element");
|
debugPrint("ListView.resize - no valid table body or table scroll element");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
this.preResizeFunction();
|
||||||
let prevScrollTop = this.elTableScroll.scrollTop;
|
let prevScrollTop = this.elTableScroll.scrollTop;
|
||||||
|
|
||||||
// take up available window space
|
// take up available window space
|
||||||
|
|
Loading…
Reference in a new issue