{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments/72793770","id":72793770,"diff_hunk":"@@ -0,0 +1,113 @@\n+/*\n+ * Copyright (C) eZ Systems AS. All rights reserved.\n+ * For full copyright and license information view LICENSE file distributed with this source code.\n+ */\n+YUI.add('ez-editcontentplugin', function (Y) {\n+    \"use strict\";\n+    /**\n+     * Provides the edit content plugin\n+     *\n+     * @module ez-editcontentplugin\n+     */\n+    Y.namespace('eZ.Plugin');\n+\n+    /**\n+     * Object user load plugin. It sets an event handler to load contents\n+     * in an object relation list field.\n+     * //TODO update\n+     * In order to use it you need to fire the `loadUser` event with two parameters:\n+     *  - `userId` of the user to be loaded\n+     *  - `attributeName` where to store the result\n+     *\n+     * @namespace eZ.Plugin\n+     * @class UserLoad\n+     * @constructor\n+     * @extends eZ.Plugin.ViewServiceBase\n+     */\n+    Y.eZ.Plugin.EditContent = Y.Base.create('editContentplugin', Y.eZ.Plugin.ViewServiceBase, [], {\n+\n+        initializer: function () {\n+            this.onHostEvent('*:editContent', this._editContent);\n+        },\n+\n+        /**\n+         * editAction event handler, makes the application navigate to edit the\n+         * content available in the event facade\n+         *\n+         * @method _editContent\n+         * @protected\n+         * @param {Object} e event facade of the editAction event\n+         * //TODO need content\n+         * //TODO need languageCode\n+         */\n+        _editContent: function (e) {\n+            var service = this.get('host'),\n+                app = service.get('app'),\n+                content = e.content,\n+                languageCode = e.languageCode,\n+                callback = function(error, versions) {\n+                    app.set('loading', false);\n+                    if (error) {\n+                        return;\n+                    }\n+\n+                    if (versions.DRAFT && versions.DRAFT.length > 1) {\n+                        service.fire('confirmBoxOpen', {\n+                            config: {\n+                                title: \"Select an Open Draft\",\n+                                view: new Y.eZ.DraftConflict({\n+                                    drafts: versions.DRAFT,\n+                                    content: content\n+                                }),\n+                                button: false,\n+                                confirmHandler: function (e) {\n+                                    app.navigate(e.route);\n+\n+                                    //TODO comment\n+                                    service.fire('confirmBoxClose');\n+                                },\n+                            },\n+                        });\n+                    } else {\n+                        app.navigate(\n+                            app.routeUri('editContent', {\n+                                id: content.get('id'),\n+                                languageCode: languageCode\n+                            })\n+                        );\n+                    }\n+                };\n+\n+            app.set('loading', true);\n+\n+            /**\n+             * Fired when versions are about to be loaded\n+             *\n+             * @event loadVersions\n+             */\n+            service.fire('loadVersions',{","path":"Resources/public/js/views/services/plugins/ez-editcontentplugin.js","position":88,"original_position":88,"commit_id":"fa5d5f47fd58778da841312fcab923546fefddcf","original_commit_id":"fa5d5f47fd58778da841312fcab923546fefddcf","user":{"login":"dpobel","id":305563,"avatar_url":"https://avatars.githubusercontent.com/u/305563?v=3","gravatar_id":"","url":"https://api.github.com/users/dpobel","html_url":"https://github.com/dpobel","followers_url":"https://api.github.com/users/dpobel/followers","following_url":"https://api.github.com/users/dpobel/following{/other_user}","gists_url":"https://api.github.com/users/dpobel/gists{/gist_id}","starred_url":"https://api.github.com/users/dpobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpobel/subscriptions","organizations_url":"https://api.github.com/users/dpobel/orgs","repos_url":"https://api.github.com/users/dpobel/repos","events_url":"https://api.github.com/users/dpobel/events{/privacy}","received_events_url":"https://api.github.com/users/dpobel/received_events","type":"User","site_admin":false},"body":"while this is working, that's a bit weird. Instead, you should directly call `content.loadVersions` here","created_at":"2016-07-29T13:48:06Z","updated_at":"2016-07-29T13:48:06Z","html_url":"https://github.com/ezsystems/PlatformUIBundle/pull/658#discussion_r72793770","pull_request_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/658","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments/72793770"},"html":{"href":"https://github.com/ezsystems/PlatformUIBundle/pull/658#discussion_r72793770"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/658"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/658","id":79339180,"html_url":"https://github.com/ezsystems/PlatformUIBundle/pull/658","diff_url":"https://github.com/ezsystems/PlatformUIBundle/pull/658.diff","patch_url":"https://github.com/ezsystems/PlatformUIBundle/pull/658.patch","issue_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/658","number":658,"state":"open","locked":false,"title":"[WIP] EZP-25465: Implement a Draft conflict screen","user":{"login":"yannickroger","id":4035241,"avatar_url":"https://avatars.githubusercontent.com/u/4035241?v=3","gravatar_id":"","url":"https://api.github.com/users/yannickroger","html_url":"https://github.com/yannickroger","followers_url":"https://api.github.com/users/yannickroger/followers","following_url":"https://api.github.com/users/yannickroger/following{/other_user}","gists_url":"https://api.github.com/users/yannickroger/gists{/gist_id}","starred_url":"https://api.github.com/users/yannickroger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannickroger/subscriptions","organizations_url":"https://api.github.com/users/yannickroger/orgs","repos_url":"https://api.github.com/users/yannickroger/repos","events_url":"https://api.github.com/users/yannickroger/events{/privacy}","received_events_url":"https://api.github.com/users/yannickroger/received_events","type":"User","site_admin":false},"body":"Link: https://jira.ez.no/browse/EZP-25465\r\n\r\n**WORK IN PROGRESS**\r\n\r\n## Description\r\n\r\n## Test\r\nManual and unit tests\r\n\r\n## TODO\r\n- [x] Prototype confirmbox and call it in location view\r\n- [ ] Call confirm box from dashboard (my contentblock and all content block)\r\n- [ ] Add create new draft button\r\n- [ ] Design\r\n- [ ] Fix Unit test\r\n- [ ] Test coverage\r\n- [ ] Screencast\r\n- [ ] Cleanup and rebase","created_at":"2016-07-29T10:30:53Z","updated_at":"2016-07-29T13:48:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8781390acf8c33a19a073da7ea7bacc77f34f846","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/658/commits","review_comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/658/comments","review_comment_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/658/comments","statuses_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/fa5d5f47fd58778da841312fcab923546fefddcf","head":{"label":"ezsystems:ezp-25465-draft_conflict","ref":"ezp-25465-draft_conflict","sha":"fa5d5f47fd58778da841312fcab923546fefddcf","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":11221607,"name":"PlatformUIBundle","full_name":"ezsystems/PlatformUIBundle","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/PlatformUIBundle","description":"Main Bundle to provide editorial/admin UI for eZ Platform","fork":false,"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle","forks_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/forks","keys_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/teams","hooks_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/events","assignees_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/tags","blobs_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/languages","stargazers_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/subscription","commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/merges","archive_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/downloads","issues_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/releases{/id}","deployments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/deployments","created_at":"2013-07-06T17:21:40Z","updated_at":"2016-07-04T14:21:11Z","pushed_at":"2016-07-29T13:23:56Z","git_url":"git://github.com/ezsystems/PlatformUIBundle.git","ssh_url":"git@github.com:ezsystems/PlatformUIBundle.git","clone_url":"https://github.com/ezsystems/PlatformUIBundle.git","svn_url":"https://github.com/ezsystems/PlatformUIBundle","homepage":"http://ezplatform.com/","size":7299,"stargazers_count":29,"watchers_count":29,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":23,"forks":32,"open_issues":23,"watchers":29,"default_branch":"master"}},"base":{"label":"ezsystems:master","ref":"master","sha":"215630280435cc7e450efa00abcbc8bcd5c4200e","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":11221607,"name":"PlatformUIBundle","full_name":"ezsystems/PlatformUIBundle","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/PlatformUIBundle","description":"Main Bundle to provide editorial/admin UI for eZ Platform","fork":false,"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle","forks_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/forks","keys_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/teams","hooks_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/events","assignees_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/tags","blobs_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/languages","stargazers_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/subscription","commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/merges","archive_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/downloads","issues_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/releases{/id}","deployments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/deployments","created_at":"2013-07-06T17:21:40Z","updated_at":"2016-07-04T14:21:11Z","pushed_at":"2016-07-29T13:23:56Z","git_url":"git://github.com/ezsystems/PlatformUIBundle.git","ssh_url":"git@github.com:ezsystems/PlatformUIBundle.git","clone_url":"https://github.com/ezsystems/PlatformUIBundle.git","svn_url":"https://github.com/ezsystems/PlatformUIBundle","homepage":"http://ezplatform.com/","size":7299,"stargazers_count":29,"watchers_count":29,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":32,"mirror_url":null,"open_issues_count":23,"forks":32,"open_issues":23,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/658"},"html":{"href":"https://github.com/ezsystems/PlatformUIBundle/pull/658"},"issue":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/658"},"comments":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/658/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/658/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/658/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/fa5d5f47fd58778da841312fcab923546fefddcf"}}}}
{"actor":{"display_login":"dpobel"}}