mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 20:31:31 +02:00
Fixed selection issues in grid and fixed problem with checkbox data being checked with == and not ===
This commit is contained in:
parent
dde3de5195
commit
3111c74eda
@ -1434,7 +1434,7 @@ function egwGridViewRow_doInsertIntoDOM()
|
|||||||
this.parentNode.append(td);
|
this.parentNode.append(td);
|
||||||
|
|
||||||
// Assign the click event to the column
|
// Assign the click event to the column
|
||||||
// td.mousedown(egwPreventSelect);
|
td.mousedown(egwPreventSelect);
|
||||||
if (col.type == EGW_COL_TYPE_CHECKBOX)
|
if (col.type == EGW_COL_TYPE_CHECKBOX)
|
||||||
{
|
{
|
||||||
this.checkbox = $(document.createElement("input"));
|
this.checkbox = $(document.createElement("input"));
|
||||||
@ -1451,7 +1451,7 @@ function egwGridViewRow_doInsertIntoDOM()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
td.click({"item": this, "col": col.id}, function(e) {
|
td.click({"item": this, "col": col.id}, function(e) {
|
||||||
// this.onselectstart = null;
|
this.onselectstart = null;
|
||||||
if (!e.data.item.checkbox || this != e.data.item.checkbox.context)
|
if (!e.data.item.checkbox || this != e.data.item.checkbox.context)
|
||||||
{
|
{
|
||||||
e.data.item._columnClick(egwGetShiftState(e), e.data.col);
|
e.data.item._columnClick(egwGetShiftState(e), e.data.col);
|
||||||
@ -1625,7 +1625,7 @@ function egwGridViewRow_doUpdateData(_immediate)
|
|||||||
else if (col.type == EGW_COL_TYPE_CHECKBOX)
|
else if (col.type == EGW_COL_TYPE_CHECKBOX)
|
||||||
{
|
{
|
||||||
this.checkbox.attr("checked",
|
this.checkbox.attr("checked",
|
||||||
(data[col.id].data == 0) ?
|
(data[col.id].data === 0) ?
|
||||||
egwBitIsSet(this.aoi.getState(), EGW_AO_STATE_SELECTED) :
|
egwBitIsSet(this.aoi.getState(), EGW_AO_STATE_SELECTED) :
|
||||||
data[col.id].data);
|
data[col.id].data);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user