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

SSDM-5274 : More readable links for positions

SVN: 38491
parent f24ecd20
No related branches found
No related tags found
No related merge requests found
...@@ -30,30 +30,39 @@ function StorageListView(storageListController, storageListModel) { ...@@ -30,30 +30,39 @@ function StorageListView(storageListController, storageListModel) {
property : 'link', property : 'link',
isExportable: false, isExportable: false,
sortable : false, sortable : false,
showByDefault: true,
render : function(data) { render : function(data) {
var storagePropertyGroup = profile.getStoragePropertyGroup(); var storagePropertyGroup = profile.getStoragePropertyGroup();
var displayName = data[storagePropertyGroup.boxProperty] + " : " + data[storagePropertyGroup.positionProperty]; var boxProperty = data[storagePropertyGroup.boxProperty];
if(!boxProperty) {
boxProperty = "NoBox";
}
var positionProperty = data[storagePropertyGroup.positionProperty];
if(!positionProperty) {
positionProperty = "NoPos";
}
var displayName = boxProperty + " : " + positionProperty;
return (data['$object'].newSample)?displayName:FormUtil.getFormLink(displayName, "Sample", data['$object'].permId); return (data['$object'].newSample)?displayName:FormUtil.getFormLink(displayName, "Sample", data['$object'].permId);
}, },
filter : function(data, filter) { filter : function(data, filter) {
return data.identifier.toLowerCase().indexOf(filter) !== -1; return data.identifier.toLowerCase().indexOf(filter) !== -1;
} }
}); });
columns.push({ // columns.push({
label : 'Identifier', // label : 'Identifier',
property : 'identifier', // property : 'identifier',
isExportable: true, // isExportable: true,
sortable : true, // sortable : true,
filter : function(data, filter) { // filter : function(data, filter) {
return data.identifier.toLowerCase().indexOf(filter) !== -1; // return data.identifier.toLowerCase().indexOf(filter) !== -1;
}, // },
sort : function(data1, data2, asc) { // sort : function(data1, data2, asc) {
var value1 = data1.identifier; // var value1 = data1.identifier;
var value2 = data2.identifier; // var value2 = data2.identifier;
var sortDirection = (asc)? 1 : -1; // var sortDirection = (asc)? 1 : -1;
return sortDirection * naturalSort(value1, value2); // return sortDirection * naturalSort(value1, value2);
} // }
}); // });
var storagePropertyCodes = profile.getAllPropertiCodesForTypeCode("STORAGE_POSITION"); var storagePropertyCodes = profile.getAllPropertiCodesForTypeCode("STORAGE_POSITION");
var storagePropertyCodesAsMap = {}; var storagePropertyCodesAsMap = {};
......
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