Skip to content

Commit

Permalink
Add ability to disable grids
Browse files Browse the repository at this point in the history
  • Loading branch information
blakemcbride committed Feb 5, 2024
1 parent 0e17348 commit fc89ac3
Show file tree
Hide file tree
Showing 21 changed files with 392 additions and 64 deletions.
370 changes: 329 additions & 41 deletions manual/jsdoc/AGGrid.html

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions manual/jsdoc/AGGrid.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/DateTimeUtils.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/DateTimeUtils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/DateUtils.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/DateUtils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/Editor.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/Editor.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/NumberUtils.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/NumberUtils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/Server.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/Server.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/TimeUtils.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/TimeUtils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/Utils.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/Utils.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/component_components.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/components.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/global.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion manual/jsdoc/index.html

Large diffs are not rendered by default.

24 changes: 22 additions & 2 deletions src/main/frontend/kiss/AGGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class AGGrid {
this.suppressRowClickSelection = false;
this.suppressHorizontalScroll = true;
this.rowStyleFun = null;
this.disableCtl = false;
}

/**
Expand Down Expand Up @@ -465,7 +466,7 @@ class AGGrid {
setOnSelectionChanged(fn) {
const self = this;
this.gridOptions.onSelectionChanged = function () {
if (fn)
if (fn && !self.disableCtl)
fn(self.gridOptions.api.getSelectedRows());
};
return this;
Expand All @@ -478,9 +479,10 @@ class AGGrid {
* @returns {AGGrid}
*/
setOnRowDoubleClicked(fn) {
const self = this;
if (fn)
this.gridOptions.onRowDoubleClicked = () => {
if (!Utils.suspendDepth)
if (!Utils.suspendDepth && !self.disableCtl)
fn();
};
else
Expand Down Expand Up @@ -648,6 +650,24 @@ class AGGrid {
return Utils.format(val, msk, 0, dp);
}

/**
* Disables the clicks on the AGGrid control.
*
* @param {boolean} flg - true=disable, false=enable
*/
disable(flg = true) {
this.disableCtl = flg;
}

/**
* Enables the clicks on the AGGrid control.
*
* @param {boolean} flg - true=enable, false=disable
*/
enable(flg = true) {
this.disableCtl = !flg;
}

}

// class variables
Expand Down

0 comments on commit fc89ac3

Please sign in to comment.