{"action":"created","comment":{"url":"https://api.github.com/repos/backbee/BbCoreJs/pulls/comments/26659517","id":26659517,"diff_hunk":"@@ -0,0 +1,117 @@\n+/*\n+ * Copyright (c) 2011-2013 Lp digital system\n+ *\n+ * This file is part of BackBee.\n+ *\n+ * BackBee is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation, either version 3 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * BackBee is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with BackBee. If not, see <http://www.gnu.org/licenses/>.\n+ */\n+\n+define(\n+    'app.content/components/dnd/ContentDrop',\n+    [\n+        'tb.core',\n+        'jquery',\n+        'component!notify',\n+        'content.container',\n+        'content.manager',\n+        'jsclass'\n+    ],\n+    function (Core,\n+              jQuery,\n+              Notify,\n+              ContentContainer,\n+              ContentManager\n+            ) {\n+\n+        'use strict';\n+\n+        return new JS.Class({\n+\n+            bindEvents: function (Manager) {\n+\n+                this.manager = Manager;\n+\n+                Core.Mediator.subscribe('on:classcontent:drop', this.onDrop, this);\n+            },\n+\n+            unbindEvents: function () {\n+                Core.Mediator.unsubscribe('on:classcontent:drop', this.onDrop);\n+            },\n+\n+            onDrop: function (event) {\n+                event.stopPropagation();\n+\n+                var target = jQuery(event.target),\n+                    config = {},\n+                    parent = target.parents(this.manager.droppableClass + ':first'),\n+                    parentObjectIdentifier = ContentManager.retrievalObjectIdentifier(parent.data(this.manager.identifierDataAttribute));\n+\n+                config.event = event;\n+\n+                config.position = this.manager.getPosition(target, parent);\n+                config.parent = ContentManager.buildElement(parentObjectIdentifier);\n+                config.type = this.manager.dataTransfer.content.type;\n+\n+                if (this.manager.dataTransfer.isNew === true) {\n+                    this.addContent(config);\n+                } else {\n+                    this.updateContent(config);\n+                }\n+            },\n+\n+            /**\n+             * Used into a drop event.\n+             * Verify if current contentset accept the content, create the content\n+             * from api and show him on the html\n+             * @param {Object} config\n+             */\n+            addContent: function (config) {","path":"src/tb/apps/content/components/dnd/ContentDrop.js","position":79,"original_position":79,"commit_id":"6d71e5863873b668807cc9ce6db6c00c95a22843","original_commit_id":"6d71e5863873b668807cc9ce6db6c00c95a22843","user":{"login":"fkroockmann","id":9247945,"avatar_url":"https://avatars.githubusercontent.com/u/9247945?v=3","gravatar_id":"","url":"https://api.github.com/users/fkroockmann","html_url":"https://github.com/fkroockmann","followers_url":"https://api.github.com/users/fkroockmann/followers","following_url":"https://api.github.com/users/fkroockmann/following{/other_user}","gists_url":"https://api.github.com/users/fkroockmann/gists{/gist_id}","starred_url":"https://api.github.com/users/fkroockmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkroockmann/subscriptions","organizations_url":"https://api.github.com/users/fkroockmann/orgs","repos_url":"https://api.github.com/users/fkroockmann/repos","events_url":"https://api.github.com/users/fkroockmann/events{/privacy}","received_events_url":"https://api.github.com/users/fkroockmann/received_events","type":"User","site_admin":false},"body":"Same","created_at":"2015-03-18T12:51:06Z","updated_at":"2015-03-18T12:51:06Z","html_url":"https://github.com/backbee/BbCoreJs/pull/290#discussion_r26659517","pull_request_url":"https://api.github.com/repos/backbee/BbCoreJs/pulls/290","_links":{"self":{"href":"https://api.github.com/repos/backbee/BbCoreJs/pulls/comments/26659517"},"html":{"href":"https://github.com/backbee/BbCoreJs/pull/290#discussion_r26659517"},"pull_request":{"href":"https://api.github.com/repos/backbee/BbCoreJs/pulls/290"}}},"pull_request":{"url":"https://api.github.com/repos/backbee/BbCoreJs/pulls/290","id":31416259,"html_url":"https://github.com/backbee/BbCoreJs/pull/290","diff_url":"https://github.com/backbee/BbCoreJs/pull/290.diff","patch_url":"https://github.com/backbee/BbCoreJs/pull/290.patch","issue_url":"https://api.github.com/repos/backbee/BbCoreJs/issues/290","number":290,"state":"open","locked":false,"title":"Fix drag and drop","user":{"login":"fkroockmann","id":9247945,"avatar_url":"https://avatars.githubusercontent.com/u/9247945?v=3","gravatar_id":"","url":"https://api.github.com/users/fkroockmann","html_url":"https://github.com/fkroockmann","followers_url":"https://api.github.com/users/fkroockmann/followers","following_url":"https://api.github.com/users/fkroockmann/following{/other_user}","gists_url":"https://api.github.com/users/fkroockmann/gists{/gist_id}","starred_url":"https://api.github.com/users/fkroockmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkroockmann/subscriptions","organizations_url":"https://api.github.com/users/fkroockmann/orgs","repos_url":"https://api.github.com/users/fkroockmann/repos","events_url":"https://api.github.com/users/fkroockmann/events{/privacy}","received_events_url":"https://api.github.com/users/fkroockmann/received_events","type":"User","site_admin":false},"body":"- Use dnd as plugin\r\n- Rework and split a dnd management","created_at":"2015-03-18T10:32:02Z","updated_at":"2015-03-18T12:51:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e439b2c25df975681c6de6e3c36639b3f3536638","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/backbee/BbCoreJs/pulls/290/commits","review_comments_url":"https://api.github.com/repos/backbee/BbCoreJs/pulls/290/comments","review_comment_url":"https://api.github.com/repos/backbee/BbCoreJs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/backbee/BbCoreJs/issues/290/comments","statuses_url":"https://api.github.com/repos/backbee/BbCoreJs/statuses/6d71e5863873b668807cc9ce6db6c00c95a22843","head":{"label":"fkroockmann:fix_dnd","ref":"fix_dnd","sha":"6d71e5863873b668807cc9ce6db6c00c95a22843","user":{"login":"fkroockmann","id":9247945,"avatar_url":"https://avatars.githubusercontent.com/u/9247945?v=3","gravatar_id":"","url":"https://api.github.com/users/fkroockmann","html_url":"https://github.com/fkroockmann","followers_url":"https://api.github.com/users/fkroockmann/followers","following_url":"https://api.github.com/users/fkroockmann/following{/other_user}","gists_url":"https://api.github.com/users/fkroockmann/gists{/gist_id}","starred_url":"https://api.github.com/users/fkroockmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkroockmann/subscriptions","organizations_url":"https://api.github.com/users/fkroockmann/orgs","repos_url":"https://api.github.com/users/fkroockmann/repos","events_url":"https://api.github.com/users/fkroockmann/events{/privacy}","received_events_url":"https://api.github.com/users/fkroockmann/received_events","type":"User","site_admin":false},"repo":{"id":31269720,"name":"BbCoreJs","full_name":"fkroockmann/BbCoreJs","owner":{"login":"fkroockmann","id":9247945,"avatar_url":"https://avatars.githubusercontent.com/u/9247945?v=3","gravatar_id":"","url":"https://api.github.com/users/fkroockmann","html_url":"https://github.com/fkroockmann","followers_url":"https://api.github.com/users/fkroockmann/followers","following_url":"https://api.github.com/users/fkroockmann/following{/other_user}","gists_url":"https://api.github.com/users/fkroockmann/gists{/gist_id}","starred_url":"https://api.github.com/users/fkroockmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkroockmann/subscriptions","organizations_url":"https://api.github.com/users/fkroockmann/orgs","repos_url":"https://api.github.com/users/fkroockmann/repos","events_url":"https://api.github.com/users/fkroockmann/events{/privacy}","received_events_url":"https://api.github.com/users/fkroockmann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fkroockmann/BbCoreJs","description":"BackBee front-admin javascript","fork":true,"url":"https://api.github.com/repos/fkroockmann/BbCoreJs","forks_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/forks","keys_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/teams","hooks_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/hooks","issue_events_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/issues/events{/number}","events_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/events","assignees_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/assignees{/user}","branches_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/branches{/branch}","tags_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/tags","blobs_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/git/refs{/sha}","trees_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/statuses/{sha}","languages_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/languages","stargazers_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/stargazers","contributors_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/contributors","subscribers_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/subscribers","subscription_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/subscription","commits_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/commits{/sha}","git_commits_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/git/commits{/sha}","comments_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/comments{/number}","issue_comment_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/issues/comments{/number}","contents_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/contents/{+path}","compare_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/merges","archive_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/downloads","issues_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/issues{/number}","pulls_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/pulls{/number}","milestones_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/milestones{/number}","notifications_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/labels{/name}","releases_url":"https://api.github.com/repos/fkroockmann/BbCoreJs/releases{/id}","created_at":"2015-02-24T16:37:56Z","updated_at":"2015-03-17T11:54:41Z","pushed_at":"2015-03-18T11:08:47Z","git_url":"git://github.com/fkroockmann/BbCoreJs.git","ssh_url":"git@github.com:fkroockmann/BbCoreJs.git","clone_url":"https://github.com/fkroockmann/BbCoreJs.git","svn_url":"https://github.com/fkroockmann/BbCoreJs","homepage":null,"size":1994,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"backbee:master","ref":"master","sha":"e4bc5ee2d8ed7315a39a8bc9645ac67738ac6093","user":{"login":"backbee","id":8198689,"avatar_url":"https://avatars.githubusercontent.com/u/8198689?v=3","gravatar_id":"","url":"https://api.github.com/users/backbee","html_url":"https://github.com/backbee","followers_url":"https://api.github.com/users/backbee/followers","following_url":"https://api.github.com/users/backbee/following{/other_user}","gists_url":"https://api.github.com/users/backbee/gists{/gist_id}","starred_url":"https://api.github.com/users/backbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/backbee/subscriptions","organizations_url":"https://api.github.com/users/backbee/orgs","repos_url":"https://api.github.com/users/backbee/repos","events_url":"https://api.github.com/users/backbee/events{/privacy}","received_events_url":"https://api.github.com/users/backbee/received_events","type":"Organization","site_admin":false},"repo":{"id":25197244,"name":"BbCoreJs","full_name":"backbee/BbCoreJs","owner":{"login":"backbee","id":8198689,"avatar_url":"https://avatars.githubusercontent.com/u/8198689?v=3","gravatar_id":"","url":"https://api.github.com/users/backbee","html_url":"https://github.com/backbee","followers_url":"https://api.github.com/users/backbee/followers","following_url":"https://api.github.com/users/backbee/following{/other_user}","gists_url":"https://api.github.com/users/backbee/gists{/gist_id}","starred_url":"https://api.github.com/users/backbee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/backbee/subscriptions","organizations_url":"https://api.github.com/users/backbee/orgs","repos_url":"https://api.github.com/users/backbee/repos","events_url":"https://api.github.com/users/backbee/events{/privacy}","received_events_url":"https://api.github.com/users/backbee/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/backbee/BbCoreJs","description":"BackBee front-admin javascript","fork":false,"url":"https://api.github.com/repos/backbee/BbCoreJs","forks_url":"https://api.github.com/repos/backbee/BbCoreJs/forks","keys_url":"https://api.github.com/repos/backbee/BbCoreJs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/backbee/BbCoreJs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/backbee/BbCoreJs/teams","hooks_url":"https://api.github.com/repos/backbee/BbCoreJs/hooks","issue_events_url":"https://api.github.com/repos/backbee/BbCoreJs/issues/events{/number}","events_url":"https://api.github.com/repos/backbee/BbCoreJs/events","assignees_url":"https://api.github.com/repos/backbee/BbCoreJs/assignees{/user}","branches_url":"https://api.github.com/repos/backbee/BbCoreJs/branches{/branch}","tags_url":"https://api.github.com/repos/backbee/BbCoreJs/tags","blobs_url":"https://api.github.com/repos/backbee/BbCoreJs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/backbee/BbCoreJs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/backbee/BbCoreJs/git/refs{/sha}","trees_url":"https://api.github.com/repos/backbee/BbCoreJs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/backbee/BbCoreJs/statuses/{sha}","languages_url":"https://api.github.com/repos/backbee/BbCoreJs/languages","stargazers_url":"https://api.github.com/repos/backbee/BbCoreJs/stargazers","contributors_url":"https://api.github.com/repos/backbee/BbCoreJs/contributors","subscribers_url":"https://api.github.com/repos/backbee/BbCoreJs/subscribers","subscription_url":"https://api.github.com/repos/backbee/BbCoreJs/subscription","commits_url":"https://api.github.com/repos/backbee/BbCoreJs/commits{/sha}","git_commits_url":"https://api.github.com/repos/backbee/BbCoreJs/git/commits{/sha}","comments_url":"https://api.github.com/repos/backbee/BbCoreJs/comments{/number}","issue_comment_url":"https://api.github.com/repos/backbee/BbCoreJs/issues/comments{/number}","contents_url":"https://api.github.com/repos/backbee/BbCoreJs/contents/{+path}","compare_url":"https://api.github.com/repos/backbee/BbCoreJs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/backbee/BbCoreJs/merges","archive_url":"https://api.github.com/repos/backbee/BbCoreJs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/backbee/BbCoreJs/downloads","issues_url":"https://api.github.com/repos/backbee/BbCoreJs/issues{/number}","pulls_url":"https://api.github.com/repos/backbee/BbCoreJs/pulls{/number}","milestones_url":"https://api.github.com/repos/backbee/BbCoreJs/milestones{/number}","notifications_url":"https://api.github.com/repos/backbee/BbCoreJs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/backbee/BbCoreJs/labels{/name}","releases_url":"https://api.github.com/repos/backbee/BbCoreJs/releases{/id}","created_at":"2014-10-14T08:32:15Z","updated_at":"2015-03-17T11:37:52Z","pushed_at":"2015-03-17T11:37:52Z","git_url":"git://github.com/backbee/BbCoreJs.git","ssh_url":"git@github.com:backbee/BbCoreJs.git","clone_url":"https://github.com/backbee/BbCoreJs.git","svn_url":"https://github.com/backbee/BbCoreJs","homepage":null,"size":4738,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":55,"forks":7,"open_issues":55,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/backbee/BbCoreJs/pulls/290"},"html":{"href":"https://github.com/backbee/BbCoreJs/pull/290"},"issue":{"href":"https://api.github.com/repos/backbee/BbCoreJs/issues/290"},"comments":{"href":"https://api.github.com/repos/backbee/BbCoreJs/issues/290/comments"},"review_comments":{"href":"https://api.github.com/repos/backbee/BbCoreJs/pulls/290/comments"},"review_comment":{"href":"https://api.github.com/repos/backbee/BbCoreJs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/backbee/BbCoreJs/pulls/290/commits"},"statuses":{"href":"https://api.github.com/repos/backbee/BbCoreJs/statuses/6d71e5863873b668807cc9ce6db6c00c95a22843"}}}}