From c359e135ace9bfa4119472222a7b678ea0c83c05 Mon Sep 17 00:00:00 2001 From: johannesvaltonen Date: Tue, 3 Jan 2017 17:26:48 +0200 Subject: [PATCH] Added a property for translating the row count separator. --- README.md | 1 + app/modules/main/directives/mdtTableDirective.js | 1 + app/modules/main/templates/mdtCardFooter.html | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 388cd13..51142c1 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ http://www.google.com/design/spec/components/data-tables.html |:white_check_mark:| | column-keys | Array | required, property names of the passed data array. Makes it possible to configure which property should go in which column. | |:white_check_mark:| mdt-translations | | Object | optional, makes it possible to provide a custom translated texts in the table. | |:white_check_mark:| | rowsPerPage | String | When you need to select the amount of rows visible on the page, this label appears next to the dropdown | +|:white_check_mark:| | pageRowsOfTotalRowsSeparator | String | This label appears in between of the current page row range and the total row count. The default value is 'of'. | |:white_check_mark:| | largeEditDialog.saveButtonLabel | String | When edit mode is on, in the modal you can click on a button which has the 'Save' label. | |:white_check_mark:| | largeEditDialog.cancelButtonLabel| String | When edit mode is on, in the modal you can click on a button which has the : 'Cancel' label. | |:white_check_mark:| mdt-loading-indicator | | Object | optional, if set then loading indicator can be customised. | diff --git a/app/modules/main/directives/mdtTableDirective.js b/app/modules/main/directives/mdtTableDirective.js index 64c0857..454837d 100644 --- a/app/modules/main/directives/mdtTableDirective.js +++ b/app/modules/main/directives/mdtTableDirective.js @@ -167,6 +167,7 @@ $scope.mdtTranslations = $scope.mdtTranslations || {}; $scope.mdtTranslations.rowsPerPage = $scope.mdtTranslations.rowsPerPage || 'Rows per page:'; + $scope.mdtTranslations.pageRowsOfTotalRowsSeparator = $scope.mdtTranslations.pageRowsOfTotalRowsSeparator || 'of'; $scope.mdtTranslations.largeEditDialog = $scope.mdtTranslations.largeEditDialog || {}; $scope.mdtTranslations.largeEditDialog.saveButtonLabel = $scope.mdtTranslations.largeEditDialog.saveButtonLabel || 'Save'; diff --git a/app/modules/main/templates/mdtCardFooter.html b/app/modules/main/templates/mdtCardFooter.html index 93ee775..ae29f14 100644 --- a/app/modules/main/templates/mdtCardFooter.html +++ b/app/modules/main/templates/mdtCardFooter.html @@ -12,7 +12,7 @@ - {{mdtPaginationHelper.getStartRowIndex()+1}}-{{mdtPaginationHelper.getEndRowIndex()+1}} of {{mdtPaginationHelper.getTotalRowsCount()}} + {{mdtPaginationHelper.getStartRowIndex()+1}}-{{mdtPaginationHelper.getEndRowIndex()+1}} {{mdtTranslations.pageRowsOfTotalRowsSeparator}} {{mdtPaginationHelper.getTotalRowsCount()}}