{"action":"created","comment":{"url":"https://api.github.com/repos/mozfr/transvision/pulls/comments/44760056","id":44760056,"diff_hunk":"@@ -125,6 +125,20 @@\n   </div>\n \n   <script src=\"/assets/jquery/jquery.min.js?v=<?= VERSION ?>\"></script>\n+  <script src=\"/assets/clipboard.js/clipboard.js-built.js?v=<?= VERSION ?>\"></script>\n+  <script>\n+     var clipboard = new Clipboard('.clipboard');\n+     clipboard.on('success', function(e) {\n+            e.trigger.setAttribute('data-title', 'Translation copied!');\n+            e.trigger.setAttribute('class', 'clipboard tooltip');\n+            setTimeout(function(arg1) {\n+                arg1.trigger.setAttribute('class', 'clipboard')\n+            }, 500, e);\n+            e.clearSelection();\n+        }\n+    );\n+ </script>","path":"app/views/templates/base.php","position":16,"original_position":16,"commit_id":"338f7474151e6da988b33dd579f8ca90a3ee29f3","original_commit_id":"338f7474151e6da988b33dd579f8ca90a3ee29f3","user":{"login":"flodolo","id":3644868,"avatar_url":"https://avatars.githubusercontent.com/u/3644868?v=3","gravatar_id":"","url":"https://api.github.com/users/flodolo","html_url":"https://github.com/flodolo","followers_url":"https://api.github.com/users/flodolo/followers","following_url":"https://api.github.com/users/flodolo/following{/other_user}","gists_url":"https://api.github.com/users/flodolo/gists{/gist_id}","starred_url":"https://api.github.com/users/flodolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flodolo/subscriptions","organizations_url":"https://api.github.com/users/flodolo/orgs","repos_url":"https://api.github.com/users/flodolo/repos","events_url":"https://api.github.com/users/flodolo/events{/privacy}","received_events_url":"https://api.github.com/users/flodolo/received_events","type":"User","site_admin":false},"body":"Can we move this to ```assets/base.js```? The idea would be to not have JavaScript code inside .php files, unless unavoidable (like at the end of the template, where PHP is needed to create the code dynamically).","created_at":"2015-11-13T08:39:11Z","updated_at":"2015-11-13T08:39:11Z","html_url":"https://github.com/mozfr/transvision/pull/534#discussion_r44760056","pull_request_url":"https://api.github.com/repos/mozfr/transvision/pulls/534","_links":{"self":{"href":"https://api.github.com/repos/mozfr/transvision/pulls/comments/44760056"},"html":{"href":"https://github.com/mozfr/transvision/pull/534#discussion_r44760056"},"pull_request":{"href":"https://api.github.com/repos/mozfr/transvision/pulls/534"}}},"pull_request":{"url":"https://api.github.com/repos/mozfr/transvision/pulls/534","id":50596072,"html_url":"https://github.com/mozfr/transvision/pull/534","diff_url":"https://github.com/mozfr/transvision/pull/534.diff","patch_url":"https://github.com/mozfr/transvision/pull/534.patch","issue_url":"https://api.github.com/repos/mozfr/transvision/issues/534","number":534,"state":"open","locked":false,"title":"Issue # 520: add a \"copy to clipboard\" button near to locale translation","user":{"login":"pascalchevrel","id":454375,"avatar_url":"https://avatars.githubusercontent.com/u/454375?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalchevrel","html_url":"https://github.com/pascalchevrel","followers_url":"https://api.github.com/users/pascalchevrel/followers","following_url":"https://api.github.com/users/pascalchevrel/following{/other_user}","gists_url":"https://api.github.com/users/pascalchevrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalchevrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalchevrel/subscriptions","organizations_url":"https://api.github.com/users/pascalchevrel/orgs","repos_url":"https://api.github.com/users/pascalchevrel/repos","events_url":"https://api.github.com/users/pascalchevrel/events{/privacy}","received_events_url":"https://api.github.com/users/pascalchevrel/received_events","type":"User","site_admin":false},"body":"* add clipboard.js as a dependency through composer\r\n* use unicode scissors character for copy\r\n* add styles for feedback message inserting a 'Translation copied!\" message\r\n* works in 2 or 3 locales search views\r\n* js included in the base template as I think it may be useful in other views in the future","created_at":"2015-11-13T02:06:50Z","updated_at":"2015-11-13T08:39:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6f4b3a8b993b999a6183e5c20d398c79809656e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozfr/transvision/pulls/534/commits","review_comments_url":"https://api.github.com/repos/mozfr/transvision/pulls/534/comments","review_comment_url":"https://api.github.com/repos/mozfr/transvision/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozfr/transvision/issues/534/comments","statuses_url":"https://api.github.com/repos/mozfr/transvision/statuses/338f7474151e6da988b33dd579f8ca90a3ee29f3","head":{"label":"pascalchevrel:issue520-copy_to_clipboard","ref":"issue520-copy_to_clipboard","sha":"338f7474151e6da988b33dd579f8ca90a3ee29f3","user":{"login":"pascalchevrel","id":454375,"avatar_url":"https://avatars.githubusercontent.com/u/454375?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalchevrel","html_url":"https://github.com/pascalchevrel","followers_url":"https://api.github.com/users/pascalchevrel/followers","following_url":"https://api.github.com/users/pascalchevrel/following{/other_user}","gists_url":"https://api.github.com/users/pascalchevrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalchevrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalchevrel/subscriptions","organizations_url":"https://api.github.com/users/pascalchevrel/orgs","repos_url":"https://api.github.com/users/pascalchevrel/repos","events_url":"https://api.github.com/users/pascalchevrel/events{/privacy}","received_events_url":"https://api.github.com/users/pascalchevrel/received_events","type":"User","site_admin":false},"repo":{"id":21368860,"name":"transvision","full_name":"pascalchevrel/transvision","owner":{"login":"pascalchevrel","id":454375,"avatar_url":"https://avatars.githubusercontent.com/u/454375?v=3","gravatar_id":"","url":"https://api.github.com/users/pascalchevrel","html_url":"https://github.com/pascalchevrel","followers_url":"https://api.github.com/users/pascalchevrel/followers","following_url":"https://api.github.com/users/pascalchevrel/following{/other_user}","gists_url":"https://api.github.com/users/pascalchevrel/gists{/gist_id}","starred_url":"https://api.github.com/users/pascalchevrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pascalchevrel/subscriptions","organizations_url":"https://api.github.com/users/pascalchevrel/orgs","repos_url":"https://api.github.com/users/pascalchevrel/repos","events_url":"https://api.github.com/users/pascalchevrel/events{/privacy}","received_events_url":"https://api.github.com/users/pascalchevrel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pascalchevrel/transvision","description":"QA tool for Mozilla product localizers","fork":true,"url":"https://api.github.com/repos/pascalchevrel/transvision","forks_url":"https://api.github.com/repos/pascalchevrel/transvision/forks","keys_url":"https://api.github.com/repos/pascalchevrel/transvision/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pascalchevrel/transvision/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pascalchevrel/transvision/teams","hooks_url":"https://api.github.com/repos/pascalchevrel/transvision/hooks","issue_events_url":"https://api.github.com/repos/pascalchevrel/transvision/issues/events{/number}","events_url":"https://api.github.com/repos/pascalchevrel/transvision/events","assignees_url":"https://api.github.com/repos/pascalchevrel/transvision/assignees{/user}","branches_url":"https://api.github.com/repos/pascalchevrel/transvision/branches{/branch}","tags_url":"https://api.github.com/repos/pascalchevrel/transvision/tags","blobs_url":"https://api.github.com/repos/pascalchevrel/transvision/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pascalchevrel/transvision/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pascalchevrel/transvision/git/refs{/sha}","trees_url":"https://api.github.com/repos/pascalchevrel/transvision/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pascalchevrel/transvision/statuses/{sha}","languages_url":"https://api.github.com/repos/pascalchevrel/transvision/languages","stargazers_url":"https://api.github.com/repos/pascalchevrel/transvision/stargazers","contributors_url":"https://api.github.com/repos/pascalchevrel/transvision/contributors","subscribers_url":"https://api.github.com/repos/pascalchevrel/transvision/subscribers","subscription_url":"https://api.github.com/repos/pascalchevrel/transvision/subscription","commits_url":"https://api.github.com/repos/pascalchevrel/transvision/commits{/sha}","git_commits_url":"https://api.github.com/repos/pascalchevrel/transvision/git/commits{/sha}","comments_url":"https://api.github.com/repos/pascalchevrel/transvision/comments{/number}","issue_comment_url":"https://api.github.com/repos/pascalchevrel/transvision/issues/comments{/number}","contents_url":"https://api.github.com/repos/pascalchevrel/transvision/contents/{+path}","compare_url":"https://api.github.com/repos/pascalchevrel/transvision/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pascalchevrel/transvision/merges","archive_url":"https://api.github.com/repos/pascalchevrel/transvision/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pascalchevrel/transvision/downloads","issues_url":"https://api.github.com/repos/pascalchevrel/transvision/issues{/number}","pulls_url":"https://api.github.com/repos/pascalchevrel/transvision/pulls{/number}","milestones_url":"https://api.github.com/repos/pascalchevrel/transvision/milestones{/number}","notifications_url":"https://api.github.com/repos/pascalchevrel/transvision/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pascalchevrel/transvision/labels{/name}","releases_url":"https://api.github.com/repos/pascalchevrel/transvision/releases{/id}","created_at":"2014-06-30T23:11:57Z","updated_at":"2015-05-06T15:59:45Z","pushed_at":"2015-11-13T02:45:55Z","git_url":"git://github.com/pascalchevrel/transvision.git","ssh_url":"git@github.com:pascalchevrel/transvision.git","clone_url":"https://github.com/pascalchevrel/transvision.git","svn_url":"https://github.com/pascalchevrel/transvision","homepage":"http://transvision.mozfr.org","size":2358,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"mozfr:master","ref":"master","sha":"266659882d4c216aae35aa18aa55f371473b8478","user":{"login":"mozfr","id":1695186,"avatar_url":"https://avatars.githubusercontent.com/u/1695186?v=3","gravatar_id":"","url":"https://api.github.com/users/mozfr","html_url":"https://github.com/mozfr","followers_url":"https://api.github.com/users/mozfr/followers","following_url":"https://api.github.com/users/mozfr/following{/other_user}","gists_url":"https://api.github.com/users/mozfr/gists{/gist_id}","starred_url":"https://api.github.com/users/mozfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozfr/subscriptions","organizations_url":"https://api.github.com/users/mozfr/orgs","repos_url":"https://api.github.com/users/mozfr/repos","events_url":"https://api.github.com/users/mozfr/events{/privacy}","received_events_url":"https://api.github.com/users/mozfr/received_events","type":"Organization","site_admin":false},"repo":{"id":4100227,"name":"transvision","full_name":"mozfr/transvision","owner":{"login":"mozfr","id":1695186,"avatar_url":"https://avatars.githubusercontent.com/u/1695186?v=3","gravatar_id":"","url":"https://api.github.com/users/mozfr","html_url":"https://github.com/mozfr","followers_url":"https://api.github.com/users/mozfr/followers","following_url":"https://api.github.com/users/mozfr/following{/other_user}","gists_url":"https://api.github.com/users/mozfr/gists{/gist_id}","starred_url":"https://api.github.com/users/mozfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozfr/subscriptions","organizations_url":"https://api.github.com/users/mozfr/orgs","repos_url":"https://api.github.com/users/mozfr/repos","events_url":"https://api.github.com/users/mozfr/events{/privacy}","received_events_url":"https://api.github.com/users/mozfr/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozfr/transvision","description":"QA tool for Mozilla product localizers","fork":false,"url":"https://api.github.com/repos/mozfr/transvision","forks_url":"https://api.github.com/repos/mozfr/transvision/forks","keys_url":"https://api.github.com/repos/mozfr/transvision/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozfr/transvision/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozfr/transvision/teams","hooks_url":"https://api.github.com/repos/mozfr/transvision/hooks","issue_events_url":"https://api.github.com/repos/mozfr/transvision/issues/events{/number}","events_url":"https://api.github.com/repos/mozfr/transvision/events","assignees_url":"https://api.github.com/repos/mozfr/transvision/assignees{/user}","branches_url":"https://api.github.com/repos/mozfr/transvision/branches{/branch}","tags_url":"https://api.github.com/repos/mozfr/transvision/tags","blobs_url":"https://api.github.com/repos/mozfr/transvision/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozfr/transvision/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozfr/transvision/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozfr/transvision/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozfr/transvision/statuses/{sha}","languages_url":"https://api.github.com/repos/mozfr/transvision/languages","stargazers_url":"https://api.github.com/repos/mozfr/transvision/stargazers","contributors_url":"https://api.github.com/repos/mozfr/transvision/contributors","subscribers_url":"https://api.github.com/repos/mozfr/transvision/subscribers","subscription_url":"https://api.github.com/repos/mozfr/transvision/subscription","commits_url":"https://api.github.com/repos/mozfr/transvision/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozfr/transvision/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozfr/transvision/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozfr/transvision/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozfr/transvision/contents/{+path}","compare_url":"https://api.github.com/repos/mozfr/transvision/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozfr/transvision/merges","archive_url":"https://api.github.com/repos/mozfr/transvision/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozfr/transvision/downloads","issues_url":"https://api.github.com/repos/mozfr/transvision/issues{/number}","pulls_url":"https://api.github.com/repos/mozfr/transvision/pulls{/number}","milestones_url":"https://api.github.com/repos/mozfr/transvision/milestones{/number}","notifications_url":"https://api.github.com/repos/mozfr/transvision/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozfr/transvision/labels{/name}","releases_url":"https://api.github.com/repos/mozfr/transvision/releases{/id}","created_at":"2012-04-21T23:04:20Z","updated_at":"2015-05-05T11:23:08Z","pushed_at":"2015-11-13T07:48:00Z","git_url":"git://github.com/mozfr/transvision.git","ssh_url":"git@github.com:mozfr/transvision.git","clone_url":"https://github.com/mozfr/transvision.git","svn_url":"https://github.com/mozfr/transvision","homepage":"http://transvision.mozfr.org","size":4219,"stargazers_count":31,"watchers_count":31,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":26,"forks":39,"open_issues":26,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozfr/transvision/pulls/534"},"html":{"href":"https://github.com/mozfr/transvision/pull/534"},"issue":{"href":"https://api.github.com/repos/mozfr/transvision/issues/534"},"comments":{"href":"https://api.github.com/repos/mozfr/transvision/issues/534/comments"},"review_comments":{"href":"https://api.github.com/repos/mozfr/transvision/pulls/534/comments"},"review_comment":{"href":"https://api.github.com/repos/mozfr/transvision/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozfr/transvision/pulls/534/commits"},"statuses":{"href":"https://api.github.com/repos/mozfr/transvision/statuses/338f7474151e6da988b33dd579f8ca90a3ee29f3"}}}}