diff --git a/bower.json b/bower.json index 41e3ac2..da18e13 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "mdDataTable", - "version": "1.4.1", + "version": "1.4.2", "homepage": "https://github.com/iamisti/mdDataTable", "author":"Istvan Fodor ", "main": [ diff --git a/dist/md-data-table.js b/dist/md-data-table.js index 67bd4b7..474865f 100644 --- a/dist/md-data-table.js +++ b/dist/md-data-table.js @@ -46,6 +46,40 @@ (function(){ 'use strict'; + InlineEditModalCtrl.$inject = ['$scope', 'position', 'cellData', '$timeout', '$mdDialog']; + function InlineEditModalCtrl($scope, position, cellData, $timeout, $mdDialog){ + + $timeout(function() { + var el = $('md-dialog'); + el.css('position', 'fixed'); + el.css('top', position['top']); + el.css('left', position['left']); + + el.find('input[type="text"]').focus(); + }); + + $scope.cellData = cellData; + $scope.saveRow = saveRow; + $scope.cancel = cancel; + + function saveRow(){ + if($scope.editFieldForm.$valid){ + $mdDialog.hide(cellData.value); + } + } + + function cancel(){ + $mdDialog.cancel(); + } + } + + angular + .module('mdDataTable') + .controller('InlineEditModalCtrl', InlineEditModalCtrl); +}()); +(function(){ + 'use strict'; + function mdtAlternateHeadersDirective(){ return { restrict: 'E', @@ -772,40 +806,6 @@ .value('ColumnOptionProvider', ColumnOptionProvider); })(); -(function(){ - 'use strict'; - - InlineEditModalCtrl.$inject = ['$scope', 'position', 'cellData', '$timeout', '$mdDialog']; - function InlineEditModalCtrl($scope, position, cellData, $timeout, $mdDialog){ - - $timeout(function() { - var el = $('md-dialog'); - el.css('position', 'fixed'); - el.css('top', position['top']); - el.css('left', position['left']); - - el.find('input[type="text"]').focus(); - }); - - $scope.cellData = cellData; - $scope.saveRow = saveRow; - $scope.cancel = cancel; - - function saveRow(){ - if($scope.editFieldForm.$valid){ - $mdDialog.hide(cellData.value); - } - } - - function cancel(){ - $mdDialog.cancel(); - } - } - - angular - .module('mdDataTable') - .controller('InlineEditModalCtrl', InlineEditModalCtrl); -}()); (function(){ 'use strict'; diff --git a/package.json b/package.json index 39a3832..665436c 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "md-data-table", - "version": "1.4.1", + "version": "1.4.2", "author": "Istvan Fodor ", "registry": "github", "repository": { "type": "git", - "url": "git://github.com/angular/iamisti/mdDataTable" + "url": "git://github.com/iamisti/mdDataTable" }, "license": "MIT", "devDependencies": {