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

SSDM-3026 : Show columns by default and show/hide tables to select samples properly.

SVN: 35984
parent 6f1b4d05
No related branches found
No related tags found
No related merge requests found
......@@ -128,6 +128,7 @@ function LinksView(linksController, linksModel) {
label : "Annot.::" + propertyType.label,
property : propertyAnnotationCode,
isExportable: true,
showByDefault: true,
sortable : true,
render : function(data) {
var sample = data["$object"];
......@@ -199,7 +200,7 @@ function LinksView(linksController, linksModel) {
}
linksView.showSamplePicker = function($container, sampleTypeCode) {
$container.empty();
$container.empty().show();
$container.css({
"margin" : "5px",
"padding" : "5px",
......@@ -208,7 +209,7 @@ function LinksView(linksController, linksModel) {
//Close Button
var $closeBtn = FormUtil.getButtonWithIcon("glyphicon-remove", function() {
$container.empty();
$container.empty().hide();
});
var $closeBtnContainer = $("<div>").append($closeBtn).css({"text-align" : "right", "padding-right" : "2px"});
$container.append($closeBtnContainer);
......@@ -226,7 +227,7 @@ function LinksView(linksController, linksModel) {
var rowClick = function(e) {
linksController.addSample(e.data["$object"]);
$container.empty();
$container.empty().hide();
}
var dataGrid = SampleDataGridUtil.getSampleDataGrid(sampleTypeCode, samples, rowClick);
......
......@@ -63,7 +63,9 @@ $.extend(Grid.prototype, {
.attr("value", column.property)
.attr("style", "margin-left: 5px;");
if(thisGrid.columnsToShow && Object.keys(thisGrid.columnsToShow).length !== 0) {
if(column.showByDefault) {
checkbox.attr("checked", "checked");
} else if(thisGrid.columnsToShow && Object.keys(thisGrid.columnsToShow).length !== 0) {
if((thisGrid.columnsToShow[column.property] === true)) { //If settings are present
checkbox.attr("checked", "checked");
}
......
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