{"action":"created","comment":{"url":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/comments/68928862","id":68928862,"diff_hunk":"@@ -0,0 +1,68 @@\n+(function () {\n+    /**\n+     * DOM ready\n+     *\n+     * @function ready\n+     * @param {Function} fn callback\n+     * @returns {void}\n+     */\n+    function ready(fn) {\n+        if (document.readyState === 'loading') {\n+            document.addEventListener('DOMContentLoaded', fn);\n+        } else {\n+            fn();\n+        }\n+    }\n+\n+    /**\n+     * Creates arrays out of array-like collections\n+     *\n+     * @function arrayFrom\n+     * @param {NodeList|HTMLElementsCollection} arrayLike\n+     * @returns {Array}\n+     */\n+    function arrayFrom(arrayLike) {\n+        return [].slice.call(arrayLike);\n+    }\n+\n+    /**\n+     * Finds related widget wrapper divs\n+     *\n+     * @function getRelatedWidgetWrappers\n+     * @returns {Array<Element>}\n+     */\n+    function getRelatedWidgetWrappers() {\n+        var relatedWidgetWrapperLinks = document.getElementsByClassName('related-widget-wrapper');\n+\n+        return arrayFrom(relatedWidgetWrapperLinks).map(function (link) {\n+            return link;\n+        }).filter(function (item) {\n+            return !!item;\n+        });\n+    }\n+\n+    /**\n+     * counts links and adds related class to updates select width\n+     *\n+     * @function addsClassNames\n+     */\n+    function addsClassNames() {\n+        var relatedWidgetWrappers = getRelatedWidgetWrappers();\n+\n+        relatedWidgetWrappers.forEach(function (wrapper) {\n+            var links = wrapper.getElementsByClassName('related-widget-wrapper-link');\n+\n+            if (links.length === 1) {\n+               wrapper.classList.add('widget-wrapper-links-1');\n+            } else if (links.length === 2) {\n+                wrapper.classList.add('widget-wrapper-links-2');\n+            } else {","path":"djangocms_admin_style/static/djangocms_admin_style/js/related-widget-wrapper.js","position":59,"original_position":59,"commit_id":"c338e157bd01bce4bff3cde899645510b3a4c4a5","original_commit_id":"c338e157bd01bce4bff3cde899645510b3a4c4a5","user":{"login":"vxsx","id":366813,"avatar_url":"https://avatars.githubusercontent.com/u/366813?v=3","gravatar_id":"","url":"https://api.github.com/users/vxsx","html_url":"https://github.com/vxsx","followers_url":"https://api.github.com/users/vxsx/followers","following_url":"https://api.github.com/users/vxsx/following{/other_user}","gists_url":"https://api.github.com/users/vxsx/gists{/gist_id}","starred_url":"https://api.github.com/users/vxsx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vxsx/subscriptions","organizations_url":"https://api.github.com/users/vxsx/orgs","repos_url":"https://api.github.com/users/vxsx/repos","events_url":"https://api.github.com/users/vxsx/events{/privacy}","received_events_url":"https://api.github.com/users/vxsx/received_events","type":"User","site_admin":false},"body":"can there be more?)","created_at":"2016-06-29T11:18:13Z","updated_at":"2016-06-29T11:18:13Z","html_url":"https://github.com/divio/djangocms-admin-style/pull/362#discussion_r68928862","pull_request_url":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/362","_links":{"self":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/comments/68928862"},"html":{"href":"https://github.com/divio/djangocms-admin-style/pull/362#discussion_r68928862"},"pull_request":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/362"}}},"pull_request":{"url":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/362","id":75623336,"html_url":"https://github.com/divio/djangocms-admin-style/pull/362","diff_url":"https://github.com/divio/djangocms-admin-style/pull/362.diff","patch_url":"https://github.com/divio/djangocms-admin-style/pull/362.patch","issue_url":"https://api.github.com/repos/divio/djangocms-admin-style/issues/362","number":362,"state":"open","locked":false,"title":"related widget wrapper select width depending on amount of links","user":{"login":"lory87","id":2270884,"avatar_url":"https://avatars.githubusercontent.com/u/2270884?v=3","gravatar_id":"","url":"https://api.github.com/users/lory87","html_url":"https://github.com/lory87","followers_url":"https://api.github.com/users/lory87/followers","following_url":"https://api.github.com/users/lory87/following{/other_user}","gists_url":"https://api.github.com/users/lory87/gists{/gist_id}","starred_url":"https://api.github.com/users/lory87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lory87/subscriptions","organizations_url":"https://api.github.com/users/lory87/orgs","repos_url":"https://api.github.com/users/lory87/repos","events_url":"https://api.github.com/users/lory87/events{/privacy}","received_events_url":"https://api.github.com/users/lory87/received_events","type":"User","site_admin":false},"body":"**This pull request fixes the following issues**:\r\n\r\n- it was not possible to solve this issue by css\r\n\r\n|1 link | 2 links | 3 links |\r\n|---|---|---|\r\n|![screen shot 2016-06-29 at 12 11 22](https://cloud.githubusercontent.com/assets/2270884/16448862/0dccc5aa-3df4-11e6-951f-9c3f498c6ce1.png)|![screen shot 2016-06-29 at 12 10 32](https://cloud.githubusercontent.com/assets/2270884/16448876/243ebd34-3df4-11e6-865c-5cbcd6d6fda7.png)|![screen shot 2016-06-29 at 12 11 08](https://cloud.githubusercontent.com/assets/2270884/16448879/284c0490-3df4-11e6-9820-640bc1ff7f36.png)|\r\n\r\n\r\n","created_at":"2016-06-29T10:22:47Z","updated_at":"2016-06-29T11:18:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecae143ac808dea77015277c05c62fef63ab6a08","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/362/commits","review_comments_url":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/362/comments","review_comment_url":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/comments{/number}","comments_url":"https://api.github.com/repos/divio/djangocms-admin-style/issues/362/comments","statuses_url":"https://api.github.com/repos/divio/djangocms-admin-style/statuses/c338e157bd01bce4bff3cde899645510b3a4c4a5","head":{"label":"divio:bugfix/related-widget-wrapper-select-width","ref":"bugfix/related-widget-wrapper-select-width","sha":"c338e157bd01bce4bff3cde899645510b3a4c4a5","user":{"login":"divio","id":117904,"avatar_url":"https://avatars.githubusercontent.com/u/117904?v=3","gravatar_id":"","url":"https://api.github.com/users/divio","html_url":"https://github.com/divio","followers_url":"https://api.github.com/users/divio/followers","following_url":"https://api.github.com/users/divio/following{/other_user}","gists_url":"https://api.github.com/users/divio/gists{/gist_id}","starred_url":"https://api.github.com/users/divio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divio/subscriptions","organizations_url":"https://api.github.com/users/divio/orgs","repos_url":"https://api.github.com/users/divio/repos","events_url":"https://api.github.com/users/divio/events{/privacy}","received_events_url":"https://api.github.com/users/divio/received_events","type":"Organization","site_admin":false},"repo":{"id":6440559,"name":"djangocms-admin-style","full_name":"divio/djangocms-admin-style","owner":{"login":"divio","id":117904,"avatar_url":"https://avatars.githubusercontent.com/u/117904?v=3","gravatar_id":"","url":"https://api.github.com/users/divio","html_url":"https://github.com/divio","followers_url":"https://api.github.com/users/divio/followers","following_url":"https://api.github.com/users/divio/following{/other_user}","gists_url":"https://api.github.com/users/divio/gists{/gist_id}","starred_url":"https://api.github.com/users/divio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divio/subscriptions","organizations_url":"https://api.github.com/users/divio/orgs","repos_url":"https://api.github.com/users/divio/repos","events_url":"https://api.github.com/users/divio/events{/privacy}","received_events_url":"https://api.github.com/users/divio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/divio/djangocms-admin-style","description":"Adds pretty CSS styles for the django CMS admin interface.","fork":false,"url":"https://api.github.com/repos/divio/djangocms-admin-style","forks_url":"https://api.github.com/repos/divio/djangocms-admin-style/forks","keys_url":"https://api.github.com/repos/divio/djangocms-admin-style/keys{/key_id}","collaborators_url":"https://api.github.com/repos/divio/djangocms-admin-style/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/divio/djangocms-admin-style/teams","hooks_url":"https://api.github.com/repos/divio/djangocms-admin-style/hooks","issue_events_url":"https://api.github.com/repos/divio/djangocms-admin-style/issues/events{/number}","events_url":"https://api.github.com/repos/divio/djangocms-admin-style/events","assignees_url":"https://api.github.com/repos/divio/djangocms-admin-style/assignees{/user}","branches_url":"https://api.github.com/repos/divio/djangocms-admin-style/branches{/branch}","tags_url":"https://api.github.com/repos/divio/djangocms-admin-style/tags","blobs_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/refs{/sha}","trees_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/trees{/sha}","statuses_url":"https://api.github.com/repos/divio/djangocms-admin-style/statuses/{sha}","languages_url":"https://api.github.com/repos/divio/djangocms-admin-style/languages","stargazers_url":"https://api.github.com/repos/divio/djangocms-admin-style/stargazers","contributors_url":"https://api.github.com/repos/divio/djangocms-admin-style/contributors","subscribers_url":"https://api.github.com/repos/divio/djangocms-admin-style/subscribers","subscription_url":"https://api.github.com/repos/divio/djangocms-admin-style/subscription","commits_url":"https://api.github.com/repos/divio/djangocms-admin-style/commits{/sha}","git_commits_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/commits{/sha}","comments_url":"https://api.github.com/repos/divio/djangocms-admin-style/comments{/number}","issue_comment_url":"https://api.github.com/repos/divio/djangocms-admin-style/issues/comments{/number}","contents_url":"https://api.github.com/repos/divio/djangocms-admin-style/contents/{+path}","compare_url":"https://api.github.com/repos/divio/djangocms-admin-style/compare/{base}...{head}","merges_url":"https://api.github.com/repos/divio/djangocms-admin-style/merges","archive_url":"https://api.github.com/repos/divio/djangocms-admin-style/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/divio/djangocms-admin-style/downloads","issues_url":"https://api.github.com/repos/divio/djangocms-admin-style/issues{/number}","pulls_url":"https://api.github.com/repos/divio/djangocms-admin-style/pulls{/number}","milestones_url":"https://api.github.com/repos/divio/djangocms-admin-style/milestones{/number}","notifications_url":"https://api.github.com/repos/divio/djangocms-admin-style/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/divio/djangocms-admin-style/labels{/name}","releases_url":"https://api.github.com/repos/divio/djangocms-admin-style/releases{/id}","deployments_url":"https://api.github.com/repos/divio/djangocms-admin-style/deployments","created_at":"2012-10-29T12:59:23Z","updated_at":"2016-06-28T17:31:49Z","pushed_at":"2016-06-29T10:22:47Z","git_url":"git://github.com/divio/djangocms-admin-style.git","ssh_url":"git@github.com:divio/djangocms-admin-style.git","clone_url":"https://github.com/divio/djangocms-admin-style.git","svn_url":"https://github.com/divio/djangocms-admin-style","homepage":null,"size":6281,"stargazers_count":172,"watchers_count":172,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":5,"forks":57,"open_issues":5,"watchers":172,"default_branch":"master"}},"base":{"label":"divio:master","ref":"master","sha":"de76b1a42cb30d7ea09d104d5c2acfff902e1468","user":{"login":"divio","id":117904,"avatar_url":"https://avatars.githubusercontent.com/u/117904?v=3","gravatar_id":"","url":"https://api.github.com/users/divio","html_url":"https://github.com/divio","followers_url":"https://api.github.com/users/divio/followers","following_url":"https://api.github.com/users/divio/following{/other_user}","gists_url":"https://api.github.com/users/divio/gists{/gist_id}","starred_url":"https://api.github.com/users/divio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divio/subscriptions","organizations_url":"https://api.github.com/users/divio/orgs","repos_url":"https://api.github.com/users/divio/repos","events_url":"https://api.github.com/users/divio/events{/privacy}","received_events_url":"https://api.github.com/users/divio/received_events","type":"Organization","site_admin":false},"repo":{"id":6440559,"name":"djangocms-admin-style","full_name":"divio/djangocms-admin-style","owner":{"login":"divio","id":117904,"avatar_url":"https://avatars.githubusercontent.com/u/117904?v=3","gravatar_id":"","url":"https://api.github.com/users/divio","html_url":"https://github.com/divio","followers_url":"https://api.github.com/users/divio/followers","following_url":"https://api.github.com/users/divio/following{/other_user}","gists_url":"https://api.github.com/users/divio/gists{/gist_id}","starred_url":"https://api.github.com/users/divio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divio/subscriptions","organizations_url":"https://api.github.com/users/divio/orgs","repos_url":"https://api.github.com/users/divio/repos","events_url":"https://api.github.com/users/divio/events{/privacy}","received_events_url":"https://api.github.com/users/divio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/divio/djangocms-admin-style","description":"Adds pretty CSS styles for the django CMS admin interface.","fork":false,"url":"https://api.github.com/repos/divio/djangocms-admin-style","forks_url":"https://api.github.com/repos/divio/djangocms-admin-style/forks","keys_url":"https://api.github.com/repos/divio/djangocms-admin-style/keys{/key_id}","collaborators_url":"https://api.github.com/repos/divio/djangocms-admin-style/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/divio/djangocms-admin-style/teams","hooks_url":"https://api.github.com/repos/divio/djangocms-admin-style/hooks","issue_events_url":"https://api.github.com/repos/divio/djangocms-admin-style/issues/events{/number}","events_url":"https://api.github.com/repos/divio/djangocms-admin-style/events","assignees_url":"https://api.github.com/repos/divio/djangocms-admin-style/assignees{/user}","branches_url":"https://api.github.com/repos/divio/djangocms-admin-style/branches{/branch}","tags_url":"https://api.github.com/repos/divio/djangocms-admin-style/tags","blobs_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/refs{/sha}","trees_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/trees{/sha}","statuses_url":"https://api.github.com/repos/divio/djangocms-admin-style/statuses/{sha}","languages_url":"https://api.github.com/repos/divio/djangocms-admin-style/languages","stargazers_url":"https://api.github.com/repos/divio/djangocms-admin-style/stargazers","contributors_url":"https://api.github.com/repos/divio/djangocms-admin-style/contributors","subscribers_url":"https://api.github.com/repos/divio/djangocms-admin-style/subscribers","subscription_url":"https://api.github.com/repos/divio/djangocms-admin-style/subscription","commits_url":"https://api.github.com/repos/divio/djangocms-admin-style/commits{/sha}","git_commits_url":"https://api.github.com/repos/divio/djangocms-admin-style/git/commits{/sha}","comments_url":"https://api.github.com/repos/divio/djangocms-admin-style/comments{/number}","issue_comment_url":"https://api.github.com/repos/divio/djangocms-admin-style/issues/comments{/number}","contents_url":"https://api.github.com/repos/divio/djangocms-admin-style/contents/{+path}","compare_url":"https://api.github.com/repos/divio/djangocms-admin-style/compare/{base}...{head}","merges_url":"https://api.github.com/repos/divio/djangocms-admin-style/merges","archive_url":"https://api.github.com/repos/divio/djangocms-admin-style/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/divio/djangocms-admin-style/downloads","issues_url":"https://api.github.com/repos/divio/djangocms-admin-style/issues{/number}","pulls_url":"https://api.github.com/repos/divio/djangocms-admin-style/pulls{/number}","milestones_url":"https://api.github.com/repos/divio/djangocms-admin-style/milestones{/number}","notifications_url":"https://api.github.com/repos/divio/djangocms-admin-style/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/divio/djangocms-admin-style/labels{/name}","releases_url":"https://api.github.com/repos/divio/djangocms-admin-style/releases{/id}","deployments_url":"https://api.github.com/repos/divio/djangocms-admin-style/deployments","created_at":"2012-10-29T12:59:23Z","updated_at":"2016-06-28T17:31:49Z","pushed_at":"2016-06-29T10:22:47Z","git_url":"git://github.com/divio/djangocms-admin-style.git","ssh_url":"git@github.com:divio/djangocms-admin-style.git","clone_url":"https://github.com/divio/djangocms-admin-style.git","svn_url":"https://github.com/divio/djangocms-admin-style","homepage":null,"size":6281,"stargazers_count":172,"watchers_count":172,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":57,"mirror_url":null,"open_issues_count":5,"forks":57,"open_issues":5,"watchers":172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/362"},"html":{"href":"https://github.com/divio/djangocms-admin-style/pull/362"},"issue":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/issues/362"},"comments":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/issues/362/comments"},"review_comments":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/362/comments"},"review_comment":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/pulls/362/commits"},"statuses":{"href":"https://api.github.com/repos/divio/djangocms-admin-style/statuses/c338e157bd01bce4bff3cde899645510b3a4c4a5"}}}}
{"actor":{"display_login":"vxsx"}}