| 1234567891011121314151617181920212223242526272829303132333435363738 |
- /**
- * Shows table data split into pages.
- */
- (function() {
- (function() {
- try {return angular.module('ieat.ui')}
- catch {return angular.module('ieat.ui', [])}}
- )().component('paginatedTable', {
- templateUrl: 'static/templates/paginatedTable.html',
- bindings: {
- /* Array of data to display in the table. */
- tableData: '<',
- /*
- * Array of columns to display
- * Schema:
- * name: Header for columns
- * col: Property from table data objects to display
- * size: Relative size in the table (default: 3)
- */
- structure: '<',
- /* Text to display on select button. */
- selectText: '<',
- /*
- * Function to call when select button clicked.
- * If not set, no button will appear.
- */
- onSelect: '&'
- },
- controller: ['$scope', '$timeout', function($scope, $timeout) {
- var self = this;
- this.$onInit = function() {
- self.selectText = self.selectText || "Add";
- $scope.pageOffset = 0;
- $scope.pageSize = "10";
- };
- }]
- });
- })();
|