Skip to content

Commit

Permalink
Show noty only after GET pjax calls
Browse files Browse the repository at this point in the history
  • Loading branch information
loveorigami committed Dec 15, 2017
1 parent 64c9f7e commit f387abf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# CHANGELOG
* 6.7 [15 December 2017]
- `fix` Show noty only after POST ajax AND GET pjax calls

* 6.6 [18 October 2017]
- `enh` Add german translation

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loveorigami/yii2-notification-wrapper",
"description": "This module for renders a message from session flash (with ajax, pjax support and etc.)",
"version": "6.6",
"version": "6.7",
"type": "yii2-extension",
"keywords": [
"yii2", "module", "notification", "flash",
Expand Down
2 changes: 1 addition & 1 deletion src/Wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protected function registerJs()
showNoty: true // default for all ajax calls
});
$(document).ajaxComplete(function (event, xhr, settings) {
if (settings.showNoty && settings.type=='POST') {
if (settings.showNoty && (settings.type=='POST' || settings.container)) {
$.ajax({
url: '$this->url',
method: 'POST',
Expand Down

0 comments on commit f387abf

Please sign in to comment.