Skip to content

Commit

Permalink
Updates to release v3.1.3 fixes #565
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Sep 6, 2016
1 parent 90ed322 commit 7cca20a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Change Log: `yii2-grid`
5. (enh #562): Enhance `EditableColumnAction` to support model scenario as a parameter.
6. (enh #564): Enhance page summary to render within table body and add new property`GridView::pageSummaryContainer`.
7. Enhance PHP Documentation for all classes and methods in the extension.
8. (enh #565): Better exported content parsing for header, footer, and page summary.

## Version 3.1.2

Expand Down
2 changes: 1 addition & 1 deletion EditableColumnAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class EditableColumnAction extends Action
/**
* @var string allows overriding the form name which is used to access posted data
*/
public $formName = '';
public $formName;

/**
* @inheritdoc
Expand Down
14 changes: 9 additions & 5 deletions assets/js/kv-grid-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
var self = this, gridOpts = options.gridOpts, genOpts = options.genOpts;
self.$element = $(element);
//noinspection JSUnresolvedVariable
self.gridId = gridOpts.gridId;
self.$grid = $("#" + gridOpts.gridId);
self.dialogLib = options.dialogLib;
self.messages = gridOpts.messages;
Expand Down Expand Up @@ -223,7 +224,10 @@
},
clean: function (expType) {
var self = this, $table = self.$table.clone(),
$tHead = self.$table.closest('.kv-grid-container').find('.kv-thead-float thead');
$tHead = self.$table.closest('.kv-grid-container').find('.kv-thead-float thead'),
safeRemove = function(selector) {
$table.find(selector + '.' + self.gridId).remove();
};
if ($tHead.length) {
$tHead = $tHead.clone();
$table.find('thead').before($tHead).remove();
Expand All @@ -237,16 +241,16 @@
});
$table.find('input').remove(); // remove any form inputs
if (!self.showHeader) {
$table.find('thead').remove();
$table.children('thead').remove();
}
if (!self.showPageSummary) {
$table.find('tfoot.kv-page-summary').remove();
safeRemove('.kv-page-summary-container');
}
if (!self.showFooter) {
$table.find('tfoot.kv-table-footer').remove();
safeRemove('.kv-footer-container');
}
if (!self.showCaption) {
$table.find('kv-table-caption').remove();
safeRemove('.kv-caption-container');
}
$table.find('.skip-export').remove();
$table.find('.skip-export-' + expType).remove();
Expand Down
2 changes: 1 addition & 1 deletion assets/js/kv-grid-export.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7cca20a

Please sign in to comment.