{"action":"created","comment":{"url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/comments/24000807","id":24000807,"diff_hunk":"@@ -1031,6 +1090,93 @@ define([\n             ]);\n         },\n \n+        getPreviewDocument: function() {\n+            if (!!this.previewWindow) {\n+                return this.previewWindow.document;\n+            } else {\n+                return this.sandbox.dom.find('iframe', this.$preview).contents()[0];\n+            }\n+        },\n+\n+        handleChanges: function(changes) {\n+            if (!!changes.reload) {\n+                this.getPreviewDocument().location.reload();\n+            } else {\n+                // foreach property which was changed\n+                for (var propertyName in changes) {\n+                    if (changes.hasOwnProperty(propertyName)) {\n+                        if (-1 !== propertyName.indexOf(',')) {\n+                            this.handleSequence(propertyName, changes[propertyName]);\n+                        } else {\n+                            this.handleSingle(propertyName, changes[propertyName]);\n+                        }\n+                    }\n+                }\n+            }\n+        },\n+\n+        handleSequence: function(propertyName, content) {\n+            var sequence = propertyName.split(','),\n+                filter = '',\n+                item, before = 0;\n+\n+            for (item in sequence) {\n+                // check of integer\n+                if (!/^\\+?(0|[1-9]\\d*)$/.test(sequence[item])) {","path":"src/Sulu/Bundle/ContentBundle/Resources/public/js/components/content/main.js","position":190,"original_position":190,"commit_id":"747ad4a257b0b33c9fa677c2222d927b9e1d4852","original_commit_id":"64ee56c3d9eec391a5906a251511099e940cc6aa","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":"fixed","created_at":"2015-02-03T12:44:25Z","updated_at":"2015-02-03T12:44:25Z","html_url":"https://github.com/sulu-cmf/sulu/pull/684#discussion_r24000807","pull_request_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/684","_links":{"self":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/comments/24000807"},"html":{"href":"https://github.com/sulu-cmf/sulu/pull/684#discussion_r24000807"},"pull_request":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/684"}}},"pull_request":{"url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/684","id":26944318,"html_url":"https://github.com/sulu-cmf/sulu/pull/684","diff_url":"https://github.com/sulu-cmf/sulu/pull/684.diff","patch_url":"https://github.com/sulu-cmf/sulu/pull/684.patch","issue_url":"https://api.github.com/repos/sulu-cmf/sulu/issues/684","number":684,"state":"open","locked":false,"title":"Implementing Websocket Component","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":"__Tasks:__\r\n\r\n- [x] test coverage\r\n  * message_dispatcher\r\n  * fallback controller\r\n- [ ] gather feedback for my changes\r\n- [x] submit changes to the documentation\r\n  * websocket component (apps)\r\n  * message dispatcher\r\n- [x] added changelog line\r\n- [x] implemented websocket component\r\n- [x] implemented websocket bundle\r\n- [x] include content preview socket \r\n- [x] move message_dispatcher admin definition to websocket bundle with admin context\r\n- [x] implement javascript code in websocket bundle\r\n- [x] implement fallback controller which dispatches messages over http\r\n- [x] implement javascript switch (ws or ajax) app should not notice which is used\r\n\r\nRelated PR https://github.com/sulu-cmf/sulu-standard/pull/390\r\n\r\n__Informations:__\r\n\r\n| Q             | A\r\n| ------------- | ---\r\n| Tests pass?   | yes\r\n| Fixed tickets | fixes #755, fixes sulu-cmf/sulu-standard#209, fixes #621, fixes sulu-cmf/sulu-standard#245, fixes sulu-cmf/sulu-standard#286, fixes #421, fixes #425\r\n| BC Breaks     | yes => command name changed\r\n| Doc           | https://github.com/sulu-cmf/docs/blob/master/developer-documentation/000-foundation/websocket-component.md","created_at":"2015-01-07T08:45:08Z","updated_at":"2015-02-03T12:44:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e24a625646a813ce2da00f678d65715fb9c8aee","assignee":{"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},"milestone":null,"commits_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/684/commits","review_comments_url":"https://api.github.com/repos/sulu-cmf/sulu/pulls/684/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/684/comments","statuses_url":"https://api.github.com/repos/sulu-cmf/sulu/statuses/747ad4a257b0b33c9fa677c2222d927b9e1d4852","head":{"label":"sulu-cmf:feature/websocket-app-manager","ref":"feature/websocket-app-manager","sha":"747ad4a257b0b33c9fa677c2222d927b9e1d4852","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-02-03T12:02:40Z","pushed_at":"2015-02-03T12:29:02Z","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":35271,"stargazers_count":19,"watchers_count":19,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":233,"forks":7,"open_issues":233,"watchers":19,"default_branch":"develop"}},"base":{"label":"sulu-cmf:develop","ref":"develop","sha":"fa1d8c5e3984eabc8aa4c6d4da814a4832a47977","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-02-03T12:02:40Z","pushed_at":"2015-02-03T12:29:02Z","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":35271,"stargazers_count":19,"watchers_count":19,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":233,"forks":7,"open_issues":233,"watchers":19,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/684"},"html":{"href":"https://github.com/sulu-cmf/sulu/pull/684"},"issue":{"href":"https://api.github.com/repos/sulu-cmf/sulu/issues/684"},"comments":{"href":"https://api.github.com/repos/sulu-cmf/sulu/issues/684/comments"},"review_comments":{"href":"https://api.github.com/repos/sulu-cmf/sulu/pulls/684/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/684/commits"},"statuses":{"href":"https://api.github.com/repos/sulu-cmf/sulu/statuses/747ad4a257b0b33c9fa677c2222d927b9e1d4852"}}}}