{"action":"created","issue":{"url":"https://api.github.com/repos/redaxo/redaxo/issues/631","repository_url":"https://api.github.com/repos/redaxo/redaxo","labels_url":"https://api.github.com/repos/redaxo/redaxo/issues/631/labels{/name}","comments_url":"https://api.github.com/repos/redaxo/redaxo/issues/631/comments","events_url":"https://api.github.com/repos/redaxo/redaxo/issues/631/events","html_url":"https://github.com/redaxo/redaxo/pull/631","id":137060063,"number":631,"title":"JS-Event für selectMedia()","user":{"login":"gharlan","id":330436,"avatar_url":"https://avatars.githubusercontent.com/u/330436?v=3","gravatar_id":"","url":"https://api.github.com/users/gharlan","html_url":"https://github.com/gharlan","followers_url":"https://api.github.com/users/gharlan/followers","following_url":"https://api.github.com/users/gharlan/following{/other_user}","gists_url":"https://api.github.com/users/gharlan/gists{/gist_id}","starred_url":"https://api.github.com/users/gharlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gharlan/subscriptions","organizations_url":"https://api.github.com/users/gharlan/orgs","repos_url":"https://api.github.com/users/gharlan/repos","events_url":"https://api.github.com/users/gharlan/events{/privacy}","received_events_url":"https://api.github.com/users/gharlan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/redaxo/redaxo/labels/Enhancement","name":"Enhancement","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/redaxo/redaxo/milestones/2","html_url":"https://github.com/redaxo/redaxo/milestones/REDAXO%205.1","labels_url":"https://api.github.com/repos/redaxo/redaxo/milestones/2/labels","id":1401989,"number":2,"title":"REDAXO 5.1","description":"","creator":{"login":"dergel","id":322951,"avatar_url":"https://avatars.githubusercontent.com/u/322951?v=3","gravatar_id":"","url":"https://api.github.com/users/dergel","html_url":"https://github.com/dergel","followers_url":"https://api.github.com/users/dergel/followers","following_url":"https://api.github.com/users/dergel/following{/other_user}","gists_url":"https://api.github.com/users/dergel/gists{/gist_id}","starred_url":"https://api.github.com/users/dergel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dergel/subscriptions","organizations_url":"https://api.github.com/users/dergel/orgs","repos_url":"https://api.github.com/users/dergel/repos","events_url":"https://api.github.com/users/dergel/events{/privacy}","received_events_url":"https://api.github.com/users/dergel/received_events","type":"User","site_admin":false},"open_issues":42,"closed_issues":10,"state":"open","created_at":"2015-11-09T12:07:00Z","updated_at":"2016-02-29T23:45:55Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2016-02-28T14:51:00Z","updated_at":"2016-03-01T08:18:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/redaxo/redaxo/pulls/631","html_url":"https://github.com/redaxo/redaxo/pull/631","diff_url":"https://github.com/redaxo/redaxo/pull/631.diff","patch_url":"https://github.com/redaxo/redaxo/pull/631.patch"},"body":"closes #445 \r\n\r\nWürde das so das Problem lösen?"},"comment":{"url":"https://api.github.com/repos/redaxo/redaxo/issues/comments/190608678","html_url":"https://github.com/redaxo/redaxo/pull/631#issuecomment-190608678","issue_url":"https://api.github.com/repos/redaxo/redaxo/issues/631","id":190608678,"user":{"login":"staabm","id":120441,"avatar_url":"https://avatars.githubusercontent.com/u/120441?v=3","gravatar_id":"","url":"https://api.github.com/users/staabm","html_url":"https://github.com/staabm","followers_url":"https://api.github.com/users/staabm/followers","following_url":"https://api.github.com/users/staabm/following{/other_user}","gists_url":"https://api.github.com/users/staabm/gists{/gist_id}","starred_url":"https://api.github.com/users/staabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/staabm/subscriptions","organizations_url":"https://api.github.com/users/staabm/orgs","repos_url":"https://api.github.com/users/staabm/repos","events_url":"https://api.github.com/users/staabm/events{/privacy}","received_events_url":"https://api.github.com/users/staabm/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T08:18:42Z","updated_at":"2016-03-01T08:18:42Z","body":"Ich verstehe aktuell nicht was die noch offenen Probleme sind.\r\n\r\nDas es nicht über den OUTPUT_FILTER gehen sollte, sind wir uns einig.\r\n\r\nIch denke es müsste so aussehen (wie oben textuell schonmal versucht zu beschreiben)\r\n```\r\nfunction selectMedia(filename, alt)\r\n{\r\n    var \r\n      opener_input_field = \"' . $opener_input_field . '\",\r\n      event = jQuery.Event( \"rex:selectMedia\" );\r\n\r\n    opener.jQuery(opener.document).trigger(event, [filename]\r\n    if (!event.isDefaultPrevented()) {\r\n      <?php\r\n      if ($opener_input_field != '') {\r\n          echo 'opener.document.getElementById(\"' . $opener_input_field . '\").value = filename;';\r\n      }\r\n      ?>\r\n      opener.$(opener.document).trigger('rex:selectMedia', [filename]);\r\n      self.close();\r\n    }\r\n}\r\n```\r\n\r\ndamit sollte doch alles passen, oder?"}}