{"action":"created","comment":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/40794920","id":40794920,"diff_hunk":"@@ -0,0 +1,237 @@\n+/*!\n+ * jQuery UI Controlgroup @VERSION\n+ * http://jqueryui.com\n+ *\n+ * Copyright jQuery Foundation and other contributors\n+ * Released under the MIT license.\n+ * http://jquery.org/license\n+ */\n+\n+//>>label: Controlgroup\n+//>>group: Widgets\n+//>>description: Visually groups form control widgets\n+//>>docs: http://api.jqueryui.com/controlgroup/\n+//>>demos: http://jqueryui.com/controlgroup/\n+//>>css.structure: ../themes/base/core.css, ../themes/base/controlgroup.css\n+//>>css.theme: ../themes/base/theme.css\n+\n+( function( factory ) {\n+\tif ( typeof define === \"function\" && define.amd ) {\n+\n+\t\t// AMD. Register as an anonymous module.\n+\t\tdefine( [\n+\t\t\t\"jquery\",\n+\t\t\t\"../widget\"\n+\t\t], factory );\n+\t} else {\n+\n+\t\t// Browser globals\n+\t\tfactory( jQuery );\n+\t}\n+}( function( $ ) {\n+\n+return $.widget( \"ui.controlgroup\", {\n+\tversion: \"@VERSION\",\n+\tdefaultElement: \"<div>\",\n+\toptions: {\n+\t\tdirection: \"horizontal\",\n+\t\tdisabled: null,\n+\t\texcludeInvisible: true,\n+\t\titems: {\n+\t\t\t\"button\": \"input[type=button], input[type=submit], input[type=reset], button, a\",\n+\t\t\t\"controlgroupLabel\": \".ui-controlgroup-label\",\n+\t\t\t\"checkboxradio\": \"input[type='checkbox'], input[type='radio']\",\n+\t\t\t\"selectmenu\": \"select\",\n+\t\t\t\"spinner\": \".ui-spinner-input\"\n+\t\t}\n+\t},\n+\n+\t_create: function() {\n+\t\tthis._enhance();\n+\t},\n+\n+\t// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation\n+\t_enhance: function() {\n+\t\tthis.element.attr( \"role\", \"toolbar\" );\n+\t\tthis.refresh();\n+\t},\n+\n+\t_destroy: function() {\n+\t\tthis._callChildMethod( \"destroy\" );\n+\t\tthis.childWidgets.removeData( \"ui-controlgroup-data\" );\n+\t\tthis.element.removeAttr( \"role\" );\n+\t},\n+\n+\t_initWidgets: function() {\n+\t\tvar that = this,\n+\t\t\tchildWidgets = [];\n+\n+\t\t// First we iterate over each of the items options\n+\t\t$.each( this.options.items, function( widget, selector ) {\n+\t\t\tvar widgets, labels,\n+\t\t\t\toptions = {};\n+\n+\t\t\t// We assume everything is in the middle to start because we can't determine\n+\t\t\t// first / last elements until all enhancments are done.\n+\t\t\tif ( that[ \"_\" + widget + \"Options\" ] ) {\n+\t\t\t\toptions = that[ \"_\" + widget + \"Options\" ]( \"middle\" );\n+\t\t\t}\n+\n+\t\t\t// Make sure the widget actually exists and has a selector set\n+\t\t\tif ( $.fn[ widget ] && selector ) {\n+\n+\t\t\t\t// Find instances of this widget inside controlgroup init them\n+\t\t\t\twidgets = that.element.find( selector )[ widget ]( options );\n+\n+\t\t\t\twidgets.each( function() {\n+\t\t\t\t\tvar element = $( this );\n+\n+\t\t\t\t\t// Store an instance of the controlgroup to be able to refrence\n+\t\t\t\t\tvar widgetElement = element[ widget ]( \"widget\" );\n+\n+\t\t\t\t\twidgetElement.data(\n+\t\t\t\t\t\t\"ui-controlgroup-data\",\n+\t\t\t\t\t\telement.data( \"ui-\" + widget.charAt( 0 ).toUpperCase() + widget.slice( 1 ) )","path":"ui/widgets/controlgroup.js","position":94,"original_position":94,"commit_id":"6d0fdd9fee5f3b4d927f620a89a3e06bba7f1083","original_commit_id":"6d0fdd9fee5f3b4d927f620a89a3e06bba7f1083","user":{"login":"jzaefferer","id":52585,"avatar_url":"https://avatars.githubusercontent.com/u/52585?v=3","gravatar_id":"","url":"https://api.github.com/users/jzaefferer","html_url":"https://github.com/jzaefferer","followers_url":"https://api.github.com/users/jzaefferer/followers","following_url":"https://api.github.com/users/jzaefferer/following{/other_user}","gists_url":"https://api.github.com/users/jzaefferer/gists{/gist_id}","starred_url":"https://api.github.com/users/jzaefferer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jzaefferer/subscriptions","organizations_url":"https://api.github.com/users/jzaefferer/orgs","repos_url":"https://api.github.com/users/jzaefferer/repos","events_url":"https://api.github.com/users/jzaefferer/events{/privacy}","received_events_url":"https://api.github.com/users/jzaefferer/received_events","type":"User","site_admin":false},"body":"https://github.com/jquery/jquery-ui/commit/5d46121635333a87f0ed9153f2c609b47a678fee works fine, all tests pass","created_at":"2015-09-30T13:49:23Z","updated_at":"2015-09-30T13:49:23Z","html_url":"https://github.com/jquery/jquery-ui/pull/1513#discussion_r40794920","pull_request_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1513","_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments/40794920"},"html":{"href":"https://github.com/jquery/jquery-ui/pull/1513#discussion_r40794920"},"pull_request":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1513"}}},"pull_request":{"url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1513","id":31532936,"html_url":"https://github.com/jquery/jquery-ui/pull/1513","diff_url":"https://github.com/jquery/jquery-ui/pull/1513.diff","patch_url":"https://github.com/jquery/jquery-ui/pull/1513.patch","issue_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1513","number":1513,"state":"open","locked":false,"title":"Button Re-write","user":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"body":"Replaces #1415","created_at":"2015-03-19T15:16:16Z","updated_at":"2015-09-30T13:49:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ac354924a6be70ee60b7708ac1f144974eb0474","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1513/commits","review_comments_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/1513/comments","review_comment_url":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/issues/1513/comments","statuses_url":"https://api.github.com/repos/jquery/jquery-ui/statuses/6d0fdd9fee5f3b4d927f620a89a3e06bba7f1083","head":{"label":"arschmitz:button-fixup","ref":"button-fixup","sha":"6d0fdd9fee5f3b4d927f620a89a3e06bba7f1083","user":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"repo":{"id":4218107,"name":"jquery-ui","full_name":"arschmitz/jquery-ui","owner":{"login":"arschmitz","id":462993,"avatar_url":"https://avatars.githubusercontent.com/u/462993?v=3","gravatar_id":"","url":"https://api.github.com/users/arschmitz","html_url":"https://github.com/arschmitz","followers_url":"https://api.github.com/users/arschmitz/followers","following_url":"https://api.github.com/users/arschmitz/following{/other_user}","gists_url":"https://api.github.com/users/arschmitz/gists{/gist_id}","starred_url":"https://api.github.com/users/arschmitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arschmitz/subscriptions","organizations_url":"https://api.github.com/users/arschmitz/orgs","repos_url":"https://api.github.com/users/arschmitz/repos","events_url":"https://api.github.com/users/arschmitz/events{/privacy}","received_events_url":"https://api.github.com/users/arschmitz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arschmitz/jquery-ui","description":"The official jQuery user interface library.","fork":true,"url":"https://api.github.com/repos/arschmitz/jquery-ui","forks_url":"https://api.github.com/repos/arschmitz/jquery-ui/forks","keys_url":"https://api.github.com/repos/arschmitz/jquery-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arschmitz/jquery-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arschmitz/jquery-ui/teams","hooks_url":"https://api.github.com/repos/arschmitz/jquery-ui/hooks","issue_events_url":"https://api.github.com/repos/arschmitz/jquery-ui/issues/events{/number}","events_url":"https://api.github.com/repos/arschmitz/jquery-ui/events","assignees_url":"https://api.github.com/repos/arschmitz/jquery-ui/assignees{/user}","branches_url":"https://api.github.com/repos/arschmitz/jquery-ui/branches{/branch}","tags_url":"https://api.github.com/repos/arschmitz/jquery-ui/tags","blobs_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arschmitz/jquery-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/arschmitz/jquery-ui/languages","stargazers_url":"https://api.github.com/repos/arschmitz/jquery-ui/stargazers","contributors_url":"https://api.github.com/repos/arschmitz/jquery-ui/contributors","subscribers_url":"https://api.github.com/repos/arschmitz/jquery-ui/subscribers","subscription_url":"https://api.github.com/repos/arschmitz/jquery-ui/subscription","commits_url":"https://api.github.com/repos/arschmitz/jquery-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/arschmitz/jquery-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/arschmitz/jquery-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/arschmitz/jquery-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/arschmitz/jquery-ui/contents/{+path}","compare_url":"https://api.github.com/repos/arschmitz/jquery-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arschmitz/jquery-ui/merges","archive_url":"https://api.github.com/repos/arschmitz/jquery-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arschmitz/jquery-ui/downloads","issues_url":"https://api.github.com/repos/arschmitz/jquery-ui/issues{/number}","pulls_url":"https://api.github.com/repos/arschmitz/jquery-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/arschmitz/jquery-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/arschmitz/jquery-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arschmitz/jquery-ui/labels{/name}","releases_url":"https://api.github.com/repos/arschmitz/jquery-ui/releases{/id}","created_at":"2012-05-03T19:57:50Z","updated_at":"2015-01-15T14:40:40Z","pushed_at":"2015-09-16T05:56:46Z","git_url":"git://github.com/arschmitz/jquery-ui.git","ssh_url":"git@github.com:arschmitz/jquery-ui.git","clone_url":"https://github.com/arschmitz/jquery-ui.git","svn_url":"https://github.com/arschmitz/jquery-ui","homepage":"http://jqueryui.com/","size":27163,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"jquery:master","ref":"master","sha":"ffcb27c0c75f8f1bde21c7ff6456535bcfdae6dd","user":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"repo":{"id":478996,"name":"jquery-ui","full_name":"jquery/jquery-ui","owner":{"login":"jquery","id":70142,"avatar_url":"https://avatars.githubusercontent.com/u/70142?v=3","gravatar_id":"","url":"https://api.github.com/users/jquery","html_url":"https://github.com/jquery","followers_url":"https://api.github.com/users/jquery/followers","following_url":"https://api.github.com/users/jquery/following{/other_user}","gists_url":"https://api.github.com/users/jquery/gists{/gist_id}","starred_url":"https://api.github.com/users/jquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jquery/subscriptions","organizations_url":"https://api.github.com/users/jquery/orgs","repos_url":"https://api.github.com/users/jquery/repos","events_url":"https://api.github.com/users/jquery/events{/privacy}","received_events_url":"https://api.github.com/users/jquery/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jquery/jquery-ui","description":"The official jQuery user interface library.","fork":false,"url":"https://api.github.com/repos/jquery/jquery-ui","forks_url":"https://api.github.com/repos/jquery/jquery-ui/forks","keys_url":"https://api.github.com/repos/jquery/jquery-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jquery/jquery-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jquery/jquery-ui/teams","hooks_url":"https://api.github.com/repos/jquery/jquery-ui/hooks","issue_events_url":"https://api.github.com/repos/jquery/jquery-ui/issues/events{/number}","events_url":"https://api.github.com/repos/jquery/jquery-ui/events","assignees_url":"https://api.github.com/repos/jquery/jquery-ui/assignees{/user}","branches_url":"https://api.github.com/repos/jquery/jquery-ui/branches{/branch}","tags_url":"https://api.github.com/repos/jquery/jquery-ui/tags","blobs_url":"https://api.github.com/repos/jquery/jquery-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jquery/jquery-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jquery/jquery-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/jquery/jquery-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jquery/jquery-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/jquery/jquery-ui/languages","stargazers_url":"https://api.github.com/repos/jquery/jquery-ui/stargazers","contributors_url":"https://api.github.com/repos/jquery/jquery-ui/contributors","subscribers_url":"https://api.github.com/repos/jquery/jquery-ui/subscribers","subscription_url":"https://api.github.com/repos/jquery/jquery-ui/subscription","commits_url":"https://api.github.com/repos/jquery/jquery-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/jquery/jquery-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/jquery/jquery-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/jquery/jquery-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/jquery/jquery-ui/contents/{+path}","compare_url":"https://api.github.com/repos/jquery/jquery-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jquery/jquery-ui/merges","archive_url":"https://api.github.com/repos/jquery/jquery-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jquery/jquery-ui/downloads","issues_url":"https://api.github.com/repos/jquery/jquery-ui/issues{/number}","pulls_url":"https://api.github.com/repos/jquery/jquery-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/jquery/jquery-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/jquery/jquery-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jquery/jquery-ui/labels{/name}","releases_url":"https://api.github.com/repos/jquery/jquery-ui/releases{/id}","created_at":"2010-01-19T14:40:34Z","updated_at":"2015-09-30T13:31:29Z","pushed_at":"2015-09-30T13:26:51Z","git_url":"git://github.com/jquery/jquery-ui.git","ssh_url":"git@github.com:jquery/jquery-ui.git","clone_url":"https://github.com/jquery/jquery-ui.git","svn_url":"https://github.com/jquery/jquery-ui","homepage":"http://jqueryui.com/","size":49239,"stargazers_count":9118,"watchers_count":9118,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":3695,"mirror_url":null,"open_issues_count":29,"forks":3695,"open_issues":29,"watchers":9118,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1513"},"html":{"href":"https://github.com/jquery/jquery-ui/pull/1513"},"issue":{"href":"https://api.github.com/repos/jquery/jquery-ui/issues/1513"},"comments":{"href":"https://api.github.com/repos/jquery/jquery-ui/issues/1513/comments"},"review_comments":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1513/comments"},"review_comment":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jquery/jquery-ui/pulls/1513/commits"},"statuses":{"href":"https://api.github.com/repos/jquery/jquery-ui/statuses/6d0fdd9fee5f3b4d927f620a89a3e06bba7f1083"}}}}