{"action":"created","comment":{"url":"https://api.github.com/repos/massiveart/husky/pulls/comments/58047165","id":58047165,"diff_hunk":"@@ -151,36 +154,64 @@ define([], function() {\n         },\n \n         itemEnable: function(id) {\n-            this.sandbox.dom.removeClass(this.$find('li[data-id=\"'+ id +'\"]'), 'disabled');\n+            this.sandbox.dom.removeClass(this.$find('li[data-id=\"' + id + '\"]'), 'disabled');\n         },\n \n         itemDisable: function(id) {\n-            this.sandbox.dom.addClass(this.$find('li[data-id=\"'+ id +'\"]'), 'disabled');\n+            this.sandbox.dom.addClass(this.$find('li[data-id=\"' + id + '\"]'), 'disabled');\n         },\n \n         // trigger event with clicked item\n         clickItem: function(id) {\n-            this.sandbox.util.foreach(this.options.data, function(item) {\n-                if (typeof item.id !== 'undefined' && item.id.toString() === id.toString()) {\n-                    this.sandbox.logger.log(this.name, 'item.click: ' + id, 'success');\n+            var item = this.getItemById(id),\n+                $item = this.$el.find('*[data-id=\"' + id + '\"]'),\n+                $infos;\n \n-                    if (!!item.callback && typeof item.callback === 'function') {\n-                        item.callback.call(this);\n-                    } else if (!!this.options.clickCallback && typeof this.options.clickCallback === 'function') {\n-                        this.options.clickCallback(item, this.$el);\n-                    } else {\n-                        this.sandbox.emit(this.getEvent('item.click'), item, this.$el);\n-                    }\n+            if (!item) {\n+                return;\n+            }\n+\n+            if (!!item.callback && typeof item.callback === 'function') {\n+                item.callback.call(this);\n+            } else if (!!this.options.clickCallback && typeof this.options.clickCallback === 'function') {\n+                this.options.clickCallback(item, this.$el);\n+            } else {\n+                this.sandbox.emit(this.getEvent('item.click'), item, this.$el);\n+            }\n+\n+            if (!item[this.options.clickedName]) {\n+                return this.hideDropDown();\n+            }\n+\n+            $infos = $item.find('.info, .info-clicked');\n+            $item.addClass('highlight-animation');\n+            $infos.addClass('clicked');\n+\n+            _.delay(function() {\n+                $item.removeClass('highlight-animation');\n+                $infos.find('.info, .info-clicked').removeClass('clicked');","path":"husky_components/dropdown/main.js","position":123,"original_position":123,"commit_id":"f89aa9b54a96af70984975915109e137c7eef98f","original_commit_id":"f89aa9b54a96af70984975915109e137c7eef98f","user":{"login":"danrot","id":405874,"avatar_url":"https://avatars.githubusercontent.com/u/405874?v=3","gravatar_id":"","url":"https://api.github.com/users/danrot","html_url":"https://github.com/danrot","followers_url":"https://api.github.com/users/danrot/followers","following_url":"https://api.github.com/users/danrot/following{/other_user}","gists_url":"https://api.github.com/users/danrot/gists{/gist_id}","starred_url":"https://api.github.com/users/danrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danrot/subscriptions","organizations_url":"https://api.github.com/users/danrot/orgs","repos_url":"https://api.github.com/users/danrot/repos","events_url":"https://api.github.com/users/danrot/events{/privacy}","received_events_url":"https://api.github.com/users/danrot/received_events","type":"User","site_admin":false},"body":"Shouldn't the `find('.info, .info-clicked')` part be removed here?","created_at":"2016-03-31T12:49:11Z","updated_at":"2016-03-31T12:49:11Z","html_url":"https://github.com/massiveart/husky/pull/619#discussion_r58047165","pull_request_url":"https://api.github.com/repos/massiveart/husky/pulls/619","_links":{"self":{"href":"https://api.github.com/repos/massiveart/husky/pulls/comments/58047165"},"html":{"href":"https://github.com/massiveart/husky/pull/619#discussion_r58047165"},"pull_request":{"href":"https://api.github.com/repos/massiveart/husky/pulls/619"}}},"pull_request":{"url":"https://api.github.com/repos/massiveart/husky/pulls/619","id":64031534,"html_url":"https://github.com/massiveart/husky/pull/619","diff_url":"https://github.com/massiveart/husky/pull/619.diff","patch_url":"https://github.com/massiveart/husky/pull/619.patch","issue_url":"https://api.github.com/repos/massiveart/husky/issues/619","number":619,"state":"open","locked":false,"title":"Introduced info text for dropdown","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":"This PR added info texts for dropdown items. Additionally the stopPropagation is removed to use this event outside of the dropdown (sulu for copy to clipboard https://github.com/sulu-io/sulu/pull/2155).","created_at":"2016-03-24T13:12:47Z","updated_at":"2016-03-31T12:49:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6801638e5e21497f7a0405f0ddd26f2ba4ce7403","assignee":{"login":"danrot","id":405874,"avatar_url":"https://avatars.githubusercontent.com/u/405874?v=3","gravatar_id":"","url":"https://api.github.com/users/danrot","html_url":"https://github.com/danrot","followers_url":"https://api.github.com/users/danrot/followers","following_url":"https://api.github.com/users/danrot/following{/other_user}","gists_url":"https://api.github.com/users/danrot/gists{/gist_id}","starred_url":"https://api.github.com/users/danrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danrot/subscriptions","organizations_url":"https://api.github.com/users/danrot/orgs","repos_url":"https://api.github.com/users/danrot/repos","events_url":"https://api.github.com/users/danrot/events{/privacy}","received_events_url":"https://api.github.com/users/danrot/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/massiveart/husky/pulls/619/commits","review_comments_url":"https://api.github.com/repos/massiveart/husky/pulls/619/comments","review_comment_url":"https://api.github.com/repos/massiveart/husky/pulls/comments{/number}","comments_url":"https://api.github.com/repos/massiveart/husky/issues/619/comments","statuses_url":"https://api.github.com/repos/massiveart/husky/statuses/f89aa9b54a96af70984975915109e137c7eef98f","head":{"label":"massiveart:feature/dropdown-info-text","ref":"feature/dropdown-info-text","sha":"f89aa9b54a96af70984975915109e137c7eef98f","user":{"login":"massiveart","id":854731,"avatar_url":"https://avatars.githubusercontent.com/u/854731?v=3","gravatar_id":"","url":"https://api.github.com/users/massiveart","html_url":"https://github.com/massiveart","followers_url":"https://api.github.com/users/massiveart/followers","following_url":"https://api.github.com/users/massiveart/following{/other_user}","gists_url":"https://api.github.com/users/massiveart/gists{/gist_id}","starred_url":"https://api.github.com/users/massiveart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/massiveart/subscriptions","organizations_url":"https://api.github.com/users/massiveart/orgs","repos_url":"https://api.github.com/users/massiveart/repos","events_url":"https://api.github.com/users/massiveart/events{/privacy}","received_events_url":"https://api.github.com/users/massiveart/received_events","type":"Organization","site_admin":false},"repo":{"id":11196484,"name":"husky","full_name":"massiveart/husky","owner":{"login":"massiveart","id":854731,"avatar_url":"https://avatars.githubusercontent.com/u/854731?v=3","gravatar_id":"","url":"https://api.github.com/users/massiveart","html_url":"https://github.com/massiveart","followers_url":"https://api.github.com/users/massiveart/followers","following_url":"https://api.github.com/users/massiveart/following{/other_user}","gists_url":"https://api.github.com/users/massiveart/gists{/gist_id}","starred_url":"https://api.github.com/users/massiveart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/massiveart/subscriptions","organizations_url":"https://api.github.com/users/massiveart/orgs","repos_url":"https://api.github.com/users/massiveart/repos","events_url":"https://api.github.com/users/massiveart/events{/privacy}","received_events_url":"https://api.github.com/users/massiveart/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/massiveart/husky","description":"","fork":false,"url":"https://api.github.com/repos/massiveart/husky","forks_url":"https://api.github.com/repos/massiveart/husky/forks","keys_url":"https://api.github.com/repos/massiveart/husky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/massiveart/husky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/massiveart/husky/teams","hooks_url":"https://api.github.com/repos/massiveart/husky/hooks","issue_events_url":"https://api.github.com/repos/massiveart/husky/issues/events{/number}","events_url":"https://api.github.com/repos/massiveart/husky/events","assignees_url":"https://api.github.com/repos/massiveart/husky/assignees{/user}","branches_url":"https://api.github.com/repos/massiveart/husky/branches{/branch}","tags_url":"https://api.github.com/repos/massiveart/husky/tags","blobs_url":"https://api.github.com/repos/massiveart/husky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/massiveart/husky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/massiveart/husky/git/refs{/sha}","trees_url":"https://api.github.com/repos/massiveart/husky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/massiveart/husky/statuses/{sha}","languages_url":"https://api.github.com/repos/massiveart/husky/languages","stargazers_url":"https://api.github.com/repos/massiveart/husky/stargazers","contributors_url":"https://api.github.com/repos/massiveart/husky/contributors","subscribers_url":"https://api.github.com/repos/massiveart/husky/subscribers","subscription_url":"https://api.github.com/repos/massiveart/husky/subscription","commits_url":"https://api.github.com/repos/massiveart/husky/commits{/sha}","git_commits_url":"https://api.github.com/repos/massiveart/husky/git/commits{/sha}","comments_url":"https://api.github.com/repos/massiveart/husky/comments{/number}","issue_comment_url":"https://api.github.com/repos/massiveart/husky/issues/comments{/number}","contents_url":"https://api.github.com/repos/massiveart/husky/contents/{+path}","compare_url":"https://api.github.com/repos/massiveart/husky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/massiveart/husky/merges","archive_url":"https://api.github.com/repos/massiveart/husky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/massiveart/husky/downloads","issues_url":"https://api.github.com/repos/massiveart/husky/issues{/number}","pulls_url":"https://api.github.com/repos/massiveart/husky/pulls{/number}","milestones_url":"https://api.github.com/repos/massiveart/husky/milestones{/number}","notifications_url":"https://api.github.com/repos/massiveart/husky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/massiveart/husky/labels{/name}","releases_url":"https://api.github.com/repos/massiveart/husky/releases{/id}","deployments_url":"https://api.github.com/repos/massiveart/husky/deployments","created_at":"2013-07-05T09:44:18Z","updated_at":"2016-01-12T15:33:41Z","pushed_at":"2016-03-31T12:12:06Z","git_url":"git://github.com/massiveart/husky.git","ssh_url":"git@github.com:massiveart/husky.git","clone_url":"https://github.com/massiveart/husky.git","svn_url":"https://github.com/massiveart/husky","homepage":null,"size":57767,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":89,"forks":3,"open_issues":89,"watchers":14,"default_branch":"develop"}},"base":{"label":"massiveart:develop","ref":"develop","sha":"87fe95ae0ac2a39eecfbdb506e2b2053a5965736","user":{"login":"massiveart","id":854731,"avatar_url":"https://avatars.githubusercontent.com/u/854731?v=3","gravatar_id":"","url":"https://api.github.com/users/massiveart","html_url":"https://github.com/massiveart","followers_url":"https://api.github.com/users/massiveart/followers","following_url":"https://api.github.com/users/massiveart/following{/other_user}","gists_url":"https://api.github.com/users/massiveart/gists{/gist_id}","starred_url":"https://api.github.com/users/massiveart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/massiveart/subscriptions","organizations_url":"https://api.github.com/users/massiveart/orgs","repos_url":"https://api.github.com/users/massiveart/repos","events_url":"https://api.github.com/users/massiveart/events{/privacy}","received_events_url":"https://api.github.com/users/massiveart/received_events","type":"Organization","site_admin":false},"repo":{"id":11196484,"name":"husky","full_name":"massiveart/husky","owner":{"login":"massiveart","id":854731,"avatar_url":"https://avatars.githubusercontent.com/u/854731?v=3","gravatar_id":"","url":"https://api.github.com/users/massiveart","html_url":"https://github.com/massiveart","followers_url":"https://api.github.com/users/massiveart/followers","following_url":"https://api.github.com/users/massiveart/following{/other_user}","gists_url":"https://api.github.com/users/massiveart/gists{/gist_id}","starred_url":"https://api.github.com/users/massiveart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/massiveart/subscriptions","organizations_url":"https://api.github.com/users/massiveart/orgs","repos_url":"https://api.github.com/users/massiveart/repos","events_url":"https://api.github.com/users/massiveart/events{/privacy}","received_events_url":"https://api.github.com/users/massiveart/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/massiveart/husky","description":"","fork":false,"url":"https://api.github.com/repos/massiveart/husky","forks_url":"https://api.github.com/repos/massiveart/husky/forks","keys_url":"https://api.github.com/repos/massiveart/husky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/massiveart/husky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/massiveart/husky/teams","hooks_url":"https://api.github.com/repos/massiveart/husky/hooks","issue_events_url":"https://api.github.com/repos/massiveart/husky/issues/events{/number}","events_url":"https://api.github.com/repos/massiveart/husky/events","assignees_url":"https://api.github.com/repos/massiveart/husky/assignees{/user}","branches_url":"https://api.github.com/repos/massiveart/husky/branches{/branch}","tags_url":"https://api.github.com/repos/massiveart/husky/tags","blobs_url":"https://api.github.com/repos/massiveart/husky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/massiveart/husky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/massiveart/husky/git/refs{/sha}","trees_url":"https://api.github.com/repos/massiveart/husky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/massiveart/husky/statuses/{sha}","languages_url":"https://api.github.com/repos/massiveart/husky/languages","stargazers_url":"https://api.github.com/repos/massiveart/husky/stargazers","contributors_url":"https://api.github.com/repos/massiveart/husky/contributors","subscribers_url":"https://api.github.com/repos/massiveart/husky/subscribers","subscription_url":"https://api.github.com/repos/massiveart/husky/subscription","commits_url":"https://api.github.com/repos/massiveart/husky/commits{/sha}","git_commits_url":"https://api.github.com/repos/massiveart/husky/git/commits{/sha}","comments_url":"https://api.github.com/repos/massiveart/husky/comments{/number}","issue_comment_url":"https://api.github.com/repos/massiveart/husky/issues/comments{/number}","contents_url":"https://api.github.com/repos/massiveart/husky/contents/{+path}","compare_url":"https://api.github.com/repos/massiveart/husky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/massiveart/husky/merges","archive_url":"https://api.github.com/repos/massiveart/husky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/massiveart/husky/downloads","issues_url":"https://api.github.com/repos/massiveart/husky/issues{/number}","pulls_url":"https://api.github.com/repos/massiveart/husky/pulls{/number}","milestones_url":"https://api.github.com/repos/massiveart/husky/milestones{/number}","notifications_url":"https://api.github.com/repos/massiveart/husky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/massiveart/husky/labels{/name}","releases_url":"https://api.github.com/repos/massiveart/husky/releases{/id}","deployments_url":"https://api.github.com/repos/massiveart/husky/deployments","created_at":"2013-07-05T09:44:18Z","updated_at":"2016-01-12T15:33:41Z","pushed_at":"2016-03-31T12:12:06Z","git_url":"git://github.com/massiveart/husky.git","ssh_url":"git@github.com:massiveart/husky.git","clone_url":"https://github.com/massiveart/husky.git","svn_url":"https://github.com/massiveart/husky","homepage":null,"size":57767,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":89,"forks":3,"open_issues":89,"watchers":14,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/massiveart/husky/pulls/619"},"html":{"href":"https://github.com/massiveart/husky/pull/619"},"issue":{"href":"https://api.github.com/repos/massiveart/husky/issues/619"},"comments":{"href":"https://api.github.com/repos/massiveart/husky/issues/619/comments"},"review_comments":{"href":"https://api.github.com/repos/massiveart/husky/pulls/619/comments"},"review_comment":{"href":"https://api.github.com/repos/massiveart/husky/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/massiveart/husky/pulls/619/commits"},"statuses":{"href":"https://api.github.com/repos/massiveart/husky/statuses/f89aa9b54a96af70984975915109e137c7eef98f"}}}}