Apply linking filter to string columns.

This commit is contained in:
Arik Fraimovich 2014-05-13 20:14:45 +03:00
parent 95ad15057b
commit 036eb46ea4

View File

@ -19,7 +19,7 @@
},
templateUrl: "/views/grid_renderer.html",
replace: false,
controller: ['$scope', function ($scope) {
controller: ['$scope', '$filter', function ($scope, $filter) {
$scope.gridColumns = [];
$scope.gridData = [];
$scope.gridConfig = {
@ -94,6 +94,13 @@
columnDefinition.formatFunction = function (value) {
return value.format("DD/MM/YY HH:mm");
};
} else {
columnDefinition.formatFunction = function (value) {
if (angular.isString(value)) {
value = $filter('linkify')(value);
}
return value;
}
}
return columnDefinition;