Permalink
Browse files

Making fixes for #341 #298 #397

Still need to look into the colDef.width merge more.
  • Loading branch information...
jonricaurte committed Jun 29, 2013
1 parent fe10ac7 commit 119a3ce0116b101ab88e561695f6af9e37e96586
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -19,6 +19,9 @@
overflow: auto;
min-height: 20px;
}
+.ngViewport:focus {
+ outline: none;
+}
.ngCanvas {
position: relative;
}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -27,6 +27,10 @@
min-height: 20px;
}
+.ngViewport:focus {
+ outline: none;
+}
+
.ngCanvas {
position: relative;
}
View
@@ -8,7 +8,7 @@ var ngMoveSelectionHandler = function($scope, elm, evt, grid) {
newColumnIndex,
lastInRow = false,
firstInRow = false,
- rowIndex = $scope.selectionProvider.lastClickedRow.rowIndex,
+ rowIndex = $scope.selectionProvider.lastClickedRow == undefined ? 1 : $scope.selectionProvider.lastClickedRow.rowIndex,
visibleCols = $scope.columns.filter(function(c) { return c.visible; }),
pinnedCols = $scope.columns.filter(function(c) { return c.pinned; });
@@ -17,7 +17,7 @@
<div style="float:left; margin-right: 10px; line-height:25px;" class="ngPagerControl" style="float: left; min-width: 135px;">
<button class="ngPagerButton" ng-click="pageToFirst()" ng-disabled="cantPageBackward()" title="{{i18n.ngPagerFirstTitle}}"><div class="ngPagerFirstTriangle"><div class="ngPagerFirstBar"></div></div></button>
<button class="ngPagerButton" ng-click="pageBackward()" ng-disabled="cantPageBackward()" title="{{i18n.ngPagerPrevTitle}}"><div class="ngPagerFirstTriangle ngPagerPrevTriangle"></div></button>
- <input class="ngPagerCurrent" type="number" style="width:50px; height: 24px; margin-top: 1px; padding: 0 4px;" ng-model="pagingOptions.currentPage"/>
+ <input class="ngPagerCurrent" min="1" max="{{maxPages()}}" type="number" style="width:50px; height: 24px; margin-top: 1px; padding: 0 4px;" ng-model="pagingOptions.currentPage"/>
<button class="ngPagerButton" ng-click="pageForward()" ng-disabled="cantPageForward()" title="{{i18n.ngPagerNextTitle}}"><div class="ngPagerLastTriangle ngPagerNextTriangle"></div></button>
<button class="ngPagerButton" ng-click="pageToLast()" ng-disabled="cantPageToLast()" title="{{i18n.ngPagerLastTitle}}"><div class="ngPagerLastTriangle"><div class="ngPagerLastBar"></div></div></button>
</div>
View
@@ -18,10 +18,10 @@ function userController($scope) {
filterText: "",
useExternalFilter: false,
};
+ $scope.totalServerItems = 0;
$scope.pagingOptions = {
pageSizes: [250, 500, 1000], //page Sizes
pageSize: 250, //Size of Paging data
- totalServerItems: 0, //how many items are on the server (for paging)
currentPage: 1 //what page they are currently on
};
self.getPagedDataAsync = function (pageSize, page, searchText) {
@@ -37,7 +37,7 @@ function userController($scope) {
}
var pagedData = data.slice((page - 1) * pageSize, page * pageSize);
$scope.myData = pagedData;
- $scope.pagingOptions.totalServerItems = data.length;
+ $scope.totalServerItems = data.length;
if (!$scope.$$phase) {
$scope.$apply();
}
@@ -61,6 +61,8 @@ function userController($scope) {
showColumnMenu: true,
plugins: [plugins.ngGridLayoutPlugin],
enablePaging: true,
+ showFooter: true,
+ totalServerItems: 'totalServerItems',
filterOptions: $scope.filterOptions,
pagingOptions: $scope.pagingOptions,
columnDefs: [{ field: 'name', displayName: 'Very Long Name Title', sortable: false},
View
@@ -37,7 +37,7 @@ function userController($scope, $timeout) {
$scope.changeDefs = function(){
$scope.myDefs = [{ field: 'Sku', displayName: 'My Sku', width: '40%' },
- { field: 'Vendor', displayName: 'Supplier', editableCellTemplate: '<input type="number" style="width:100px; height:30px;" ng-model="COL_FIELD" ng-input="COL_FIELD" />' },
+ { field: 'Vendor', displayName: 'Supplier', editableCellTemplate: '<select><option>hello</option><option>test</option></select>' },
{ field: 'SeasonCode.test', displayName: 'My SeasonCode', cellTemplate: '<input style="width:100%;height:100%;" class="ui-widget input" type="text" ng-readonly="!row.selected" ng-model="COL_FIELD"/>' },
{ field: 'Mfg_Id', displayName: 'Manufacturer ID', width:'100px' },
{ field: 'UPC', displayName: 'Bar Code', width:200 }];

0 comments on commit 119a3ce

Please sign in to comment.