{"action":"created","comment":{"url":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/comments/236212973","pull_request_review_id":178238262,"id":236212973,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNjIxMjk3Mw==","diff_hunk":"@@ -349,7 +390,32 @@ document.observe('xwiki:dom:loaded', function() {\n   if ($('documentsTrash')) {\n     $('documentsTrash').up('.hidden').removeClassName('hidden');\n   }\n-});</code>\n+});\n+\n+// we need to wait the complete display of the livetable to get the number of rows\n+document.observe('xwiki:livetable:displayComplete', function() {\n+  if ($('documentsTrash')) {\n+    var actionAllContainer = $('documentsTrash').getElementsBySelector('td.xwiki-livetable-display-header-filter:last-child')[0];\n+    var trashAllDisabled = (trashDocumentsLivetable.totalRows > 0) ? false : true;\n+\n+    // avoid to get multiple times the button\n+    if ($('trashAllDeleted')) {\n+      $('trashAllDeleted').remove();","path":"xwiki-platform-core/xwiki-platform-index/xwiki-platform-index-ui/src/main/resources/XWiki/DeletedDocuments.xml","position":72,"original_position":72,"commit_id":"621a84069601d37373c4999bfa5099f764dea228","original_commit_id":"621a84069601d37373c4999bfa5099f764dea228","user":{"login":"mflorea","id":652632,"node_id":"MDQ6VXNlcjY1MjYzMg==","avatar_url":"https://avatars2.githubusercontent.com/u/652632?v=4","gravatar_id":"","url":"https://api.github.com/users/mflorea","html_url":"https://github.com/mflorea","followers_url":"https://api.github.com/users/mflorea/followers","following_url":"https://api.github.com/users/mflorea/following{/other_user}","gists_url":"https://api.github.com/users/mflorea/gists{/gist_id}","starred_url":"https://api.github.com/users/mflorea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mflorea/subscriptions","organizations_url":"https://api.github.com/users/mflorea/orgs","repos_url":"https://api.github.com/users/mflorea/repos","events_url":"https://api.github.com/users/mflorea/events{/privacy}","received_events_url":"https://api.github.com/users/mflorea/received_events","type":"User","site_admin":false},"body":"So you need to update only the disabled state?","created_at":"2018-11-26T11:16:38Z","updated_at":"2018-11-26T11:16:38Z","html_url":"https://github.com/xwiki/xwiki-platform/pull/947#discussion_r236212973","pull_request_url":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/947","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/comments/236212973"},"html":{"href":"https://github.com/xwiki/xwiki-platform/pull/947#discussion_r236212973"},"pull_request":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/947"}},"in_reply_to_id":236181733},"pull_request":{"url":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/947","id":231111596,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMTExNTk2","html_url":"https://github.com/xwiki/xwiki-platform/pull/947","diff_url":"https://github.com/xwiki/xwiki-platform/pull/947.diff","patch_url":"https://github.com/xwiki/xwiki-platform/pull/947.patch","issue_url":"https://api.github.com/repos/xwiki/xwiki-platform/issues/947","number":947,"state":"open","locked":false,"title":"XWIKI-15880: Create a button to delete all from the recycle bin","user":{"login":"surli","id":1478232,"node_id":"MDQ6VXNlcjE0NzgyMzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1478232?v=4","gravatar_id":"","url":"https://api.github.com/users/surli","html_url":"https://github.com/surli","followers_url":"https://api.github.com/users/surli/followers","following_url":"https://api.github.com/users/surli/following{/other_user}","gists_url":"https://api.github.com/users/surli/gists{/gist_id}","starred_url":"https://api.github.com/users/surli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surli/subscriptions","organizations_url":"https://api.github.com/users/surli/orgs","repos_url":"https://api.github.com/users/surli/repos","events_url":"https://api.github.com/users/surli/events{/privacy}","received_events_url":"https://api.github.com/users/surli/received_events","type":"User","site_admin":false},"body":"## Issue\r\n\r\nhttps://jira.xwiki.org/browse/XWIKI-15880\r\n\r\n## Solution\r\n\r\n  * Add the button inside the livetable\r\n  * Wait for user confirmation\r\n  * Refresh the livetable once it's done\r\n\r\n## Limitations\r\n\r\n  * I only supported the button for the livetable, not for the \"noscript\" part of the view\r\n  * For now the confirmation message displayed is the same as for single document deletion","created_at":"2018-11-15T08:47:05Z","updated_at":"2018-11-26T11:16:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fda52a2e084401adb4417f91bc4452799a80b42b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/947/commits","review_comments_url":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/947/comments","review_comment_url":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xwiki/xwiki-platform/issues/947/comments","statuses_url":"https://api.github.com/repos/xwiki/xwiki-platform/statuses/621a84069601d37373c4999bfa5099f764dea228","head":{"label":"surli:XWIKI-15787-frontend","ref":"XWIKI-15787-frontend","sha":"621a84069601d37373c4999bfa5099f764dea228","user":{"login":"surli","id":1478232,"node_id":"MDQ6VXNlcjE0NzgyMzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1478232?v=4","gravatar_id":"","url":"https://api.github.com/users/surli","html_url":"https://github.com/surli","followers_url":"https://api.github.com/users/surli/followers","following_url":"https://api.github.com/users/surli/following{/other_user}","gists_url":"https://api.github.com/users/surli/gists{/gist_id}","starred_url":"https://api.github.com/users/surli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surli/subscriptions","organizations_url":"https://api.github.com/users/surli/orgs","repos_url":"https://api.github.com/users/surli/repos","events_url":"https://api.github.com/users/surli/events{/privacy}","received_events_url":"https://api.github.com/users/surli/received_events","type":"User","site_admin":false},"repo":{"id":142174930,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIxNzQ5MzA=","name":"xwiki-platform","full_name":"surli/xwiki-platform","private":false,"owner":{"login":"surli","id":1478232,"node_id":"MDQ6VXNlcjE0NzgyMzI=","avatar_url":"https://avatars2.githubusercontent.com/u/1478232?v=4","gravatar_id":"","url":"https://api.github.com/users/surli","html_url":"https://github.com/surli","followers_url":"https://api.github.com/users/surli/followers","following_url":"https://api.github.com/users/surli/following{/other_user}","gists_url":"https://api.github.com/users/surli/gists{/gist_id}","starred_url":"https://api.github.com/users/surli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/surli/subscriptions","organizations_url":"https://api.github.com/users/surli/orgs","repos_url":"https://api.github.com/users/surli/repos","events_url":"https://api.github.com/users/surli/events{/privacy}","received_events_url":"https://api.github.com/users/surli/received_events","type":"User","site_admin":false},"html_url":"https://github.com/surli/xwiki-platform","description":"The XWiki platform","fork":true,"url":"https://api.github.com/repos/surli/xwiki-platform","forks_url":"https://api.github.com/repos/surli/xwiki-platform/forks","keys_url":"https://api.github.com/repos/surli/xwiki-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/surli/xwiki-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/surli/xwiki-platform/teams","hooks_url":"https://api.github.com/repos/surli/xwiki-platform/hooks","issue_events_url":"https://api.github.com/repos/surli/xwiki-platform/issues/events{/number}","events_url":"https://api.github.com/repos/surli/xwiki-platform/events","assignees_url":"https://api.github.com/repos/surli/xwiki-platform/assignees{/user}","branches_url":"https://api.github.com/repos/surli/xwiki-platform/branches{/branch}","tags_url":"https://api.github.com/repos/surli/xwiki-platform/tags","blobs_url":"https://api.github.com/repos/surli/xwiki-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/surli/xwiki-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/surli/xwiki-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/surli/xwiki-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/surli/xwiki-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/surli/xwiki-platform/languages","stargazers_url":"https://api.github.com/repos/surli/xwiki-platform/stargazers","contributors_url":"https://api.github.com/repos/surli/xwiki-platform/contributors","subscribers_url":"https://api.github.com/repos/surli/xwiki-platform/subscribers","subscription_url":"https://api.github.com/repos/surli/xwiki-platform/subscription","commits_url":"https://api.github.com/repos/surli/xwiki-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/surli/xwiki-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/surli/xwiki-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/surli/xwiki-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/surli/xwiki-platform/contents/{+path}","compare_url":"https://api.github.com/repos/surli/xwiki-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/surli/xwiki-platform/merges","archive_url":"https://api.github.com/repos/surli/xwiki-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/surli/xwiki-platform/downloads","issues_url":"https://api.github.com/repos/surli/xwiki-platform/issues{/number}","pulls_url":"https://api.github.com/repos/surli/xwiki-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/surli/xwiki-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/surli/xwiki-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/surli/xwiki-platform/labels{/name}","releases_url":"https://api.github.com/repos/surli/xwiki-platform/releases{/id}","deployments_url":"https://api.github.com/repos/surli/xwiki-platform/deployments","created_at":"2018-07-24T15:03:25Z","updated_at":"2018-07-24T15:03:55Z","pushed_at":"2018-11-26T09:54:29Z","git_url":"git://github.com/surli/xwiki-platform.git","ssh_url":"git@github.com:surli/xwiki-platform.git","clone_url":"https://github.com/surli/xwiki-platform.git","svn_url":"https://github.com/surli/xwiki-platform","homepage":"http://platform.xwiki.org/","size":334709,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"xwiki:master","ref":"master","sha":"5eeb3a330bd848a8d214a4a69a1f2a738f83d684","user":{"login":"xwiki","id":488445,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4ODQ0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/488445?v=4","gravatar_id":"","url":"https://api.github.com/users/xwiki","html_url":"https://github.com/xwiki","followers_url":"https://api.github.com/users/xwiki/followers","following_url":"https://api.github.com/users/xwiki/following{/other_user}","gists_url":"https://api.github.com/users/xwiki/gists{/gist_id}","starred_url":"https://api.github.com/users/xwiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwiki/subscriptions","organizations_url":"https://api.github.com/users/xwiki/orgs","repos_url":"https://api.github.com/users/xwiki/repos","events_url":"https://api.github.com/users/xwiki/events{/privacy}","received_events_url":"https://api.github.com/users/xwiki/received_events","type":"Organization","site_admin":false},"repo":{"id":1463490,"node_id":"MDEwOlJlcG9zaXRvcnkxNDYzNDkw","name":"xwiki-platform","full_name":"xwiki/xwiki-platform","private":false,"owner":{"login":"xwiki","id":488445,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4ODQ0NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/488445?v=4","gravatar_id":"","url":"https://api.github.com/users/xwiki","html_url":"https://github.com/xwiki","followers_url":"https://api.github.com/users/xwiki/followers","following_url":"https://api.github.com/users/xwiki/following{/other_user}","gists_url":"https://api.github.com/users/xwiki/gists{/gist_id}","starred_url":"https://api.github.com/users/xwiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwiki/subscriptions","organizations_url":"https://api.github.com/users/xwiki/orgs","repos_url":"https://api.github.com/users/xwiki/repos","events_url":"https://api.github.com/users/xwiki/events{/privacy}","received_events_url":"https://api.github.com/users/xwiki/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/xwiki/xwiki-platform","description":"The XWiki platform","fork":false,"url":"https://api.github.com/repos/xwiki/xwiki-platform","forks_url":"https://api.github.com/repos/xwiki/xwiki-platform/forks","keys_url":"https://api.github.com/repos/xwiki/xwiki-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwiki/xwiki-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwiki/xwiki-platform/teams","hooks_url":"https://api.github.com/repos/xwiki/xwiki-platform/hooks","issue_events_url":"https://api.github.com/repos/xwiki/xwiki-platform/issues/events{/number}","events_url":"https://api.github.com/repos/xwiki/xwiki-platform/events","assignees_url":"https://api.github.com/repos/xwiki/xwiki-platform/assignees{/user}","branches_url":"https://api.github.com/repos/xwiki/xwiki-platform/branches{/branch}","tags_url":"https://api.github.com/repos/xwiki/xwiki-platform/tags","blobs_url":"https://api.github.com/repos/xwiki/xwiki-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwiki/xwiki-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwiki/xwiki-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwiki/xwiki-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwiki/xwiki-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/xwiki/xwiki-platform/languages","stargazers_url":"https://api.github.com/repos/xwiki/xwiki-platform/stargazers","contributors_url":"https://api.github.com/repos/xwiki/xwiki-platform/contributors","subscribers_url":"https://api.github.com/repos/xwiki/xwiki-platform/subscribers","subscription_url":"https://api.github.com/repos/xwiki/xwiki-platform/subscription","commits_url":"https://api.github.com/repos/xwiki/xwiki-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwiki/xwiki-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwiki/xwiki-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwiki/xwiki-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwiki/xwiki-platform/contents/{+path}","compare_url":"https://api.github.com/repos/xwiki/xwiki-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwiki/xwiki-platform/merges","archive_url":"https://api.github.com/repos/xwiki/xwiki-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwiki/xwiki-platform/downloads","issues_url":"https://api.github.com/repos/xwiki/xwiki-platform/issues{/number}","pulls_url":"https://api.github.com/repos/xwiki/xwiki-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/xwiki/xwiki-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/xwiki/xwiki-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwiki/xwiki-platform/labels{/name}","releases_url":"https://api.github.com/repos/xwiki/xwiki-platform/releases{/id}","deployments_url":"https://api.github.com/repos/xwiki/xwiki-platform/deployments","created_at":"2011-03-10T13:26:41Z","updated_at":"2018-11-26T11:09:12Z","pushed_at":"2018-11-26T11:09:23Z","git_url":"git://github.com/xwiki/xwiki-platform.git","ssh_url":"git@github.com:xwiki/xwiki-platform.git","clone_url":"https://github.com/xwiki/xwiki-platform.git","svn_url":"https://github.com/xwiki/xwiki-platform","homepage":"http://platform.xwiki.org/","size":337008,"stargazers_count":378,"watchers_count":378,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":287,"mirror_url":null,"archived":false,"open_issues_count":38,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1","node_id":"MDc6TGljZW5zZTEx"},"forks":287,"open_issues":38,"watchers":378,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/947"},"html":{"href":"https://github.com/xwiki/xwiki-platform/pull/947"},"issue":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/issues/947"},"comments":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/issues/947/comments"},"review_comments":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/947/comments"},"review_comment":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/pulls/947/commits"},"statuses":{"href":"https://api.github.com/repos/xwiki/xwiki-platform/statuses/621a84069601d37373c4999bfa5099f764dea228"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mflorea"}}