Skip to content

Commit

Permalink
show noty only for POST
Browse files Browse the repository at this point in the history
  • Loading branch information
loveorigami committed Sep 19, 2017
1 parent 26196a6 commit e4fca25
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# CHANGELOG

* 6.5 [19 September 2017]
- `fix` Show noty only after POST ajax calls

* 6.4 [03 May 2017]
- `enh` Disable global events

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.4",
"version": "6.5",
"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) {
if (settings.showNoty && settings.type=='POST') {
$.ajax({
url: '$this->url',
method: 'POST',
Expand Down

0 comments on commit e4fca25

Please sign in to comment.