diff --git a/src/sunstone/public/app/tabs/users-tab/utils/user-creation.js b/src/sunstone/public/app/tabs/users-tab/utils/user-creation.js index a78122fb59..c14b561b80 100644 --- a/src/sunstone/public/app/tabs/users-tab/utils/user-creation.js +++ b/src/sunstone/public/app/tabs/users-tab/utils/user-creation.js @@ -65,6 +65,7 @@ define(function(require) { this.groupsTable = new GroupsTable('user-creation-'+UniqueId.id(), { info: false, select: true, + minColumns: true, selectOptions: {'multiple_choice': true} }); } diff --git a/src/sunstone/public/app/utils/tab-datatable.js b/src/sunstone/public/app/utils/tab-datatable.js index e3745a1e0b..f5c562cb33 100644 --- a/src/sunstone/public/app/utils/tab-datatable.js +++ b/src/sunstone/public/app/utils/tab-datatable.js @@ -86,6 +86,7 @@ define(function(require) { 'selectOptions': { 'filter_fn': function(ds) { return ds.TYPE == 0; } } + 'minColumns': if true, all columns are hidden except ID and NAME 'customTabContext': jquery selector used when the datatable has associated buttons. By default it will be the parent tab 'customTrListener': function executed when a tr is clicked. Arguments @@ -279,6 +280,20 @@ define(function(require) { that.dataTable.fnSetColumnVis(0, false); } + if (this.conf.minColumns == true) { + var n_columns = that.columns.length + 1; + + for(var i = 1; i < n_columns; i += 1){ + if ( i == that.selectOptions.id_index || + i == that.selectOptions.name_index ){ + + that.dataTable.fnSetColumnVis(i, true); + }else{ + that.dataTable.fnSetColumnVis(i, false); + } + } + } + Foundation.reflow($('#' + this.dataTableId + 'Search-dropdown'), 'dropdown'); // For some reason the dropdown forces horizontal and vertical scrollbars,