{"action":"opened","number":20230,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20230","id":183939461,"html_url":"https://github.com/joomla/joomla-cms/pull/20230","diff_url":"https://github.com/joomla/joomla-cms/pull/20230.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/20230.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20230","number":20230,"state":"open","locked":false,"title":"Make media field initialize itself when a new subform row is added","user":{"login":"okonomiyaki3000","id":79470,"avatar_url":"https://avatars3.githubusercontent.com/u/79470?v=4","gravatar_id":"","url":"https://api.github.com/users/okonomiyaki3000","html_url":"https://github.com/okonomiyaki3000","followers_url":"https://api.github.com/users/okonomiyaki3000/followers","following_url":"https://api.github.com/users/okonomiyaki3000/following{/other_user}","gists_url":"https://api.github.com/users/okonomiyaki3000/gists{/gist_id}","starred_url":"https://api.github.com/users/okonomiyaki3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonomiyaki3000/subscriptions","organizations_url":"https://api.github.com/users/okonomiyaki3000/orgs","repos_url":"https://api.github.com/users/okonomiyaki3000/repos","events_url":"https://api.github.com/users/okonomiyaki3000/events{/privacy}","received_events_url":"https://api.github.com/users/okonomiyaki3000/received_events","type":"User","site_admin":false},"body":"Pull Request for Issue # .\r\n\r\n### Summary of Changes\r\n\r\nSubform repeatable has a function `fixScripts` which calls a few js initialization functions on a few of the field types that require it. There is a now a better way to handle that kind of thing by having any field that may need initialization listen for an event fired by subform repeatable. In this PR, I am transferring responsibility of one such initialization from subform repeatable to the correct field type itself. \r\n\r\nNote: this PR doesn't really fix anything. the media field type already works with repeatable subforms. This just does it in a somewhat better way. \r\n\r\n### Testing Instructions\r\n\r\nSet up a subform containing a media field. There's a subform in the redirect plugin that's simple to use for this purpose. \r\n\r\nOpen up the form and create new rows. The media field in each new row should function properly. \r\n\r\n### Expected result\r\n\r\nMedia field functions normally.\r\n\r\n### Actual result\r\n\r\nMedia field functions normally.\r\n\r\n### Documentation Changes Required\r\n\r\nNone\r\n","created_at":"2018-04-25T06:54:16Z","updated_at":"2018-04-25T06:54:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20230/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20230/comments","review_comment_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20230/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/83f9b216799a36347b5a620aef3125616dc13945","head":{"label":"okonomiyaki3000:fix-subform-media","ref":"fix-subform-media","sha":"83f9b216799a36347b5a620aef3125616dc13945","user":{"login":"okonomiyaki3000","id":79470,"avatar_url":"https://avatars3.githubusercontent.com/u/79470?v=4","gravatar_id":"","url":"https://api.github.com/users/okonomiyaki3000","html_url":"https://github.com/okonomiyaki3000","followers_url":"https://api.github.com/users/okonomiyaki3000/followers","following_url":"https://api.github.com/users/okonomiyaki3000/following{/other_user}","gists_url":"https://api.github.com/users/okonomiyaki3000/gists{/gist_id}","starred_url":"https://api.github.com/users/okonomiyaki3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonomiyaki3000/subscriptions","organizations_url":"https://api.github.com/users/okonomiyaki3000/orgs","repos_url":"https://api.github.com/users/okonomiyaki3000/repos","events_url":"https://api.github.com/users/okonomiyaki3000/events{/privacy}","received_events_url":"https://api.github.com/users/okonomiyaki3000/received_events","type":"User","site_admin":false},"repo":{"id":2993364,"name":"joomla-cms","full_name":"okonomiyaki3000/joomla-cms","owner":{"login":"okonomiyaki3000","id":79470,"avatar_url":"https://avatars3.githubusercontent.com/u/79470?v=4","gravatar_id":"","url":"https://api.github.com/users/okonomiyaki3000","html_url":"https://github.com/okonomiyaki3000","followers_url":"https://api.github.com/users/okonomiyaki3000/followers","following_url":"https://api.github.com/users/okonomiyaki3000/following{/other_user}","gists_url":"https://api.github.com/users/okonomiyaki3000/gists{/gist_id}","starred_url":"https://api.github.com/users/okonomiyaki3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okonomiyaki3000/subscriptions","organizations_url":"https://api.github.com/users/okonomiyaki3000/orgs","repos_url":"https://api.github.com/users/okonomiyaki3000/repos","events_url":"https://api.github.com/users/okonomiyaki3000/events{/privacy}","received_events_url":"https://api.github.com/users/okonomiyaki3000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/okonomiyaki3000/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms","forks_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/forks","keys_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/teams","hooks_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/events","assignees_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/tags","blobs_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/subscription","commits_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/merges","archive_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/downloads","issues_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/okonomiyaki3000/joomla-cms/deployments","created_at":"2011-12-16T08:02:43Z","updated_at":"2014-06-26T07:50:04Z","pushed_at":"2018-04-25T06:41:40Z","git_url":"git://github.com/okonomiyaki3000/joomla-cms.git","ssh_url":"git@github.com:okonomiyaki3000/joomla-cms.git","clone_url":"https://github.com/okonomiyaki3000/joomla-cms.git","svn_url":"https://github.com/okonomiyaki3000/joomla-cms","homepage":"http://joomla.org","size":173126,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"joomla:staging","ref":"staging","sha":"49e681fc66ecdd76388fa9e9cb3a92986c075e69","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars3.githubusercontent.com/u/751633?v=4","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":2464908,"name":"joomla-cms","full_name":"joomla/joomla-cms","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars3.githubusercontent.com/u/751633?v=4","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/joomla-cms","description":"Home of the Joomla! Content Management System","fork":false,"url":"https://api.github.com/repos/joomla/joomla-cms","forks_url":"https://api.github.com/repos/joomla/joomla-cms/forks","keys_url":"https://api.github.com/repos/joomla/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/joomla-cms/teams","hooks_url":"https://api.github.com/repos/joomla/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/joomla-cms/events","assignees_url":"https://api.github.com/repos/joomla/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/joomla-cms/tags","blobs_url":"https://api.github.com/repos/joomla/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/joomla/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/joomla/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/joomla/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/joomla/joomla-cms/subscription","commits_url":"https://api.github.com/repos/joomla/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/joomla-cms/merges","archive_url":"https://api.github.com/repos/joomla/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/joomla-cms/downloads","issues_url":"https://api.github.com/repos/joomla/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/joomla/joomla-cms/releases{/id}","deployments_url":"https://api.github.com/repos/joomla/joomla-cms/deployments","created_at":"2011-09-27T02:07:38Z","updated_at":"2018-04-24T00:09:17Z","pushed_at":"2018-04-25T01:58:09Z","git_url":"git://github.com/joomla/joomla-cms.git","ssh_url":"git@github.com:joomla/joomla-cms.git","clone_url":"https://github.com/joomla/joomla-cms.git","svn_url":"https://github.com/joomla/joomla-cms","homepage":"https://www.joomla.org","size":228440,"stargazers_count":2722,"watchers_count":2722,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2680,"mirror_url":null,"archived":false,"open_issues_count":818,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":2680,"open_issues":818,"watchers":2722,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/20230"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/20230"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/20230"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/20230/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/20230/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/20230/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/83f9b216799a36347b5a620aef3125616dc13945"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":13,"deletions":10,"changed_files":4}}
{"actor":{"display_login":"okonomiyaki3000"}}