Skip to content

Commit

Permalink
Update to release v1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Aug 5, 2016
1 parent 0036de5 commit c6cd40c
Show file tree
Hide file tree
Showing 37 changed files with 79 additions and 80 deletions.
Empty file modified .github/CONTRIBUTING.md
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- [ ] The issue still exists against the latest `master` branch of yii2-export.
- [ ] This is not an usage question. I confirm having gone through and read the [documentation](https://demos.krajee.com/export) and [demos](https://demos.krajee.com/export-demo).
- [ ] This is not a general programming / coding question. (Those should be directed to the [webtips Q & A forum](http://webtips.krajee.com/questions)).
- [ ] This is not a source plugin (select2) issue. (Those should be directed to the [plugin issues repo](https://github.com/select2/select2/search?q=&type=Issues)).
- [ ] I have attempted to find the simplest possible steps to reproduce the issue.
- [ ] I have included a failing test as a pull request (Optional).

Expand Down
Empty file modified .github/PULL_REQUEST_TEMPLATE.md
100644 → 100755
Empty file.
18 changes: 7 additions & 11 deletions CHANGE.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
Change Log: `yii2-export`
=========================

## version 1.2.7
## version 1.2.6

**Date:** 03-Aug-2016
**Date:** 05-Aug-2016

- (enh #135): Add Indonesian translations.
- (enh #137): Add Estonian translations.
- (enh #138): Add dynagrid selection support.
- (enh #141): Add grouping option in export column.
- (enh #149): Add Turkish translations.
- (enh #150): Created beforeContent and afterContent settings.
- (bug #151): Correct "undefined offset" when `batchSize` is set.
- (bug #155): Fix '0' value being wrongly parsed in empty check.
- (enh #156): Add Lithuanian translations.
- (enh #159): Fix export to exel columns with comma in headers.
- Add contribution templates.

## version 1.2.6

**Date:** 02-Jun-2016

- (enh #135): Add Indonesian translations.
- (enh #137): Add Estonian translations.
- (enh #138): Add dynagrid selection support.
- (enh #141): Add grouping option in export column.
- (enh #161): Implement Krajee Dialog to display confirmation alerts.

## version 1.2.5

Expand Down
2 changes: 1 addition & 1 deletion ExportColumnAsset.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2015 - 2016
* @package yii2-export
* @version 1.2.7
* @version 1.2.6
*/

namespace kartik\export;
Expand Down
12 changes: 11 additions & 1 deletion ExportMenu.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*/

namespace kartik\export;
Expand Down Expand Up @@ -38,6 +38,7 @@
use yii\helpers\Url;
use yii\web\JsExpression;
use yii\web\View;
use kartik\dialog\Dialog;

/**
* Export menu widget. Export tabular data to various formats using the PHPExcel library by reading data from a
Expand Down Expand Up @@ -81,6 +82,13 @@ class ExportMenu extends GridView
*/
public $target = self::TARGET_POPUP;

/**
* @var array configuration settings for the Krajee dialog widget that will be used to render alerts and
* confirmation dialog prompts
* @see http://demos.krajee.com/dialog
*/
public $krajeeDialogSettings = [];

/**
* @var bool whether to show a confirmation alert dialog before download. This confirmation dialog will notify user
* about the type of exported file for download and to disable popup blockers. Defaults to `true`.
Expand Down Expand Up @@ -1005,6 +1013,7 @@ protected function setDefaultExportConfig()
protected function registerAssets()
{
$view = $this->getView();
Dialog::widget($this->krajeeDialogSettings);
ExportMenuAsset::register($view);
$this->messages += [
'allowPopups' => Yii::t(
Expand All @@ -1022,6 +1031,7 @@ protected function registerAssets()
$options = Json::encode([
'formId' => $formId,
'messages' => $this->messages,
'dialogLib' => new JsExpression(ArrayHelper::getValue($this->krajeeDialogSettings, 'libName', 'krajeeDialog'))
]);
$menu = 'kvexpmenu_' . hash('crc32', $options);
$view->registerJs("var {$menu} = {$options};\n", View::POS_HEAD);
Expand Down
2 changes: 1 addition & 1 deletion ExportMenuAsset.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @package yii2-export
* @version 1.2.7
* @version 1.2.6
*/

namespace kartik\export;
Expand Down
Empty file modified LICENSE.md
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The extension offers configurable user interfaces for advanced cases using view
You can see detailed [documentation](http://demos.krajee.com/export) and [demonstration](http://demos.krajee.com/export-demo) on usage of the extension.

## Latest Release
>NOTE: The latest version of the extension is v1.2.7. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-export/blob/master/CHANGE.md) for details.
>NOTE: The latest version of the extension is v1.2.6. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-export/blob/master/CHANGE.md) for details.
## Installation

Expand Down
2 changes: 1 addition & 1 deletion assets/css/kv-export-columns.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Columns Selector Style Sheet
*
Expand Down
2 changes: 1 addition & 1 deletion assets/css/kv-export-columns.min.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Columns Selector Style Sheet
*
Expand Down
2 changes: 1 addition & 1 deletion assets/css/kv-export-data.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Menu Style Sheet
*
Expand Down
2 changes: 1 addition & 1 deletion assets/css/kv-export-data.min.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Menu Style Sheet
*
Expand Down
2 changes: 1 addition & 1 deletion assets/js/kv-export-columns.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Columns Selector Validation Module.
*
Expand Down
2 changes: 1 addition & 1 deletion assets/js/kv-export-columns.min.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Columns Selector Validation Module.
*
Expand Down
100 changes: 47 additions & 53 deletions assets/js/kv-export-data.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Data Validation Module.
*
Expand All @@ -29,18 +29,7 @@
'<body style="display:table-cell;font-family:Helvetica,Arial,sans-serif;color:#888;font-weight:bold;line-height:1.4em;text-align:center;vertical-align:middle;width:100%;height:100%;padding:0 10px;">' +
'{msg}' +
'</body>' +
'</html>',
kvConfirm = function (msg) {
if (isEmpty(msg)) {
return true;
}
try {
return window.confirm(msg);
}
catch (err) {
return true;
}
};
'</html>';

var ExportData = function (element, options) {
var self = this;
Expand All @@ -57,34 +46,6 @@

ExportData.prototype = {
constructor: ExportData,
notify: function (e) {
var self = this, msgs, msg = '', msg1, msg2, msg3;
if (!self.showConfirmAlert) {
e.preventDefault();
return true;
}
msgs = self.messages;
msg1 = isEmpty(self.alertMsg) ? '' : self.alertMsg;
msg2 = isEmpty(msgs.allowPopups) ? '' : msgs.allowPopups;
msg3 = isEmpty(msgs.confirmDownload) ? '' : msgs.confirmDownload;
if (msg1.length && msg2.length) {
msg = msg1 + '\n\n' + msg2;
} else {
if (!msg1.length && msg2.length) {
msg = msg2;
} else {
msg = (msg1.length && !msg2.length) ? msg1 : '';
}
}
if (msg3.length) {
msg = msg + '\n\n' + msg3;
}
e.preventDefault();
if (isEmpty(msg)) {
return true;
}
return kvConfirm(msg);
},
setPopupAlert: function (msg) {
var self = this;
if (!self.popup.document) {
Expand All @@ -103,10 +64,49 @@
listen: function () {
var self = this;
self.$form.attr('action', window.location.href).appendTo('body');
self.$element.off('click').on('click', function (e) {
var $selected, cols = [];
if (self.notify(e)) {
var fmt = $(this).data('format');
self.listenClick();
if (self.target === '_popup') {
self.$form.off('submit.exportmenu').on('submit.exportmenu', function () {
setTimeout(function () {
self.setPopupAlert(self.messages.downloadComplete, true);
}, 1000);
});
}
},
listenClick: function() {
var self = this;
self.$element.off('click.exportmenu').on('click.exportmenu', function (e) {
var fmt, msgs, msg = '', msg1, msg2, msg3, lib = window[self.dialogLib];
e.preventDefault();
e.stopPropagation();
if (!self.showConfirmAlert) {
return;
}
msgs = self.messages;
msg1 = isEmpty(self.alertMsg) ? '' : self.alertMsg;
msg2 = isEmpty(msgs.allowPopups) ? '' : msgs.allowPopups;
msg3 = isEmpty(msgs.confirmDownload) ? '' : msgs.confirmDownload;
if (msg1.length && msg2.length) {
msg = msg1 + '\n\n' + msg2;
} else {
if (!msg1.length && msg2.length) {
msg = msg2;
} else {
msg = (msg1.length && !msg2.length) ? msg1 : '';
}
}
if (msg3.length) {
msg = msg + '\n\n' + msg3;
}
if (isEmpty(msg)) {
return;
}
fmt = $(this).data('format');
lib.confirm(msg, function(result) {
var $selected, cols = [];
if (!result) {
return;
}
self.$form.find('[name="export_type"]').val(fmt);
if (self.target === '_popup') {
self.popup = popupDialog('', 'kvExportFullDialog', 350, 120);
Expand All @@ -124,15 +124,8 @@
self.$form.find('input[name="export_columns"]').val(JSON.stringify(cols));
}
self.$form.trigger('submit');
}
});
if (self.target === '_popup') {
self.$form.off('submit').on('submit', function () {
setTimeout(function () {
self.setPopupAlert(self.messages.downloadComplete, true);
}, 1000);
});
}
});
}
};

Expand Down Expand Up @@ -162,6 +155,7 @@
showConfirmAlert: true,
columnSelectorId: null,
alertMsg: '',
dialogLib: 'krajeeDialog',
settings: {
formId: '',
messages: {
Expand Down
4 changes: 2 additions & 2 deletions assets/js/kv-export-data.min.js
100644 → 100755

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

Empty file modified composer.json
100644 → 100755
Empty file.
Empty file modified messages/cs/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/de/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/en/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/es/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/et/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/hu/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/id/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/it/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/lt/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/nl/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/pl/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/pt-BR/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/pt-PT/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/ru/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/tr_TR/kvexport.php
100644 → 100755
Empty file.
Empty file modified messages/zh-CN/kvexport.php
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion views/_columns.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*/

use yii\helpers\Html;
Expand Down
2 changes: 1 addition & 1 deletion views/_form.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Submission Form
*
Expand Down
2 changes: 1 addition & 1 deletion views/_view.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package yii2-export
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2015 - 2016
* @version 1.2.7
* @version 1.2.6
*
* Export Submission View
*
Expand Down

0 comments on commit c6cd40c

Please sign in to comment.