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 = $("