|
235 | 235 | * <br/>Defaults to false
|
236 | 236 | */
|
237 | 237 | gridOptions.exporterOlderExcelCompatibility = gridOptions.exporterOlderExcelCompatibility === true;
|
| 238 | + /** |
| 239 | + * @ngdoc object |
| 240 | + * @name exporterMenuItemOrder |
| 241 | + * @propertyOf ui.grid.exporter.api:GridOptions |
| 242 | + * @description An option to determine the starting point for the menu items created by the exporter |
| 243 | + * <br/>Defaults to 200 |
| 244 | + */ |
| 245 | + gridOptions.exporterMenuItemOrder = gridOptions.exporterMenuItemOrder ? gridOptions.exporterMenuItemOrder : 200; |
238 | 246 | /**
|
239 | 247 | * @ngdoc object
|
240 | 248 | * @name exporterPdfDefaultStyle
|
|
547 | 555 | shown: function() {
|
548 | 556 | return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuAllData;
|
549 | 557 | },
|
550 |
| - order: 200 |
| 558 | + order: grid.options.exporterMenuItemOrder |
551 | 559 | },
|
552 | 560 | {
|
553 | 561 | title: i18nService.getSafeText('gridMenu.exporterVisibleAsCsv'),
|
|
557 | 565 | shown: function() {
|
558 | 566 | return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuVisibleData;
|
559 | 567 | },
|
560 |
| - order: 201 |
| 568 | + order: grid.options.exporterMenuItemOrder + 1 |
561 | 569 | },
|
562 | 570 | {
|
563 | 571 | title: i18nService.getSafeText('gridMenu.exporterSelectedAsCsv'),
|
|
568 | 576 | return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuSelectedData &&
|
569 | 577 | ( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
|
570 | 578 | },
|
571 |
| - order: 202 |
| 579 | + order: grid.options.exporterMenuItemOrder + 2 |
572 | 580 | },
|
573 | 581 | {
|
574 | 582 | title: i18nService.getSafeText('gridMenu.exporterAllAsPdf'),
|
|
578 | 586 | shown: function() {
|
579 | 587 | return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuAllData;
|
580 | 588 | },
|
581 |
| - order: 203 |
| 589 | + order: grid.options.exporterMenuItemOrder + 3 |
582 | 590 | },
|
583 | 591 | {
|
584 | 592 | title: i18nService.getSafeText('gridMenu.exporterVisibleAsPdf'),
|
|
588 | 596 | shown: function() {
|
589 | 597 | return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuVisibleData;
|
590 | 598 | },
|
591 |
| - order: 204 |
| 599 | + order: grid.options.exporterMenuItemOrder + 4 |
592 | 600 | },
|
593 | 601 | {
|
594 | 602 | title: i18nService.getSafeText('gridMenu.exporterSelectedAsPdf'),
|
|
599 | 607 | return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuSelectedData &&
|
600 | 608 | ( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
|
601 | 609 | },
|
602 |
| - order: 205 |
| 610 | + order: grid.options.exporterMenuItemOrder + 5 |
603 | 611 | }
|
604 | 612 | ]);
|
605 | 613 | },
|
|
0 commit comments