1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

F #4775: Simplify secondary groups table in sunstone dialog

This commit is contained in:
Carlos Martín 2016-09-23 15:13:16 +02:00
parent d17818a32b
commit 6e811f7bb8
2 changed files with 16 additions and 0 deletions

View File

@ -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}
});
}

View File

@ -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,