{"action":"created","comment":{"url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/comments/23515868","id":23515868,"diff_hunk":"@@ -145,6 +147,72 @@ define(function() {\n         },\n \n         /**\n+         * Initializes the handler for unsaved changes\n+         */\n+        initializeUnsavedChangesHandler: function() {\n+            this.unsavedChanges = false;\n+            this.bindCustomEventsForUnsavedChangesHandler();\n+        },\n+\n+        /**\n+         * Listen for changes regarding the save button\n+         */\n+        bindCustomEventsForUnsavedChangesHandler: function() {\n+            this.sandbox.on('husky.toolbar.header.item.enable', function(button) {","path":"src/Sulu/Bundle/AdminBundle/Resources/public/js/components/app/main.js","position":33,"original_position":33,"commit_id":"028f24d0c0ec9b31d596fb28441ea89cd6fbb1d9","original_commit_id":"028f24d0c0ec9b31d596fb28441ea89cd6fbb1d9","user":{"login":"wachterjohannes","id":1464615,"avatar_url":"https://avatars.githubusercontent.com/u/1464615?v=3","gravatar_id":"","url":"https://api.github.com/users/wachterjohannes","html_url":"https://github.com/wachterjohannes","followers_url":"https://api.github.com/users/wachterjohannes/followers","following_url":"https://api.github.com/users/wachterjohannes/following{/other_user}","gists_url":"https://api.github.com/users/wachterjohannes/gists{/gist_id}","starred_url":"https://api.github.com/users/wachterjohannes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wachterjohannes/subscriptions","organizations_url":"https://api.github.com/users/wachterjohannes/orgs","repos_url":"https://api.github.com/users/wachterjohannes/repos","events_url":"https://api.github.com/users/wachterjohannes/events{/privacy}","received_events_url":"https://api.github.com/users/wachterjohannes/received_events","type":"User","site_admin":false},"body":"shouldn´t we introduce a content-changes event? i think thats a bit hacky?","created_at":"2015-01-26T08:03:15Z","updated_at":"2015-01-26T08:03:15Z","html_url":"https://github.com/sulu-cmf/sulu/pull/730#discussion_r23515868","pull_request_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/730","_links":{"self":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/comments/23515868"},"html":{"href":"https://github.com/sulu-cmf/sulu/pull/730#discussion_r23515868"},"pull_request":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/730"}}},"pull_request":{"url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/730","id":27609919,"html_url":"https://github.com/sulu-cmf/sulu/pull/730","diff_url":"https://github.com/sulu-cmf/sulu/pull/730.diff","patch_url":"https://github.com/sulu-cmf/sulu/pull/730.patch","issue_url":"https://api.github.com/repos/sulu-cmf/sulu/issues/730","number":730,"state":"open","locked":false,"title":"[FEATURE] added handler for unsaved changes","user":{"login":"michaelzangerle","id":1465587,"avatar_url":"https://avatars.githubusercontent.com/u/1465587?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelzangerle","html_url":"https://github.com/michaelzangerle","followers_url":"https://api.github.com/users/michaelzangerle/followers","following_url":"https://api.github.com/users/michaelzangerle/following{/other_user}","gists_url":"https://api.github.com/users/michaelzangerle/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelzangerle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelzangerle/subscriptions","organizations_url":"https://api.github.com/users/michaelzangerle/orgs","repos_url":"https://api.github.com/users/michaelzangerle/repos","events_url":"https://api.github.com/users/michaelzangerle/events{/privacy}","received_events_url":"https://api.github.com/users/michaelzangerle/received_events","type":"User","site_admin":false},"body":"__Tasks:__\r\n- [x] implement overlay for unsaved changes\r\n- [ ] got feedback\r\n\r\n__Informations:__\r\n\r\n| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| Tests pass?   | none\r\n| Fixed tickets | none\r\n| Doc           | none\r\n\r\n__Requires:__\r\n- https://github.com/massiveart/husky/pull/443\r\n","created_at":"2015-01-19T14:25:48Z","updated_at":"2015-01-26T08:03:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9031e4da348498238cc3e4576abae4dbb73d2720","assignee":{"login":"michaelzangerle","id":1465587,"avatar_url":"https://avatars.githubusercontent.com/u/1465587?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelzangerle","html_url":"https://github.com/michaelzangerle","followers_url":"https://api.github.com/users/michaelzangerle/followers","following_url":"https://api.github.com/users/michaelzangerle/following{/other_user}","gists_url":"https://api.github.com/users/michaelzangerle/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelzangerle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelzangerle/subscriptions","organizations_url":"https://api.github.com/users/michaelzangerle/orgs","repos_url":"https://api.github.com/users/michaelzangerle/repos","events_url":"https://api.github.com/users/michaelzangerle/events{/privacy}","received_events_url":"https://api.github.com/users/michaelzangerle/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/730/commits","review_comments_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/730/comments","review_comment_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sulu-cmf/sulu/issues/730/comments","statuses_url":"https://api.github.com/repos/sulu-cmf/sulu/statuses/028f24d0c0ec9b31d596fb28441ea89cd6fbb1d9","head":{"label":"sulu-cmf:feature/unsaved-changes-handling","ref":"feature/unsaved-changes-handling","sha":"028f24d0c0ec9b31d596fb28441ea89cd6fbb1d9","user":{"login":"sulu-cmf","id":5717006,"avatar_url":"https://avatars.githubusercontent.com/u/5717006?v=3","gravatar_id":"","url":"https://api.github.com/users/sulu-cmf","html_url":"https://github.com/sulu-cmf","followers_url":"https://api.github.com/users/sulu-cmf/followers","following_url":"https://api.github.com/users/sulu-cmf/following{/other_user}","gists_url":"https://api.github.com/users/sulu-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/sulu-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sulu-cmf/subscriptions","organizations_url":"https://api.github.com/users/sulu-cmf/orgs","repos_url":"https://api.github.com/users/sulu-cmf/repos","events_url":"https://api.github.com/users/sulu-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/sulu-cmf/received_events","type":"Organization","site_admin":false},"repo":{"id":13678015,"name":"sulu","full_name":"sulu-cmf/sulu","owner":{"login":"sulu-cmf","id":5717006,"avatar_url":"https://avatars.githubusercontent.com/u/5717006?v=3","gravatar_id":"","url":"https://api.github.com/users/sulu-cmf","html_url":"https://github.com/sulu-cmf","followers_url":"https://api.github.com/users/sulu-cmf/followers","following_url":"https://api.github.com/users/sulu-cmf/following{/other_user}","gists_url":"https://api.github.com/users/sulu-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/sulu-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sulu-cmf/subscriptions","organizations_url":"https://api.github.com/users/sulu-cmf/orgs","repos_url":"https://api.github.com/users/sulu-cmf/repos","events_url":"https://api.github.com/users/sulu-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/sulu-cmf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sulu-cmf/sulu","description":"Sulu 2.0 core bundle & components","fork":false,"url":"https://api.github.com/repos/sulu-cmf/sulu","forks_url":"https://api.github.com/repos/sulu-cmf/sulu/forks","keys_url":"https://api.github.com/repos/sulu-cmf/sulu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sulu-cmf/sulu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sulu-cmf/sulu/teams","hooks_url":"https://api.github.com/repos/sulu-cmf/sulu/hooks","issue_events_url":"https://api.github.com/repos/sulu-cmf/sulu/issues/events{/number}","events_url":"https://api.github.com/repos/sulu-cmf/sulu/events","assignees_url":"https://api.github.com/repos/sulu-cmf/sulu/assignees{/user}","branches_url":"https://api.github.com/repos/sulu-cmf/sulu/branches{/branch}","tags_url":"https://api.github.com/repos/sulu-cmf/sulu/tags","blobs_url":"https://api.github.com/repos/sulu-cmf/sulu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sulu-cmf/sulu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sulu-cmf/sulu/git/refs{/sha}","trees_url":"https://api.github.com/repos/sulu-cmf/sulu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sulu-cmf/sulu/statuses/{sha}","languages_url":"https://api.github.com/repos/sulu-cmf/sulu/languages","stargazers_url":"https://api.github.com/repos/sulu-cmf/sulu/stargazers","contributors_url":"https://api.github.com/repos/sulu-cmf/sulu/contributors","subscribers_url":"https://api.github.com/repos/sulu-cmf/sulu/subscribers","subscription_url":"https://api.github.com/repos/sulu-cmf/sulu/subscription","commits_url":"https://api.github.com/repos/sulu-cmf/sulu/commits{/sha}","git_commits_url":"https://api.github.com/repos/sulu-cmf/sulu/git/commits{/sha}","comments_url":"https://api.github.com/repos/sulu-cmf/sulu/comments{/number}","issue_comment_url":"https://api.github.com/repos/sulu-cmf/sulu/issues/comments/{number}","contents_url":"https://api.github.com/repos/sulu-cmf/sulu/contents/{+path}","compare_url":"https://api.github.com/repos/sulu-cmf/sulu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sulu-cmf/sulu/merges","archive_url":"https://api.github.com/repos/sulu-cmf/sulu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sulu-cmf/sulu/downloads","issues_url":"https://api.github.com/repos/sulu-cmf/sulu/issues{/number}","pulls_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls{/number}","milestones_url":"https://api.github.com/repos/sulu-cmf/sulu/milestones{/number}","notifications_url":"https://api.github.com/repos/sulu-cmf/sulu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sulu-cmf/sulu/labels{/name}","releases_url":"https://api.github.com/repos/sulu-cmf/sulu/releases{/id}","created_at":"2013-10-18T12:57:02Z","updated_at":"2015-01-23T21:58:16Z","pushed_at":"2015-01-26T07:28:08Z","git_url":"git://github.com/sulu-cmf/sulu.git","ssh_url":"git@github.com:sulu-cmf/sulu.git","clone_url":"https://github.com/sulu-cmf/sulu.git","svn_url":"https://github.com/sulu-cmf/sulu","homepage":"www.sulu.io","size":36035,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":239,"forks":6,"open_issues":239,"watchers":17,"default_branch":"develop"}},"base":{"label":"sulu-cmf:develop","ref":"develop","sha":"7b703bdca2a3c40515b233d6958f2590fb365ac4","user":{"login":"sulu-cmf","id":5717006,"avatar_url":"https://avatars.githubusercontent.com/u/5717006?v=3","gravatar_id":"","url":"https://api.github.com/users/sulu-cmf","html_url":"https://github.com/sulu-cmf","followers_url":"https://api.github.com/users/sulu-cmf/followers","following_url":"https://api.github.com/users/sulu-cmf/following{/other_user}","gists_url":"https://api.github.com/users/sulu-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/sulu-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sulu-cmf/subscriptions","organizations_url":"https://api.github.com/users/sulu-cmf/orgs","repos_url":"https://api.github.com/users/sulu-cmf/repos","events_url":"https://api.github.com/users/sulu-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/sulu-cmf/received_events","type":"Organization","site_admin":false},"repo":{"id":13678015,"name":"sulu","full_name":"sulu-cmf/sulu","owner":{"login":"sulu-cmf","id":5717006,"avatar_url":"https://avatars.githubusercontent.com/u/5717006?v=3","gravatar_id":"","url":"https://api.github.com/users/sulu-cmf","html_url":"https://github.com/sulu-cmf","followers_url":"https://api.github.com/users/sulu-cmf/followers","following_url":"https://api.github.com/users/sulu-cmf/following{/other_user}","gists_url":"https://api.github.com/users/sulu-cmf/gists{/gist_id}","starred_url":"https://api.github.com/users/sulu-cmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sulu-cmf/subscriptions","organizations_url":"https://api.github.com/users/sulu-cmf/orgs","repos_url":"https://api.github.com/users/sulu-cmf/repos","events_url":"https://api.github.com/users/sulu-cmf/events{/privacy}","received_events_url":"https://api.github.com/users/sulu-cmf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sulu-cmf/sulu","description":"Sulu 2.0 core bundle & components","fork":false,"url":"https://api.github.com/repos/sulu-cmf/sulu","forks_url":"https://api.github.com/repos/sulu-cmf/sulu/forks","keys_url":"https://api.github.com/repos/sulu-cmf/sulu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sulu-cmf/sulu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sulu-cmf/sulu/teams","hooks_url":"https://api.github.com/repos/sulu-cmf/sulu/hooks","issue_events_url":"https://api.github.com/repos/sulu-cmf/sulu/issues/events{/number}","events_url":"https://api.github.com/repos/sulu-cmf/sulu/events","assignees_url":"https://api.github.com/repos/sulu-cmf/sulu/assignees{/user}","branches_url":"https://api.github.com/repos/sulu-cmf/sulu/branches{/branch}","tags_url":"https://api.github.com/repos/sulu-cmf/sulu/tags","blobs_url":"https://api.github.com/repos/sulu-cmf/sulu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sulu-cmf/sulu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sulu-cmf/sulu/git/refs{/sha}","trees_url":"https://api.github.com/repos/sulu-cmf/sulu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sulu-cmf/sulu/statuses/{sha}","languages_url":"https://api.github.com/repos/sulu-cmf/sulu/languages","stargazers_url":"https://api.github.com/repos/sulu-cmf/sulu/stargazers","contributors_url":"https://api.github.com/repos/sulu-cmf/sulu/contributors","subscribers_url":"https://api.github.com/repos/sulu-cmf/sulu/subscribers","subscription_url":"https://api.github.com/repos/sulu-cmf/sulu/subscription","commits_url":"https://api.github.com/repos/sulu-cmf/sulu/commits{/sha}","git_commits_url":"https://api.github.com/repos/sulu-cmf/sulu/git/commits{/sha}","comments_url":"https://api.github.com/repos/sulu-cmf/sulu/comments{/number}","issue_comment_url":"https://api.github.com/repos/sulu-cmf/sulu/issues/comments/{number}","contents_url":"https://api.github.com/repos/sulu-cmf/sulu/contents/{+path}","compare_url":"https://api.github.com/repos/sulu-cmf/sulu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sulu-cmf/sulu/merges","archive_url":"https://api.github.com/repos/sulu-cmf/sulu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sulu-cmf/sulu/downloads","issues_url":"https://api.github.com/repos/sulu-cmf/sulu/issues{/number}","pulls_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls{/number}","milestones_url":"https://api.github.com/repos/sulu-cmf/sulu/milestones{/number}","notifications_url":"https://api.github.com/repos/sulu-cmf/sulu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sulu-cmf/sulu/labels{/name}","releases_url":"https://api.github.com/repos/sulu-cmf/sulu/releases{/id}","created_at":"2013-10-18T12:57:02Z","updated_at":"2015-01-23T21:58:16Z","pushed_at":"2015-01-26T07:28:08Z","git_url":"git://github.com/sulu-cmf/sulu.git","ssh_url":"git@github.com:sulu-cmf/sulu.git","clone_url":"https://github.com/sulu-cmf/sulu.git","svn_url":"https://github.com/sulu-cmf/sulu","homepage":"www.sulu.io","size":36035,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":239,"forks":6,"open_issues":239,"watchers":17,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/730"},"html":{"href":"https://github.com/sulu-cmf/sulu/pull/730"},"issue":{"href":"https://api.github.com/repos/sulu-cmf/sulu/issues/730"},"comments":{"href":"https://api.github.com/repos/sulu-cmf/sulu/issues/730/comments"},"review_comments":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/730/comments"},"review_comment":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/730/commits"},"statuses":{"href":"https://api.github.com/repos/sulu-cmf/sulu/statuses/028f24d0c0ec9b31d596fb28441ea89cd6fbb1d9"}}}}