You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2019/01/15 03:00:16 UTC

[ignite] branch master updated: IGNITE-10936 Web Console: Added support for single select mode on ui-grid.

This is an automated email from the ASF dual-hosted git repository.

akuznetsov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a614e7  IGNITE-10936 Web Console: Added support for single select mode on ui-grid.
9a614e7 is described below

commit 9a614e7b9884a7cd27233ea46d98cb0b8f04fdba
Author: Vasiliy Sisko <vs...@gridgain.com>
AuthorDate: Tue Jan 15 09:58:09 2019 +0700

    IGNITE-10936 Web Console: Added support for single select mode on ui-grid.
---
 modules/web-console/frontend/app/components/ui-grid/component.js  | 1 +
 modules/web-console/frontend/app/components/ui-grid/controller.js | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/modules/web-console/frontend/app/components/ui-grid/component.js b/modules/web-console/frontend/app/components/ui-grid/component.js
index d75cc6c..11ce4d7 100644
--- a/modules/web-console/frontend/app/components/ui-grid/component.js
+++ b/modules/web-console/frontend/app/components/ui-grid/component.js
@@ -36,6 +36,7 @@ export default {
         items: '<',
         columnDefs: '<',
         categories: '<?',
+        singleSelect: '<?',
         oneWaySelection: '<?',
         rowIdentityKey: '@?',
         selectedRows: '<?',
diff --git a/modules/web-console/frontend/app/components/ui-grid/controller.js b/modules/web-console/frontend/app/components/ui-grid/controller.js
index ec7101b..a6197b4 100644
--- a/modules/web-console/frontend/app/components/ui-grid/controller.js
+++ b/modules/web-console/frontend/app/components/ui-grid/controller.js
@@ -42,6 +42,9 @@ export default class IgniteUiGrid {
     /** @type */
     categories;
 
+    /** @type {boolean} */
+    singleSelect;
+
     /** @type */
     onSelectionChange;
 
@@ -58,6 +61,9 @@ export default class IgniteUiGrid {
 
     /**
      * @param {ng.IScope} $scope
+     * @param $element
+     * @param $timeout
+     * @param gridUtil
      */
     constructor($scope, $element, $timeout, gridUtil) {
         this.$scope = $scope;
@@ -85,6 +91,8 @@ export default class IgniteUiGrid {
             columnDefs: this.columnDefs,
             categories: this.categories,
             rowHeight: this.rowHeight,
+            multiSelect: !this.singleSelect,
+            enableSelectAll: !this.singleSelect,
             headerRowHeight: this.headerRowHeight,
             columnVirtualizationThreshold: 30,
             enableColumnMenus: false,