{"action":"created","issue":{"url":"https://api.github.com/repos/Dogfalo/materialize/issues/3503","repository_url":"https://api.github.com/repos/Dogfalo/materialize","labels_url":"https://api.github.com/repos/Dogfalo/materialize/issues/3503/labels{/name}","comments_url":"https://api.github.com/repos/Dogfalo/materialize/issues/3503/comments","events_url":"https://api.github.com/repos/Dogfalo/materialize/issues/3503/events","html_url":"https://github.com/Dogfalo/materialize/issues/3503","id":170865423,"number":3503,"title":"leanModal() - complete and ready callbacks are not executed","user":{"login":"Voyteck0","id":12429940,"avatar_url":"https://avatars.githubusercontent.com/u/12429940?v=3","gravatar_id":"","url":"https://api.github.com/users/Voyteck0","html_url":"https://github.com/Voyteck0","followers_url":"https://api.github.com/users/Voyteck0/followers","following_url":"https://api.github.com/users/Voyteck0/following{/other_user}","gists_url":"https://api.github.com/users/Voyteck0/gists{/gist_id}","starred_url":"https://api.github.com/users/Voyteck0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Voyteck0/subscriptions","organizations_url":"https://api.github.com/users/Voyteck0/orgs","repos_url":"https://api.github.com/users/Voyteck0/repos","events_url":"https://api.github.com/users/Voyteck0/events{/privacy}","received_events_url":"https://api.github.com/users/Voyteck0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"acburst","id":28045,"avatar_url":"https://avatars.githubusercontent.com/u/28045?v=3","gravatar_id":"","url":"https://api.github.com/users/acburst","html_url":"https://github.com/acburst","followers_url":"https://api.github.com/users/acburst/followers","following_url":"https://api.github.com/users/acburst/following{/other_user}","gists_url":"https://api.github.com/users/acburst/gists{/gist_id}","starred_url":"https://api.github.com/users/acburst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acburst/subscriptions","organizations_url":"https://api.github.com/users/acburst/orgs","repos_url":"https://api.github.com/users/acburst/repos","events_url":"https://api.github.com/users/acburst/events{/privacy}","received_events_url":"https://api.github.com/users/acburst/received_events","type":"User","site_admin":false},"assignees":[{"login":"acburst","id":28045,"avatar_url":"https://avatars.githubusercontent.com/u/28045?v=3","gravatar_id":"","url":"https://api.github.com/users/acburst","html_url":"https://github.com/acburst","followers_url":"https://api.github.com/users/acburst/followers","following_url":"https://api.github.com/users/acburst/following{/other_user}","gists_url":"https://api.github.com/users/acburst/gists{/gist_id}","starred_url":"https://api.github.com/users/acburst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acburst/subscriptions","organizations_url":"https://api.github.com/users/acburst/orgs","repos_url":"https://api.github.com/users/acburst/repos","events_url":"https://api.github.com/users/acburst/events{/privacy}","received_events_url":"https://api.github.com/users/acburst/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-08-12T12:57:15Z","updated_at":"2016-08-25T18:41:35Z","closed_at":null,"body":"Here is the code to initialize Modal (on element ID):\r\n```\r\n$('#modal_confirm').leanModal({\r\n\t    dismissible: false,\r\n\t    out_duration: 200,\r\n\t    complete: function() { console.log('closed'); },\r\n\t    ready: function() { console.log('open'); }\r\n\t});\r\n```\r\n\r\nThe modal itself:\r\n```\r\n<div id=\"modal_confirm\" class=\"modal\">\r\n\t<div class=\"modal-content\" id=\"modal_confirm_content\"></div>\r\n\t<div class=\"modal-footer\">\r\n\t\t<a id=\"modal_confirm_action_yes\" href=\"#\" class=\"modal-action modal-close waves-effect waves-green btn green\">Yes</a>\r\n\t\t<a href=\"#\" class=\"modal-action modal-close waves-effect waves-red btn red\">No</a>\r\n\t</div>\r\n</div>\r\n```\r\n\r\nThe modal is opened using openModal() function, since it also automatically fills down contents and assigns additional callback function to \"yes\" button - here is the function:\r\n```\r\nfunction showConfirmation(confirmText, positiveCallbackFunction) {\r\n\t$('#modal_confirm_content').html(confirmText);\r\n\t$('#modal_confirm').openModal();\r\n\t$('#modal_confirm_action_yes').on('click', function() {\r\n\t\tpositiveCallbackFunction();\r\n\t});\r\n}\r\n```\r\n\r\nGenerally as it is now the \"closed\" or \"open\" texts never appears on console.\r\nThe version of Materialize used is 0.97.7 pulled from cdnjs.\r\n"},"comment":{"url":"https://api.github.com/repos/Dogfalo/materialize/issues/comments/242496156","html_url":"https://github.com/Dogfalo/materialize/issues/3503#issuecomment-242496156","issue_url":"https://api.github.com/repos/Dogfalo/materialize/issues/3503","id":242496156,"user":{"login":"acburst","id":28045,"avatar_url":"https://avatars.githubusercontent.com/u/28045?v=3","gravatar_id":"","url":"https://api.github.com/users/acburst","html_url":"https://github.com/acburst","followers_url":"https://api.github.com/users/acburst/followers","following_url":"https://api.github.com/users/acburst/following{/other_user}","gists_url":"https://api.github.com/users/acburst/gists{/gist_id}","starred_url":"https://api.github.com/users/acburst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acburst/subscriptions","organizations_url":"https://api.github.com/users/acburst/orgs","repos_url":"https://api.github.com/users/acburst/repos","events_url":"https://api.github.com/users/acburst/events{/privacy}","received_events_url":"https://api.github.com/users/acburst/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T18:41:35Z","updated_at":"2016-08-25T18:41:35Z","body":"I've made a PR that rewrites a lot of modal. It's a pretty big change so I'm not merging yet until its fully tested. I would appreciate it a lot if you guys could check it out and let me know if it works well!\r\n\r\n#3511"}}
{"actor":{"display_login":"acburst"}}