{"action":"closed","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/8582","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/8582/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/8582/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/8582/events","html_url":"https://github.com/yiisoft/yii2/issues/8582","id":81654574,"number":8582,"title":"data-confirm and data-method with pjax","user":{"login":"xskif","id":5403248,"avatar_url":"https://avatars.githubusercontent.com/u/5403248?v=3","gravatar_id":"","url":"https://api.github.com/users/xskif","html_url":"https://github.com/xskif","followers_url":"https://api.github.com/users/xskif/followers","following_url":"https://api.github.com/users/xskif/following{/other_user}","gists_url":"https://api.github.com/users/xskif/gists{/gist_id}","starred_url":"https://api.github.com/users/xskif/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xskif/subscriptions","organizations_url":"https://api.github.com/users/xskif/orgs","repos_url":"https://api.github.com/users/xskif/repos","events_url":"https://api.github.com/users/xskif/events{/privacy}","received_events_url":"https://api.github.com/users/xskif/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/feature:pjax","name":"feature:pjax","color":"c7def8"}],"state":"closed","locked":false,"assignee":{"login":"samdark","id":47294,"avatar_url":"https://avatars.githubusercontent.com/u/47294?v=3","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/yiisoft/yii2/milestones/14","html_url":"https://github.com/yiisoft/yii2/milestones/2.0.7","labels_url":"https://api.github.com/repos/yiisoft/yii2/milestones/14/labels","id":1107394,"number":14,"title":"2.0.7","description":"","creator":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"open_issues":103,"closed_issues":95,"state":"open","created_at":"2015-05-12T19:21:21Z","updated_at":"2015-10-19T08:32:58Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2015-05-27T22:35:14Z","updated_at":"2015-10-19T08:32:58Z","closed_at":"2015-10-19T08:32:58Z","body":"Is there any way to do this?\r\nIn rails `remote` option work together with `method` and `confirm` options, in yii they not.\r\nMaybe if we change `handleAction` behavior when `confirm` specified but `method`not:\r\n```js\r\n//--------------------------- handleAction --------------------------\r\n            if (method === undefined) {\r\n                if (action && action != '#') {\r\n                    // window.location = action; // <- delete this\r\n                    return false; // <- this one\r\n\r\n//--------------------------- initDataMethods -----------------------\r\n\r\n            if (message !== undefined) {\r\n                pub.confirm(message, function () {\r\n                    pub.handleAction($this);\r\n                });\r\n            } else {\r\n                pub.handleAction($this);\r\n            }\r\n\r\n            if (method !== undefined) {\r\n                event.stopImmediatePropagation();\r\n                return false;\r\n            }\r\n            return true;\r\n```\r\n\r\nAnd when `method` specified we can add data-pjax attribute like that:\r\n```js\r\nif (data.pjax !== undefined) {\r\n    $form.attr('data-pjax', data.pjax);\r\n}\r\n```"}}