{"action":"created","comment":{"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments/43366688","id":43366688,"diff_hunk":"@@ -67,14 +67,18 @@ YUI.add('ez-universaldiscoverybrowseview', function (Y) {\n         },\n \n         /**\n-         * `multipleChange` event handler. It sets the selected view\n-         * `addConfirmButton` flag according to the new `multiple` attribute value.\n+         * `multipleChange` and `isSelectableChange` events handler. It sets the selected view\n+         * `addConfirmButton` flag according to the new `multiple` attribute value and passes\n+         * new `isSelectable` function to the selected view.\n          *\n-         * @method _setSelectedViewConfirmButton\n+         * @method _setSelectedViewAttrs\n          * @protected\n          */\n-        _setSelectedViewConfirmButton: function () {\n-            this.get('selectedView').set('addConfirmButton', this.get('multiple'));\n+        _setSelectedViewAttrs: function () {\n+            this.get('selectedView').setAttrs({","path":"Resources/public/js/views/universaldiscovery/ez-universaldiscoverybrowseview.js","position":26,"original_position":26,"commit_id":"2e0e69fb638f9f42c570157f334ec40c9d25ee67","original_commit_id":"2e0e69fb638f9f42c570157f334ec40c9d25ee67","user":{"login":"dpobel","id":305563,"avatar_url":"https://avatars.githubusercontent.com/u/305563?v=3","gravatar_id":"","url":"https://api.github.com/users/dpobel","html_url":"https://github.com/dpobel","followers_url":"https://api.github.com/users/dpobel/followers","following_url":"https://api.github.com/users/dpobel/following{/other_user}","gists_url":"https://api.github.com/users/dpobel/gists{/gist_id}","starred_url":"https://api.github.com/users/dpobel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpobel/subscriptions","organizations_url":"https://api.github.com/users/dpobel/orgs","repos_url":"https://api.github.com/users/dpobel/repos","events_url":"https://api.github.com/users/dpobel/events{/privacy}","received_events_url":"https://api.github.com/users/dpobel/received_events","type":"User","site_admin":false},"body":"It's a bit weird to set 2 attributes when one changes, ie you should only set `addConfirmButton` when `multiple` changes and only set `isSelectable` when `isSelectable`changes.","created_at":"2015-10-29T10:01:27Z","updated_at":"2015-10-29T10:01:27Z","html_url":"https://github.com/ezsystems/PlatformUIBundle/pull/412#discussion_r43366688","pull_request_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/412","_links":{"self":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments/43366688"},"html":{"href":"https://github.com/ezsystems/PlatformUIBundle/pull/412#discussion_r43366688"},"pull_request":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/412"}}},"pull_request":{"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/412","id":48898492,"html_url":"https://github.com/ezsystems/PlatformUIBundle/pull/412","diff_url":"https://github.com/ezsystems/PlatformUIBundle/pull/412.diff","patch_url":"https://github.com/ezsystems/PlatformUIBundle/pull/412.patch","issue_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/412","number":412,"state":"open","locked":false,"title":"[WIP] EZP-24989: Restrict the possible selection made through the UDW","user":{"login":"mhyndle","id":8654481,"avatar_url":"https://avatars.githubusercontent.com/u/8654481?v=3","gravatar_id":"","url":"https://api.github.com/users/mhyndle","html_url":"https://github.com/mhyndle","followers_url":"https://api.github.com/users/mhyndle/followers","following_url":"https://api.github.com/users/mhyndle/following{/other_user}","gists_url":"https://api.github.com/users/mhyndle/gists{/gist_id}","starred_url":"https://api.github.com/users/mhyndle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhyndle/subscriptions","organizations_url":"https://api.github.com/users/mhyndle/orgs","repos_url":"https://api.github.com/users/mhyndle/repos","events_url":"https://api.github.com/users/mhyndle/events{/privacy}","received_events_url":"https://api.github.com/users/mhyndle/received_events","type":"User","site_admin":false},"body":"# Work In Progress\r\n\r\nJira: https://jira.ez.no/browse/EZP-24989\r\n\r\n## Description\r\nCurrently UDW allows to pick up any readable content. This PR allows developer to provide to `contentDiscover` event `isSelectable` function inside config object. `isSelectable` function should return bool value depending on that if content is selectable or not. `isSelectable` function receives selection struct:\r\n```javascript\r\n{\r\n  'contentInfo': eZ.ContentInfo,\r\n  'contentType': eZ.ContentType,\r\n  'location': eZ.Location\r\n}\r\n```\r\nSo basing on selection developer can decide if selected content is allowed for selection or not, for example if selected content is container.\r\nIf function return `FALSE` then content is not selectable.\r\n\r\n## Tasks\r\n- [x] implementation\r\n- [ ] fill jsdocs\r\n- [ ] tests\r\n - [x] manual\r\n - [ ] unit tests","created_at":"2015-10-27T16:46:32Z","updated_at":"2015-10-29T10:01:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90ef04cac661ca85c7563d4f71ed293032a56def","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/412/commits","review_comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/412/comments","review_comment_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/412/comments","statuses_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/2e0e69fb638f9f42c570157f334ec40c9d25ee67","head":{"label":"mhyndle:ezp-24989_restrict_possible_selection_in_udw","ref":"ezp-24989_restrict_possible_selection_in_udw","sha":"2e0e69fb638f9f42c570157f334ec40c9d25ee67","user":{"login":"mhyndle","id":8654481,"avatar_url":"https://avatars.githubusercontent.com/u/8654481?v=3","gravatar_id":"","url":"https://api.github.com/users/mhyndle","html_url":"https://github.com/mhyndle","followers_url":"https://api.github.com/users/mhyndle/followers","following_url":"https://api.github.com/users/mhyndle/following{/other_user}","gists_url":"https://api.github.com/users/mhyndle/gists{/gist_id}","starred_url":"https://api.github.com/users/mhyndle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhyndle/subscriptions","organizations_url":"https://api.github.com/users/mhyndle/orgs","repos_url":"https://api.github.com/users/mhyndle/repos","events_url":"https://api.github.com/users/mhyndle/events{/privacy}","received_events_url":"https://api.github.com/users/mhyndle/received_events","type":"User","site_admin":false},"repo":{"id":35097865,"name":"PlatformUIBundle","full_name":"mhyndle/PlatformUIBundle","owner":{"login":"mhyndle","id":8654481,"avatar_url":"https://avatars.githubusercontent.com/u/8654481?v=3","gravatar_id":"","url":"https://api.github.com/users/mhyndle","html_url":"https://github.com/mhyndle","followers_url":"https://api.github.com/users/mhyndle/followers","following_url":"https://api.github.com/users/mhyndle/following{/other_user}","gists_url":"https://api.github.com/users/mhyndle/gists{/gist_id}","starred_url":"https://api.github.com/users/mhyndle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhyndle/subscriptions","organizations_url":"https://api.github.com/users/mhyndle/orgs","repos_url":"https://api.github.com/users/mhyndle/repos","events_url":"https://api.github.com/users/mhyndle/events{/privacy}","received_events_url":"https://api.github.com/users/mhyndle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mhyndle/PlatformUIBundle","description":"","fork":true,"url":"https://api.github.com/repos/mhyndle/PlatformUIBundle","forks_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/forks","keys_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/teams","hooks_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/hooks","issue_events_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/issues/events{/number}","events_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/events","assignees_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/assignees{/user}","branches_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/branches{/branch}","tags_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/tags","blobs_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/languages","stargazers_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/stargazers","contributors_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/contributors","subscribers_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/subscribers","subscription_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/subscription","commits_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/contents/{+path}","compare_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/merges","archive_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/downloads","issues_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/issues{/number}","pulls_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/labels{/name}","releases_url":"https://api.github.com/repos/mhyndle/PlatformUIBundle/releases{/id}","created_at":"2015-05-05T12:29:16Z","updated_at":"2015-05-05T12:29:17Z","pushed_at":"2015-10-29T08:37:52Z","git_url":"git://github.com/mhyndle/PlatformUIBundle.git","ssh_url":"git@github.com:mhyndle/PlatformUIBundle.git","clone_url":"https://github.com/mhyndle/PlatformUIBundle.git","svn_url":"https://github.com/mhyndle/PlatformUIBundle","homepage":null,"size":4692,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ezsystems:master","ref":"master","sha":"538fc8ae015245ec775fd1f67f0ca54481cbc44e","user":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"repo":{"id":11221607,"name":"PlatformUIBundle","full_name":"ezsystems/PlatformUIBundle","owner":{"login":"ezsystems","id":295311,"avatar_url":"https://avatars.githubusercontent.com/u/295311?v=3","gravatar_id":"","url":"https://api.github.com/users/ezsystems","html_url":"https://github.com/ezsystems","followers_url":"https://api.github.com/users/ezsystems/followers","following_url":"https://api.github.com/users/ezsystems/following{/other_user}","gists_url":"https://api.github.com/users/ezsystems/gists{/gist_id}","starred_url":"https://api.github.com/users/ezsystems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezsystems/subscriptions","organizations_url":"https://api.github.com/users/ezsystems/orgs","repos_url":"https://api.github.com/users/ezsystems/repos","events_url":"https://api.github.com/users/ezsystems/events{/privacy}","received_events_url":"https://api.github.com/users/ezsystems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ezsystems/PlatformUIBundle","description":"","fork":false,"url":"https://api.github.com/repos/ezsystems/PlatformUIBundle","forks_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/forks","keys_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/teams","hooks_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/hooks","issue_events_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/events","assignees_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/tags","blobs_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/languages","stargazers_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/stargazers","contributors_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/contributors","subscribers_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/subscribers","subscription_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/subscription","commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/merges","archive_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/downloads","issues_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/labels{/name}","releases_url":"https://api.github.com/repos/ezsystems/PlatformUIBundle/releases{/id}","created_at":"2013-07-06T17:21:40Z","updated_at":"2015-10-20T13:19:23Z","pushed_at":"2015-10-29T08:50:19Z","git_url":"git://github.com/ezsystems/PlatformUIBundle.git","ssh_url":"git@github.com:ezsystems/PlatformUIBundle.git","clone_url":"https://github.com/ezsystems/PlatformUIBundle.git","svn_url":"https://github.com/ezsystems/PlatformUIBundle","homepage":"","size":11049,"stargazers_count":24,"watchers_count":24,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":12,"forks":22,"open_issues":12,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/412"},"html":{"href":"https://github.com/ezsystems/PlatformUIBundle/pull/412"},"issue":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/412"},"comments":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/issues/412/comments"},"review_comments":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/412/comments"},"review_comment":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/pulls/412/commits"},"statuses":{"href":"https://api.github.com/repos/ezsystems/PlatformUIBundle/statuses/2e0e69fb638f9f42c570157f334ec40c9d25ee67"}}}}