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) {
property : 'link',
isExportable: false,
sortable : false,
showByDefault: true,
render : function(data) {
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);
},
filter : function(data, filter) {
return data.identifier.toLowerCase().indexOf(filter) !== -1;
}
});
columns.push({
label : 'Identifier',
property : 'identifier',
isExportable: true,
sortable : true,
filter : function(data, filter) {
return data.identifier.toLowerCase().indexOf(filter) !== -1;
},
sort : function(data1, data2, asc) {
var value1 = data1.identifier;
var value2 = data2.identifier;
var sortDirection = (asc)? 1 : -1;
return sortDirection * naturalSort(value1, value2);
}
});
// columns.push({
// label : 'Identifier',
// property : 'identifier',
// isExportable: true,
// sortable : true,
// filter : function(data, filter) {
// return data.identifier.toLowerCase().indexOf(filter) !== -1;
// },
// sort : function(data1, data2, asc) {
// var value1 = data1.identifier;
// var value2 = data2.identifier;
// var sortDirection = (asc)? 1 : -1;
// return sortDirection * naturalSort(value1, value2);
// }
// });
var storagePropertyCodes = profile.getAllPropertiCodesForTypeCode("STORAGE_POSITION");
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