diff --git a/build/ng-grid.debug.js b/build/ng-grid.debug.js index 300963362c..4d21c8c3d2 100644 --- a/build/ng-grid.debug.js +++ b/build/ng-grid.debug.js @@ -2,7 +2,7 @@ * ng-grid JavaScript Library * Authors: https://github.com/angular-ui/ng-grid/blob/master/README.md * License: MIT (http://www.opensource.org/licenses/mit-license.php) -* Compiled At: 01/27/2014 16:18 +* Compiled At: 07/06/2013 13:50 ***********************************************/ (function(window, $) { 'use strict'; @@ -21,7 +21,6 @@ var CUSTOM_FILTERS = /CUSTOM_FILTERS/g; var COL_FIELD = /COL_FIELD/g; var DISPLAY_CELL_TEMPLATE = /DISPLAY_CELL_TEMPLATE/g; var EDITABLE_CELL_TEMPLATE = /EDITABLE_CELL_TEMPLATE/g; -var CELL_EDITABLE_CONDITION = /CELL_EDITABLE_CONDITION/g; var TEMPLATE_REGEXP = /<.+>/; window.ngGrid = {}; window.ngGrid.i18n = {}; @@ -50,7 +49,7 @@ var ngMoveSelectionHandler = function($scope, elm, evt, grid) { newColumnIndex = visibleCols.indexOf($scope.col); } - if (charCode !== 37 && charCode !== 38 && charCode !== 39 && charCode !== 40 && (grid.config.noTabInterference || charCode !== 9) && charCode !== 13) { + if (charCode !== 37 && charCode !== 38 && charCode !== 39 && charCode !== 40 && charCode !== 9 && charCode !== 13) { return true; } @@ -206,7 +205,7 @@ ngGridFilters.filter('ngColumns', function() { }); }; }); -angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService', '$window', function($utils, $window) { +angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService', function($utils) { var domUtilityService = {}; var regexCache = {}; var getWidths = function() { @@ -243,7 +242,7 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService grid.$canvas = grid.$viewport.find(".ngCanvas"); //Footers grid.$footerPanel = grid.$root.find(".ngFooterPanel"); - + $scope.$watch(function () { return grid.$viewport.scrollLeft(); }, function (newLeft) { @@ -273,36 +272,21 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService $scope.adjustScrollTop(scrollTop, true); //ensure that the user stays scrolled where they were }; domUtilityService.numberOfGrids = 0; - domUtilityService.setStyleText = function(grid, css) { - var style = grid.styleSheet, - gridId = grid.gridId, - doc = $window.document; - - if (!style) { - style = doc.getElementById(gridId); - } - if (!style) { - style = doc.createElement('style'); - style.type = 'text/css'; - style.id = gridId; - (doc.head || doc.getElementsByTagName('head')[0]).appendChild(style); - } - - if (style.styleSheet && !style.sheet) { - style.styleSheet.cssText = css; - } else { - style.innerHTML = css; - } - grid.styleSheet = style; - grid.styleText = css; - }; domUtilityService.BuildStyles = function($scope, grid, digest) { var rowHeight = grid.config.rowHeight, + $style = grid.$styleSheet, gridId = grid.gridId, css, cols = $scope.columns, sumWidth = 0; + if (!$style) { + $style = $('#' + gridId); + if (!$style[0]) { + $style = $("").appendTo(grid.$root); + } + } + $style.empty(); var trw = $scope.totalRowWidth(); css = "." + gridId + " .ngCanvas { width: " + trw + "px; }" + "." + gridId + " .ngRow { width: " + trw + "px; }" + @@ -317,21 +301,38 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService sumWidth += col.width; } } - domUtilityService.setStyleText(grid, css); + if ($utils.isIe) { // IE + $style[0].styleSheet.cssText = css; + } + + else { + $style[0].appendChild(document.createTextNode(css)); + } + + grid.$styleSheet = $style; + $scope.adjustScrollLeft(grid.$viewport.scrollLeft()); if (digest) { domUtilityService.digest($scope); } }; domUtilityService.setColLeft = function(col, colLeft, grid) { - if (grid.styleText) { + if (grid.$styleSheet) { var regex = regexCache[col.index]; if (!regex) { regex = regexCache[col.index] = new RegExp(".col" + col.index + " { width: [0-9]+px; left: [0-9]+px"); } - var css = grid.styleText.replace(regex, ".col" + col.index + " { width: " + col.width + "px; left: " + colLeft + "px"); - domUtilityService.setStyleText(grid, css); + var str = grid.$styleSheet.html(); + var newStr = str.replace(regex, ".col" + col.index + " { width: " + col.width + "px; left: " + colLeft + "px"); + if ($utils.isIe) { // IE + setTimeout(function() { + grid.$styleSheet.html(newStr); + }); + } + else { + grid.$styleSheet.html(newStr); + } } }; domUtilityService.setColLeft.immediate = 1; @@ -540,11 +541,10 @@ angular.module('ngGrid.services').factory('$utilityService', ['$parse', function elem.style.visibility = "hidden"; document.body.appendChild(elem); } - var $node = $(node); - $(elem).css({'font': $node.css('font'), - 'font-size': $node.css('font-size'), - 'font-family': $node.css('font-family')}); - elem.innerHTML = $node.text(); + $(elem).css('font', $(node).css('font')); + $(elem).css('font-size', $(node).css('font-size')); + $(elem).css('font-family', $(node).css('font-family')); + elem.innerHTML = $(node).text(); return elem.offsetWidth; }, forIn: function(obj, action) { @@ -570,21 +570,16 @@ angular.module('ngGrid.services').factory('$utilityService', ['$parse', function return false; }, getElementsByClassName: function(cl) { - if (document.getElementsByClassName) { - return document.getElementsByClassName(cl); - } - else { - var retnode = []; - var myclass = new RegExp('\\b' + cl + '\\b'); - var elem = document.getElementsByTagName('*'); - for (var i = 0; i < elem.length; i++) { - var classes = elem[i].className; - if (myclass.test(classes)) { - retnode.push(elem[i]); - } + var retnode = []; + var myclass = new RegExp('\\b' + cl + '\\b'); + var elem = document.getElementsByTagName('*'); + for (var i = 0; i < elem.length; i++) { + var classes = elem[i].className; + if (myclass.test(classes)) { + retnode.push(elem[i]); } - return retnode; } + return retnode; }, newId: (function() { var seedId = new Date().getTime(); @@ -607,9 +602,27 @@ angular.module('ngGrid.services').factory('$utilityService', ['$parse', function else { return ""; } - } - }; - + }, + // Detect IE versions for bug workarounds (uses IE conditionals, not UA string, for robustness) + // Note that, since IE 10 does not support conditional comments, the following logic only detects IE < 10. + // Currently this is by design, since IE 10+ behaves correctly when treated as a standard browser. + // If there is a future need to detect specific versions of IE10+, we will amend this. + ieVersion: (function() { + var version = 3, div = document.createElement('div'), iElems = div.getElementsByTagName('i'); + + // Keep constructing conditional HTML blocks until we hit one that resolves to an empty fragment + do{ + div.innerHTML = ''; + }while(iElems[0]); + return version > 4 ? version : undefined; + })() + }; + + $.extend(utils, { + isIe: (function() { + return utils.ieVersion !== undefined; + })() + }); return utils; }]); @@ -706,8 +719,6 @@ var ngColumn = function (config, $scope, grid, domUtilityService, $templateCache // TODO: Use the column's definition for enabling cell editing // self.enableCellEdit = config.enableCellEdit || colDef.enableCellEdit; self.enableCellEdit = colDef.enableCellEdit !== undefined ? colDef.enableCellEdit : (config.enableCellEdit || config.enableCellEditOnFocus); - - self.cellEditableCondition = colDef.cellEditableCondition || config.cellEditableCondition || 'true'; self.headerRowHeight = config.headerRowHeight; @@ -720,7 +731,7 @@ var ngColumn = function (config, $scope, grid, domUtilityService, $templateCache self.sortPriority = undefined; self.cellFilter = colDef.cellFilter ? colDef.cellFilter : ""; self.field = colDef.field; - self.aggLabelFilter = colDef.aggLabelFilter || colDef.cellFilter; + self.aggLabelFilter = colDef.cellFilter || colDef.aggLabelFilter; self.visible = $utils.isNullOrUndefined(colDef.visible) || colDef.visible; self.sortable = false; self.resizable = false; @@ -744,7 +755,7 @@ var ngColumn = function (config, $scope, grid, domUtilityService, $templateCache self.headerCellTemplate = colDef.headerCellTemplate || $templateCache.get('headerCellTemplate.html'); self.cellTemplate = colDef.cellTemplate || $templateCache.get('cellTemplate.html').replace(CUSTOM_FILTERS, self.cellFilter ? "|" + self.cellFilter : ""); if(self.enableCellEdit) { - self.cellEditTemplate = colDef.cellEditTemplate || $templateCache.get('cellEditTemplate.html'); + self.cellEditTemplate = $templateCache.get('cellEditTemplate.html'); self.editableCellTemplate = colDef.editableCellTemplate || $templateCache.get('editableCellTemplate.html'); } if (colDef.cellTemplate && !TEMPLATE_REGEXP.test(colDef.cellTemplate)) { @@ -953,7 +964,7 @@ var ngEventProvider = function (grid, $scope, domUtilityService, $timeout) { } else { grid.$groupPanel.on('mousedown', self.onGroupMouseDown).on('dragover', self.dragOver).on('drop', self.onGroupDrop); grid.$headerScroller.on('mousedown', self.onHeaderMouseDown).on('dragover', self.dragOver); - if (grid.config.enableColumnReordering) { + if (grid.config.enableColumnReordering && !grid.config.enablePinning) { grid.$headerScroller.on('drop', self.onHeaderDrop); } } @@ -1096,8 +1107,8 @@ var ngEventProvider = function (grid, $scope, domUtilityService, $timeout) { // Get the scope from the header. var headerScope = angular.element(headerContainer).scope(); if (headerScope) { - // If we have the same column or the target column is pinned, do nothing. - if (self.colToMove.col === headerScope.col || headerScope.col.pinned) { + // If we have the same column, do nothing. + if (self.colToMove.col === headerScope.col) { return; } // Splice the columns @@ -1152,17 +1163,9 @@ var ngFooter = function ($scope, grid) { return ret; }; - $scope.$watch('totalServerItems',function(n,o){ - $scope.currentMaxPages = $scope.maxPages(); - }); - $scope.multiSelect = (grid.config.enableRowSelection && grid.config.multiSelect); $scope.selectedItemCount = grid.selectedItemCount; - $scope.maxPages = function () { - if($scope.maxRows() === 0) { - return 1; - } return Math.ceil($scope.maxRows() / $scope.pagingOptions.pageSize); }; @@ -1299,10 +1302,6 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, // the template for the column menu and filter, including the button. footerTemplate: undefined, - // Enables a trade off between refreshing the contents of the grid continuously while scrolling (behaviour when true) - // and keeping the scroll bar button responsive at the expense of refreshing grid contents (behaviour when false) - forceSyncScrolling: true, - //Initial fields to group data by. Array of field names, not displayName. groups: [], @@ -1402,10 +1401,7 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, i18n: 'en', //the threshold in rows to force virtualization on - virtualizationThreshold: 50, - - // Don't handle tabs, so they can be used to navigate between controls. - noTabInterference: false + virtualizationThreshold: 50 }, self = this; self.maxCanvasHt = 0; @@ -1590,8 +1586,7 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, enableResize: self.config.enableColumnResize, enableSort: self.config.enableSorting, enablePinning: self.config.enablePinning, - enableCellEdit: self.config.enableCellEdit || self.config.enableCellEditOnFocus, - cellEditableCondition: self.config.cellEditableCondition + enableCellEdit: self.config.enableCellEdit || self.config.enableCellEditOnFocus }, $scope, self, domUtilityService, $templateCache, $utils); var indx = self.config.groups.indexOf(colDef.field); if (indx !== -1) { @@ -1689,7 +1684,8 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, angular.forEach(percentArray, function(colDef) { // Get the ngColumn that matches the current column from columnDefs var ngColumn = $scope.columns[indexMap[colDef.index]]; - var percent = parseFloat(colDef.width) / 100; + var t = colDef.width; + var percent = parseInt(t.slice(0, -1), 10) / 100; percentWidth += percent; if (!ngColumn.visible) { @@ -1704,7 +1700,8 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, var ngColumn = $scope.columns[indexMap[colDef.index]]; // Calc the % relative to the amount of % reserved for the visible columns (that use % based widths) - var percent = parseFloat(colDef.width) / 100; + var t = colDef.width; + var percent = parseInt(t.slice(0, -1), 10) / 100; if (hiddenPercent > 0) { percent = percent / percentWidthUsed; } @@ -1713,7 +1710,7 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, } var pixelsForPercentBasedWidth = self.rootDim.outerWidth * percentWidth; - ngColumn.width = pixelsForPercentBasedWidth * percent; + ngColumn.width = Math.floor(pixelsForPercentBasedWidth * percent); totalWidth += ngColumn.width; }); } @@ -1848,6 +1845,7 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, self.lastSortedColumns.push(c); }; if (isArr) { + self.clearSortingData(); angular.forEach(col, function (c, i) { c.sortPriority = i + 1; push(c); @@ -1857,11 +1855,10 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, col.sortPriority = undefined; push(col); } - - self.sortActual(); - self.searchProvider.evalFilter(); - $scope.$emit('ngGridEventSorted', self.config.sortInfo); } + self.sortActual(); + self.searchProvider.evalFilter(); + $scope.$emit('ngGridEventSorted', self.config.sortInfo); }; self.sortColumnsInit = function() { if (self.config.sortInfo.columns) { @@ -1869,21 +1866,16 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, } else { self.config.sortInfo.columns = []; } - - var cols = []; angular.forEach($scope.columns, function(c) { var i = self.config.sortInfo.fields.indexOf(c.field); if (i !== -1) { c.sortDirection = self.config.sortInfo.directions[i] || 'asc'; - cols[i] = c; + self.config.sortInfo.columns[i] = c; } }); - - if(cols.length === 1){ - self.sortData(cols[0]); - }else{ - self.sortData(cols); - } + angular.forEach(self.config.sortInfo.columns, function(c){ + self.sortData(c); + }); }; self.sortActual = function() { if (!self.config.useExternalSorting) { @@ -1955,7 +1947,6 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, $scope.showFooter = self.config.showFooter; $scope.footerRowHeight = $scope.showFooter ? self.config.footerRowHeight : 0; $scope.showColumnMenu = self.config.showColumnMenu; - $scope.forceSyncScrolling = self.config.forceSyncScrolling; $scope.showMenu = false; $scope.configGroups = []; $scope.gridId = self.gridId; @@ -2030,7 +2021,7 @@ var ngGrid = function ($scope, options, sortService, domUtilityService, $filter, } newRange = new ngRange(Math.max(0, rowIndex - EXCESS_ROWS), rowIndex + self.minRowsToRender() + EXCESS_ROWS); } else { - var maxLen = $scope.configGroups.length > 0 ? self.rowFactory.parsedData.length : self.filteredRows.length; + var maxLen = $scope.configGroups.length > 0 ? self.rowFactory.parsedData.length : self.data.length; newRange = new ngRange(0, Math.max(maxLen, self.minRowsToRender() + EXCESS_ROWS)); } self.prevScrollTop = scrollTop; @@ -2154,7 +2145,7 @@ var ngRow = function (entity, config, selectionProvider, rowIndex, $utils) { this.rowIndex = rowIndex; this.utils = $utils; this.selected = selectionProvider.getSelection(entity); - this.cursor = this.config.enableRowSelection && !this.config.selectWithCheckboxOnly ? 'pointer' : 'default'; + this.cursor = this.config.enableRowSelection ? 'pointer' : 'default'; this.beforeSelectionChange = config.beforeSelectionChangeCallback; this.afterSelectionChange = config.afterSelectionChangeCallback; this.offsetTop = this.rowIndex * config.rowHeight; @@ -2493,10 +2484,7 @@ var ngSearchProvider = function ($scope, grid, $filter) { } var pVal = item[prop]; if(typeof pVal === 'object'){ - result = searchEntireRow(condition, pVal, c); - if (result) { - return true; - } + return searchEntireRow(condition, pVal, c); } else { var f = null, s = null; @@ -2770,36 +2758,32 @@ var ngSelectionProvider = function (grid, $scope, $parse) { }; self.getSelection = function (entity) { - return self.getSelectionIndex(entity) !== -1; - }; - - self.getSelectionIndex = function (entity) { - var index = -1; + var isSelected = false; if (grid.config.primaryKey) { var val = self.pKeyParser(entity); - angular.forEach(self.selectedItems, function (c, k) { + angular.forEach(self.selectedItems, function (c) { if (val === self.pKeyParser(c)) { - index = k; + isSelected = true; } }); } else { - index = self.selectedItems.indexOf(entity); + isSelected = self.selectedItems.indexOf(entity) !== -1; } - return index; + return isSelected; }; // just call this func and hand it the rowItem you want to select (or de-select) self.setSelection = function (rowItem, isSelected) { if(grid.config.enableRowSelection){ if (!isSelected) { - var indx = self.getSelectionIndex(rowItem.entity); + var indx = self.selectedItems.indexOf(rowItem.entity); if (indx !== -1) { self.selectedItems.splice(indx, 1); } } else { - if (self.getSelectionIndex(rowItem.entity) === -1) { + if (self.selectedItems.indexOf(rowItem.entity) === -1) { if (!self.multi && self.selectedItems.length > 0) { self.toggleSelectAll(false, true); } @@ -2841,7 +2825,6 @@ var ngSelectionProvider = function (grid, $scope, $parse) { } }; }; - var ngStyleProvider = function($scope, grid) { $scope.headerCellStyle = function(col) { return { "height": col.headerRowHeight + "px" }; @@ -2970,7 +2953,6 @@ ngGridDirectives.directive('ngCell', ['$compile', '$domUtilityService', function if ($scope.col.enableCellEdit) { html = $scope.col.cellEditTemplate; - html = html.replace(CELL_EDITABLE_CONDITION, $scope.col.cellEditableCondition); html = html.replace(DISPLAY_CELL_TEMPLATE, cellTemplate); html = html.replace(EDITABLE_CELL_TEMPLATE, $scope.col.editableCellTemplate.replace(COL_FIELD, 'row.entity.' + $scope.col.field)); } else { @@ -3146,7 +3128,6 @@ ngGridDirectives.directive('ngGrid', ['$compile', '$filter', '$templateCache', ' $scope.$parent.$watch(options.data, dataWatcher); $scope.$parent.$watch(options.data + '.length', function() { dataWatcher($scope.$eval(options.data)); - $scope.adjustScrollTop(grid.$viewport.scrollTop(), true); }); } @@ -3284,7 +3265,7 @@ ngGridDirectives.directive('ngInput', [function() { } break; case 13: // Enter (Leave Field) - if(scope.enableCellEditOnFocus && scope.totalFilteredItemsLength() - 1 > scope.row.rowIndex && scope.row.rowIndex > 0 || scope.col.enableCellEdit) { + if(scope.enableCellEditOnFocus && scope.totalFilteredItemsLength() - 1 > scope.row.rowIndex && scope.row.rowIndex > 0 || scope.enableCellEdit) { elm.blur(); } break; @@ -3312,7 +3293,6 @@ ngGridDirectives.directive('ngInput', [function() { } }; }]); - ngGridDirectives.directive('ngRow', ['$compile', '$domUtilityService', '$templateCache', function ($compile, domUtilityService, $templateCache) { var ngRow = { scope: false, @@ -3348,12 +3328,6 @@ ngGridDirectives.directive('ngViewport', [function() { var isMouseWheelActive; var prevScollLeft; var prevScollTop = 0; - var ensureDigest = function() { - if (!$scope.$root.$$phase) { - $scope.$digest(); - } - }; - var scrollTimer; elm.bind('scroll', function(evt) { var scrollLeft = evt.target.scrollLeft, scrollTop = evt.target.scrollTop; @@ -3362,11 +3336,8 @@ ngGridDirectives.directive('ngViewport', [function() { } $scope.adjustScrollLeft(scrollLeft); $scope.adjustScrollTop(scrollTop); - if ($scope.forceSyncScrolling) { - ensureDigest(); - } else { - clearTimeout(scrollTimer); - scrollTimer = setTimeout(ensureDigest, 150); + if (!$scope.$root.$$phase) { + $scope.$digest(); } prevScollLeft = scrollLeft; prevScollTop = scrollTop; @@ -3398,18 +3369,18 @@ window.ngGrid.i18n['da'] = { ngPagerLastTitle: 'Sidste side' }; window.ngGrid.i18n['de'] = { - ngAggregateLabel: 'eintrag', - ngGroupPanelDescription: 'Ziehen Sie eine Spaltenüberschrift hierhin um nach dieser Spalte zu gruppieren.', + ngAggregateLabel: 'artikel', + ngGroupPanelDescription: 'Ziehen Sie eine Spaltenüberschrift hier und legen Sie es der Gruppe nach dieser Spalte.', ngSearchPlaceHolder: 'Suche...', ngMenuText: 'Spalten auswählen:', - ngShowingItemsLabel: 'Zeige Einträge:', - ngTotalItemsLabel: 'Einträge gesamt:', - ngSelectedItemsLabel: 'Ausgewählte Einträge:', - ngPageSizeLabel: 'Einträge pro Seite:', - ngPagerFirstTitle: 'Erste Seite', - ngPagerNextTitle: 'Nächste Seite', - ngPagerPrevTitle: 'Vorherige Seite', - ngPagerLastTitle: 'Letzte Seite' + ngShowingItemsLabel: 'Zeige Artikel:', + ngTotalItemsLabel: 'Meiste Artikel:', + ngSelectedItemsLabel: 'Ausgewählte Artikel:', + ngPageSizeLabel: 'Größe Seite:', + ngPagerFirstTitle: 'Erste Page', + ngPagerNextTitle: 'Nächste Page', + ngPagerPrevTitle: 'Vorherige Page', + ngPagerLastTitle: 'Letzte Page' }; window.ngGrid.i18n['en'] = { ngAggregateLabel: 'items', @@ -3439,21 +3410,6 @@ window.ngGrid.i18n['es'] = { ngPagerPrevTitle: 'Página Anterior', ngPagerLastTitle: 'Última Página' }; -window.ngGrid.i18n['fa'] = { - ngAggregateLabel: 'موردها', - ngGroupPanelDescription: 'یک عنوان ستون اینجا را بردار و به گروهی از آن ستون بیانداز.', - ngSearchPlaceHolder: 'جستجو...', - ngMenuText: 'انتخاب ستون\u200cها:', - ngShowingItemsLabel: 'نمایش موردها:', - ngTotalItemsLabel: 'همهٔ موردها:', - ngSelectedItemsLabel: 'موردهای انتخاب\u200cشده:', - ngPageSizeLabel: 'اندازهٔ صفحه:', - ngPagerFirstTitle: 'صفحهٔ اول', - ngPagerNextTitle: 'صفحهٔ بعد', - ngPagerPrevTitle: 'صفحهٔ قبل', - ngPagerLastTitle: 'آخرین صفحه' -}; - window.ngGrid.i18n['fr'] = { ngAggregateLabel: 'articles', ngGroupPanelDescription: 'Faites glisser un en-tête de colonne ici et déposez-le vers un groupe par cette colonne.', @@ -3469,12 +3425,12 @@ window.ngGrid.i18n['fr'] = { ngPagerLastTitle: 'Dernière page' }; window.ngGrid.i18n['pt-br'] = { - ngAggregateLabel: 'itens', + ngAggregateLabel: 'items', ngGroupPanelDescription: 'Arraste e solte uma coluna aqui para agrupar por essa coluna', ngSearchPlaceHolder: 'Procurar...', ngMenuText: 'Selecione as colunas:', - ngShowingItemsLabel: 'Mostrando os Itens:', - ngTotalItemsLabel: 'Total de Itens:', + ngShowingItemsLabel: 'Mostrando os Items:', + ngTotalItemsLabel: 'Total de Items:', ngSelectedItemsLabel: 'Items Selecionados:', ngPageSizeLabel: 'Tamanho da Página:', ngPagerFirstTitle: 'Primeira Página', @@ -3482,7 +3438,6 @@ window.ngGrid.i18n['pt-br'] = { ngPagerPrevTitle: 'Página Anterior', ngPagerLastTitle: 'Última Página' }; - window.ngGrid.i18n['zh-cn'] = { ngAggregateLabel: '条目', ngGroupPanelDescription: '拖曳表头到此处以进行分组', @@ -3513,244 +3468,143 @@ window.ngGrid.i18n['zh-tw'] = { ngPagerLastTitle: '最後頁' }; -angular.module('ngGrid').run(['$templateCache', function($templateCache) { - 'use strict'; - - $templateCache.put('src/templates/aggregateTemplate.html', - "