Author: ivassile
Date: 2013-06-28 13:52:42 -0400 (Fri, 28 Jun 2013)
New Revision: 23243
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
Submitting fixes for RF-7173, RF-10793, RF-1107 and RF-7169.
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2013-06-28
16:54:14 UTC (rev 23242)
+++
branches/enterprise/3.3.1.SP3_test_patch/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2013-06-28
17:52:42 UTC (rev 23243)
@@ -555,6 +555,7 @@
range = [this.startRow, this.endRow];
this.setSelection(range);
} else if (!event.shiftKey && event.ctrlKey && !event.altKey) {
+ this.selectionFlag = "x"; //RF-10793
if (this.selection.isSelectedId(rowIndex)) {
this.removeRowFromSelection(rowIndex);
} else {
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js 2013-06-28
16:54:14 UTC (rev 23242)
+++
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/box/Box.js 2013-06-28
17:52:42 UTC (rev 23243)
@@ -72,7 +72,7 @@
getHeight: function() {
var el = this.getElement();
if(el.tagName.toLowerCase() != "body") {
- var h = el.offsetHeight;
+ var h = el.getHeight(); // offsetHeight; RF-7173
return h>0 ? h : (this.element.boxHeight ? parseInt(this.element.boxHeight) : 0);
}
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2013-06-28
16:54:14 UTC (rev 23242)
+++
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/common/utils/Utils.js 2013-06-28
17:52:42 UTC (rev 23243)
@@ -231,6 +231,7 @@
scrollElement.scrollTop--;
}
scrollElement.scrollTop = scrollTop;
+ grid.getBody().setScrollPos(scrollTop);//RF-7169
}, 50);
}
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2013-06-28
16:54:14 UTC (rev 23242)
+++
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2013-06-28
17:52:42 UTC (rev 23243)
@@ -39,6 +39,7 @@
},
// event listeners
_onContentHScroll: function(event) {
+ this.syncScrollActive = false;
this.grid.adjustScrollPosition(event.memo.pos);
},
_onDataReady: function(options) {
@@ -50,6 +51,7 @@
window.loadingInvalidateTime = (new Date()).getTime();
},
_onContentVScroll: function(event) {
+ this.syncScrollActive = false;
this.helpObject1.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight +
5);
this.helpObject2.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight +
5);
this.setScrollPos(event.memo.pos);
@@ -67,7 +69,8 @@
break;
}
}
- Event.observe(this.container.getElement(), 'keypress',
this.synchronizeScroll.bindAsEventListener(this));
+ this.syncScrollActive = false;
+ Event.observe(this.container.getElement(), 'scroll',
this.synchronizeScroll.bindAsEventListener(this));
// create scroll box
this.scrollBox = new ClientUI.common.box.ScrollableBox(this.gridId + ":scb",
this.getElement());
@@ -91,9 +94,15 @@
}
this.contentBox = new ClientUI.common.box.Box(normal);
- Event.observe(this.contentBox.getElement(), 'keypress',
this.synchronizeScroll.bindAsEventListener(this));
+ Event.observe(this.contentBox.getElement(), "keyup",
this.synchronizeKeyUp.bindAsEventListener(this));
+ Event.observe(this.contentBox.getElement(), "keydown",
this.synchronizeKeyDown.bindAsEventListener(this));
+ Event.observe(this.contentBox.getElement(), 'scroll',
this.synchronizeScroll.bindAsEventListener(this));
this.frozenContentBox = new ClientUI.common.box.Box(frozen);
+ Event.observe(this.frozenContentBox.getElement(), "keyup",
this.synchronizeKeyUp.bindAsEventListener(this));
+ Event.observe(this.frozenContentBox.getElement(), "keydown",
this.synchronizeKeyDown.bindAsEventListener(this));
+ Event.observe(this.frozenContentBox.getElement(), "scroll",
this.synchronizeScroll.bindAsEventListener(this));
+
this.helpObject1 = new ClientUI.common.box.Box(this.gridId + ":nho",
this.contentBox.getElement());
this.helpObject2 = new ClientUI.common.box.Box(this.gridId + ":fho",
this.frozenContentBox.getElement());
@@ -645,9 +654,52 @@
},
synchronizeScroll: function(event) {
- if(Event.KEY_TAB == event.keyCode || Event.KEY_TAB == event.charCode) {
- Event.stop(event);
+ if (this.syncScrollActive) {
+ if (this.contentBox.element.parentElement.scrollLeft > 0) {
+ var t = this.contentBox.element.parentElement.scrollLeft;
+ this.contentBox.element.parentElement.scrollLeft = 0;
+ this.scrollBox.element.scrollLeft += t;
+
+ } else if (this.contentBox.element.scrollLeft > 0) {
+ var t = this.contentBox.element.scrollLeft;
+ this.contentBox.element.scrollLeft = 0;
+ this.scrollBox.element.scrollLeft += t;
+ }
+ if (this.frozenContentBox.element.scrollTop != this.scrollBox.element.scrollTop) {
+ this.scrollBox.element.scrollTop = this.frozenContentBox.element.scrollTop;
+
+ } else if (this.contentBox.element.scrollTop != this.scrollBox.element.scrollTop) {
+ this.scrollBox.element.scrollTop = this.contentBox.element.scrollTop;
+ }
}
+ },
+
+ synchronizeKeyDown: function (event) {
+ if (Event.KEY_TAB == event.keyCode || Event.KEY_TAB == event.charCode) {
+ this.syncScrollActive = true;
+ }
+ },
+
+ synchronizeKeyUp: function (event) {
+ if (Event.KEY_TAB == event.keyCode || Event.KEY_TAB == event.charCode) {
+ var k = 0;
+ var el = document.activeElement;
+ if (el) {
+ k += el.offsetLeft;
+ while (el != this.templNormal.element) {
+ el = el.parentElement;
+ k += el.offsetLeft;
+ if (el == this.templFrozen.element) {
+ k = 0;
+ this.scrollBox.element.scrollLeft = 0;
+ return;
+ }
+ }
+ if (k < 0) {
+ this.scrollBox.element.scrollLeft += k;
+ }
+ }
+ }
}
});