Skip to content

Commit

Permalink
fix(build): Fixing gridMenu undefined error.
Browse files Browse the repository at this point in the history
Also, fixing ui-grid-importer implementation on tutorial 401.
  • Loading branch information
Portugal, Marcelo authored and mportuga committed Mar 16, 2017
1 parent 724df35 commit 2f5ac87
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
9 changes: 6 additions & 3 deletions misc/tutorial/401_AllFeatures.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ All features are enabled to get an idea of performance
fastWatch: true,
rowIdentity: getRowId,
getRowIdentity: getRowId,
importerDataAddCallback: function importerDataAddCallback( grid, newObjects ) {
$scope.myData = $scope.data.concat( newObjects );
},
columnDefs: [
{ name:'id', width:50 },
{ name:'name', width:100 },
{ name:'age', width:100, enableCellEdit: true, aggregationType:uiGridConstants.aggregationTypes.avg, treeAggregationType: uiGridGroupingConstants.aggregation.AVG },
{ name:'age', width:100, enableCellEdit: true, aggregationType: uiGridConstants.aggregationTypes.avg, treeAggregationType: uiGridGroupingConstants.aggregation.AVG },
{ name:'address.street', width:150, enableCellEdit: true },
{ name:'address.city', width:150, enableCellEdit: true },
{ name:'address.state', width:50, enableCellEdit: true },
Expand All @@ -45,8 +48,8 @@ All features are enabled to get an idea of performance
{ name:'friends[2].name', displayName:'3rd friend', width:150, enableCellEdit: true },
{ name:'agetemplate',field:'age', width:150, cellTemplate: '<div class="ui-grid-cell-contents"><span>Age 2:{{COL_FIELD}}</span></div>' },
{ name:'Is Active',field:'isActive', width:150, type:'boolean' },
{ name:'Join Date',field:'registered', cellFilter:'date', width:150, type:'date', enableFiltering:false },
{ name:'Month Joined',field:'registered', cellFilter: 'date:"MMMM"', filterCellFiltered:true, sortCellFiltered:true, width:150, type:'date' }
{ name:'Join Date',field:'registered', cellFilter:'date', width:150, type:'date', enableFiltering: false },
{ name:'Month Joined',field:'registered', cellFilter: 'date:"MMMM"', filterCellFiltered: true, sortCellFiltered: true, width:150, type:'date' }
],
onRegisterApi: function onRegisterApi(registeredApi) {
gridApi = registeredApi;
Expand Down
28 changes: 14 additions & 14 deletions src/features/exporter/js/exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,62 +559,62 @@
{
title: i18nService.getSafeText('gridMenu.exporterAllAsCsv'),
action: function ($event) {
this.grid.api.exporter.csvExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
grid.api.exporter.csvExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
},
shown: function() {
return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuAllData;
return grid.options.exporterMenuCsv && grid.options.exporterMenuAllData;
},
order: grid.options.exporterMenuItemOrder
},
{
title: i18nService.getSafeText('gridMenu.exporterVisibleAsCsv'),
action: function ($event) {
this.grid.api.exporter.csvExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
grid.api.exporter.csvExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
},
shown: function() {
return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuVisibleData;
return grid.options.exporterMenuCsv && grid.options.exporterMenuVisibleData;
},
order: grid.options.exporterMenuItemOrder + 1
},
{
title: i18nService.getSafeText('gridMenu.exporterSelectedAsCsv'),
action: function ($event) {
this.grid.api.exporter.csvExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
grid.api.exporter.csvExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
},
shown: function() {
return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuSelectedData &&
( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
return grid.options.exporterMenuCsv && grid.options.exporterMenuSelectedData &&
( grid.api.selection && grid.api.selection.getSelectedRows().length > 0 );
},
order: grid.options.exporterMenuItemOrder + 2
},
{
title: i18nService.getSafeText('gridMenu.exporterAllAsPdf'),
action: function ($event) {
this.grid.api.exporter.pdfExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
grid.api.exporter.pdfExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
},
shown: function() {
return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuAllData;
return grid.options.exporterMenuPdf && grid.options.exporterMenuAllData;
},
order: grid.options.exporterMenuItemOrder + 3
},
{
title: i18nService.getSafeText('gridMenu.exporterVisibleAsPdf'),
action: function ($event) {
this.grid.api.exporter.pdfExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
grid.api.exporter.pdfExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
},
shown: function() {
return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuVisibleData;
return grid.options.exporterMenuPdf && grid.options.exporterMenuVisibleData;
},
order: grid.options.exporterMenuItemOrder + 4
},
{
title: i18nService.getSafeText('gridMenu.exporterSelectedAsPdf'),
action: function ($event) {
this.grid.api.exporter.pdfExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
grid.api.exporter.pdfExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
},
shown: function() {
return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuSelectedData &&
( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
return grid.options.exporterMenuPdf && grid.options.exporterMenuSelectedData &&
( grid.api.selection && grid.api.selection.getSelectedRows().length > 0 );
},
order: grid.options.exporterMenuItemOrder + 5
}
Expand Down

1 comment on commit 2f5ac87

@tmarkley
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #5945

Please sign in to comment.