Skip to content
Snippets Groups Projects
Commit 977dbbb1 authored by juanf's avatar juanf
Browse files

Fix to store the table configuration correctly.

SVN: 33808
parent c96d120f
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,10 @@ function DataGridController(title, columns, data, rowClickEventHandler, showAllC
this._dataGridView = null;
var _this = this;
if(!configKey) {
window.alert("This view created a table without configKey, please report it to the developers.");
}
this.init = function($container) {
var webAppId = "ELN-LIMS";
mainController.serverFacade.openbisServer.getWebAppSettings(webAppId, function(response) {
......@@ -39,7 +43,7 @@ function DataGridController(title, columns, data, rowClickEventHandler, showAllC
mainController.serverFacade.openbisServer.setWebAppSettings(webAppSettings, function(result) {});
}
var tableSettings = null;
if(settings[configKey]) {
if(configKey && settings[configKey]) {
tableSettings = JSON.parse(settings[configKey]);
}
_this._grid = new Grid(columns, data, showAllColumns, tableSettings, onColumnsChange);
......
......@@ -103,7 +103,7 @@ function SampleHierarchyTableView(controller, model) {
mainController.changeView('showViewSamplePageFromPermId', e.data.permId);
}
this._dataGrid = new DataGridController(null, columns, getDataList, rowClick);
this._dataGrid = new DataGridController(null, columns, getDataList, rowClick, false, "SAMPLE_HIERARCHY_TABLE");
this._dataGrid.init(this._container);
this._container.prepend($("<legend>").append(" Sample Hierarchy"));
}
......
......@@ -171,7 +171,7 @@ function TrashManagerView(trashManagerController, trashManagerModel) {
}
var dataGridContainer = $("<div>");
var dataGrid = new DataGridController(null, columns, getDataList, null);
var dataGrid = new DataGridController(null, columns, getDataList, null, true, "TRASHCAN_TABLE");
dataGrid.init(dataGridContainer);
$containerColumn.append(dataGridContainer);
......
......@@ -123,7 +123,7 @@ function UserManagerView(userManagerController, userManagerModel) {
callback(dataList);
}
var dataGrid = new DataGridController(null, columns, getDataList, null);
var dataGrid = new DataGridController(null, columns, getDataList, null, false, "USER_MANAGER_TABLE");
dataGrid.init(dataGridContainer);
//
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment