{"action":"created","comment":{"url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/comments/30236539","id":30236539,"diff_hunk":"@@ -258,13 +264,52 @@\n     img.observe('click', this.removeItem.bindAsEventListener(this));\n     li.appendChild(span);\n     li.appendChild(hiddenInput);\n+    //Add the edit button\n+    if(this.inEditItemsMode($(this.list).up(0))){","path":"src/main/resources/XWiki/SuggestDisplay.xml","position":null,"original_position":50,"commit_id":"745ee8ce18cf4514cad25a8034d092fdb3b63ee3","original_commit_id":"df8e055bae3c2b7daef9e2611cbd65d44451a82e","user":{"login":"mouhb","id":3015046,"avatar_url":"https://avatars.githubusercontent.com/u/3015046?v=3","gravatar_id":"","url":"https://api.github.com/users/mouhb","html_url":"https://github.com/mouhb","followers_url":"https://api.github.com/users/mouhb/followers","following_url":"https://api.github.com/users/mouhb/following{/other_user}","gists_url":"https://api.github.com/users/mouhb/gists{/gist_id}","starred_url":"https://api.github.com/users/mouhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mouhb/subscriptions","organizations_url":"https://api.github.com/users/mouhb/orgs","repos_url":"https://api.github.com/users/mouhb/repos","events_url":"https://api.github.com/users/mouhb/events{/privacy}","received_events_url":"https://api.github.com/users/mouhb/received_events","type":"User","site_admin":false},"body":"The role of this method is to check if the 'edit items mode' is activated in the displayer-multiselect-suggest.\r\n\r\nThis method check if there is a hidden input that have a 'inEditItemsMode' css class in the html container that inclose the display-multiselect-suggest html code.\r\n\r\nThe inEditItemsMode method have a parameter (elem), this parameter is a DOM element that (if the edit mode is activated) contains the hidden input that indicates that the edit mode is activated.\r\n\r\nThe elem parameter is changing depending on the location where the method is called in the code.\r\n\r\nI think it should be more clear, I will try to improve it.","created_at":"2015-05-13T14:37:44Z","updated_at":"2015-05-13T14:37:44Z","html_url":"https://github.com/xwiki-contrib/displayer-multiselect-suggest/pull/1#discussion_r30236539","pull_request_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/comments/30236539"},"html":{"href":"https://github.com/xwiki-contrib/displayer-multiselect-suggest/pull/1#discussion_r30236539"},"pull_request":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/1","id":31027576,"html_url":"https://github.com/xwiki-contrib/displayer-multiselect-suggest/pull/1","diff_url":"https://github.com/xwiki-contrib/displayer-multiselect-suggest/pull/1.diff","patch_url":"https://github.com/xwiki-contrib/displayer-multiselect-suggest/pull/1.patch","issue_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/issues/1","number":1,"state":"open","locked":false,"title":"First version of the itemsEditable mode.","user":{"login":"mouhb","id":3015046,"avatar_url":"https://avatars.githubusercontent.com/u/3015046?v=3","gravatar_id":"","url":"https://api.github.com/users/mouhb","html_url":"https://github.com/mouhb","followers_url":"https://api.github.com/users/mouhb/followers","following_url":"https://api.github.com/users/mouhb/following{/other_user}","gists_url":"https://api.github.com/users/mouhb/gists{/gist_id}","starred_url":"https://api.github.com/users/mouhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mouhb/subscriptions","organizations_url":"https://api.github.com/users/mouhb/orgs","repos_url":"https://api.github.com/users/mouhb/repos","events_url":"https://api.github.com/users/mouhb/events{/privacy}","received_events_url":"https://api.github.com/users/mouhb/received_events","type":"User","site_admin":false},"body":"The itemsEditable mode allows you to create new items and edit selected items in the displayer-multiselect-suggest.\r\nThe edition or creation of items is done in popus.\r\n\r\nIn this PR I make the following modifications :\r\n* Add an edit button to the selected items ( add the editItem method in the XWiki.SuggestDisplay javascriptExtension).\r\n* Add a new entry button next to the displayer-multiselect-suggest input (add the insertNewEntryBt() method in the XWiki.SuggestDisplay javascriptExtension).\r\n* Modify the  velocity code of XWiki.SuggestDisplay document to integrate the ItemsEditable mode\r\n* Add a new document XWiki.SuggestDisplayEditItems that contains the whole code of the ItemsEditable mode.\r\n* Notice that the use of the ItemsEditable mode is on demande, then there is  no impact on the normal use of displayer-multiselect-suggest if the itemsEditable mode is not activated.","created_at":"2015-03-12T11:32:50Z","updated_at":"2015-05-13T14:37:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"38d14ccc2e7067066f5ebb653dc1c2d6c7fffcd5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/1/commits","review_comments_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/1/comments","review_comment_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/issues/1/comments","statuses_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/statuses/745ee8ce18cf4514cad25a8034d092fdb3b63ee3","head":{"label":"xwiki-labs:master","ref":"master","sha":"745ee8ce18cf4514cad25a8034d092fdb3b63ee3","user":{"login":"xwiki-labs","id":10711418,"avatar_url":"https://avatars.githubusercontent.com/u/10711418?v=3","gravatar_id":"","url":"https://api.github.com/users/xwiki-labs","html_url":"https://github.com/xwiki-labs","followers_url":"https://api.github.com/users/xwiki-labs/followers","following_url":"https://api.github.com/users/xwiki-labs/following{/other_user}","gists_url":"https://api.github.com/users/xwiki-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/xwiki-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwiki-labs/subscriptions","organizations_url":"https://api.github.com/users/xwiki-labs/orgs","repos_url":"https://api.github.com/users/xwiki-labs/repos","events_url":"https://api.github.com/users/xwiki-labs/events{/privacy}","received_events_url":"https://api.github.com/users/xwiki-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":32069866,"name":"displayer-multiselect-suggest","full_name":"xwiki-labs/displayer-multiselect-suggest","owner":{"login":"xwiki-labs","id":10711418,"avatar_url":"https://avatars.githubusercontent.com/u/10711418?v=3","gravatar_id":"","url":"https://api.github.com/users/xwiki-labs","html_url":"https://github.com/xwiki-labs","followers_url":"https://api.github.com/users/xwiki-labs/followers","following_url":"https://api.github.com/users/xwiki-labs/following{/other_user}","gists_url":"https://api.github.com/users/xwiki-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/xwiki-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwiki-labs/subscriptions","organizations_url":"https://api.github.com/users/xwiki-labs/orgs","repos_url":"https://api.github.com/users/xwiki-labs/repos","events_url":"https://api.github.com/users/xwiki-labs/events{/privacy}","received_events_url":"https://api.github.com/users/xwiki-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwiki-labs/displayer-multiselect-suggest","description":"A custom suggest displayer for DBList object properties which adapts the suggest feature to multiple selection.","fork":true,"url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest","forks_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/forks","keys_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/teams","hooks_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/hooks","issue_events_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/issues/events{/number}","events_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/events","assignees_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/assignees{/user}","branches_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/branches{/branch}","tags_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/tags","blobs_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/statuses/{sha}","languages_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/languages","stargazers_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/stargazers","contributors_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/contributors","subscribers_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/subscribers","subscription_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/subscription","commits_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/contents/{+path}","compare_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/merges","archive_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/downloads","issues_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/issues{/number}","pulls_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/pulls{/number}","milestones_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/milestones{/number}","notifications_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/labels{/name}","releases_url":"https://api.github.com/repos/xwiki-labs/displayer-multiselect-suggest/releases{/id}","created_at":"2015-03-12T09:59:37Z","updated_at":"2014-11-12T14:40:58Z","pushed_at":"2015-05-13T13:45:09Z","git_url":"git://github.com/xwiki-labs/displayer-multiselect-suggest.git","ssh_url":"git@github.com:xwiki-labs/displayer-multiselect-suggest.git","clone_url":"https://github.com/xwiki-labs/displayer-multiselect-suggest.git","svn_url":"https://github.com/xwiki-labs/displayer-multiselect-suggest","homepage":null,"size":174,"stargazers_count":0,"watchers_count":0,"language":null,"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":"xwiki-contrib:master","ref":"master","sha":"ceb7cf467e0fea500d2eb4617785c30bbb1c69ee","user":{"login":"xwiki-contrib","id":712013,"avatar_url":"https://avatars.githubusercontent.com/u/712013?v=3","gravatar_id":"","url":"https://api.github.com/users/xwiki-contrib","html_url":"https://github.com/xwiki-contrib","followers_url":"https://api.github.com/users/xwiki-contrib/followers","following_url":"https://api.github.com/users/xwiki-contrib/following{/other_user}","gists_url":"https://api.github.com/users/xwiki-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/xwiki-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwiki-contrib/subscriptions","organizations_url":"https://api.github.com/users/xwiki-contrib/orgs","repos_url":"https://api.github.com/users/xwiki-contrib/repos","events_url":"https://api.github.com/users/xwiki-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/xwiki-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":26540166,"name":"displayer-multiselect-suggest","full_name":"xwiki-contrib/displayer-multiselect-suggest","owner":{"login":"xwiki-contrib","id":712013,"avatar_url":"https://avatars.githubusercontent.com/u/712013?v=3","gravatar_id":"","url":"https://api.github.com/users/xwiki-contrib","html_url":"https://github.com/xwiki-contrib","followers_url":"https://api.github.com/users/xwiki-contrib/followers","following_url":"https://api.github.com/users/xwiki-contrib/following{/other_user}","gists_url":"https://api.github.com/users/xwiki-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/xwiki-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwiki-contrib/subscriptions","organizations_url":"https://api.github.com/users/xwiki-contrib/orgs","repos_url":"https://api.github.com/users/xwiki-contrib/repos","events_url":"https://api.github.com/users/xwiki-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/xwiki-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwiki-contrib/displayer-multiselect-suggest","description":"A custom suggest displayer for DBList object properties which adapts the suggest feature to multiple selection.","fork":false,"url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest","forks_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/forks","keys_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/teams","hooks_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/hooks","issue_events_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/issues/events{/number}","events_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/events","assignees_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/assignees{/user}","branches_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/branches{/branch}","tags_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/tags","blobs_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/statuses/{sha}","languages_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/languages","stargazers_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/stargazers","contributors_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/contributors","subscribers_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/subscribers","subscription_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/subscription","commits_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/contents/{+path}","compare_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/merges","archive_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/downloads","issues_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/issues{/number}","pulls_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls{/number}","milestones_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/milestones{/number}","notifications_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/labels{/name}","releases_url":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/releases{/id}","created_at":"2014-11-12T14:39:41Z","updated_at":"2014-11-12T14:40:58Z","pushed_at":"2015-05-13T13:45:09Z","git_url":"git://github.com/xwiki-contrib/displayer-multiselect-suggest.git","ssh_url":"git@github.com:xwiki-contrib/displayer-multiselect-suggest.git","clone_url":"https://github.com/xwiki-contrib/displayer-multiselect-suggest.git","svn_url":"https://github.com/xwiki-contrib/displayer-multiselect-suggest","homepage":null,"size":372,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/1"},"html":{"href":"https://github.com/xwiki-contrib/displayer-multiselect-suggest/pull/1"},"issue":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/issues/1"},"comments":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/xwiki-contrib/displayer-multiselect-suggest/statuses/745ee8ce18cf4514cad25a8034d092fdb3b63ee3"}}}}