{"action":"created","comment":{"url":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/comments/46796224","id":46796224,"diff_hunk":"@@ -77,18 +70,26 @@ var NotificationTable = React.createClass({\n             currentSort.prop = criterion;\n             currentSort.dir = sortDirection;\n \n-            var n = component.state.n.sort(function (a, b) {\n-                if (typeof a[currentSort.prop] == \"number\") {\n-                    return (a[currentSort.prop] - b[currentSort.prop]) * currentSort.dir;\n-                } else {\n-                    return a[currentSort.prop].localeCompare(b[currentSort.prop]) * currentSort.dir;\n-                }\n-            });\n+            var n = component.state.n.sort(this.sortElement);\n             var state = component.state;\n             state.n = n;\n             state.currentSort = currentSort;\n             component.setState(state);\n-        };\n+        }.bind(this);\n+    },\n+    sortElement: function(a,b){\n+        var currentSort = this.state.currentSort;\n+\n+        if (typeof a[currentSort.prop] == typeof a[currentSort.prop]) {","path":"portal-parent/ozwillo-portal-front/src/main/resources/public/js/notifications.jsx.js","position":38,"original_position":38,"commit_id":"1cda738cd4c4879aebb2ddb5613aa23015039e6c","original_commit_id":"1cda738cd4c4879aebb2ddb5613aa23015039e6c","user":{"login":"MLE-Astek","id":15086612,"avatar_url":"https://avatars.githubusercontent.com/u/15086612?v=3","gravatar_id":"","url":"https://api.github.com/users/MLE-Astek","html_url":"https://github.com/MLE-Astek","followers_url":"https://api.github.com/users/MLE-Astek/followers","following_url":"https://api.github.com/users/MLE-Astek/following{/other_user}","gists_url":"https://api.github.com/users/MLE-Astek/gists{/gist_id}","starred_url":"https://api.github.com/users/MLE-Astek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MLE-Astek/subscriptions","organizations_url":"https://api.github.com/users/MLE-Astek/orgs","repos_url":"https://api.github.com/users/MLE-Astek/repos","events_url":"https://api.github.com/users/MLE-Astek/events{/privacy}","received_events_url":"https://api.github.com/users/MLE-Astek/received_events","type":"User","site_admin":false},"body":"yes … wrong copy-paste","created_at":"2015-12-07T08:40:19Z","updated_at":"2015-12-07T08:40:19Z","html_url":"https://github.com/ozwillo/ozwillo-portal/pull/348#discussion_r46796224","pull_request_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/348","_links":{"self":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/comments/46796224"},"html":{"href":"https://github.com/ozwillo/ozwillo-portal/pull/348#discussion_r46796224"},"pull_request":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/348"}}},"pull_request":{"url":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/348","id":52698953,"html_url":"https://github.com/ozwillo/ozwillo-portal/pull/348","diff_url":"https://github.com/ozwillo/ozwillo-portal/pull/348.diff","patch_url":"https://github.com/ozwillo/ozwillo-portal/pull/348.patch","issue_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues/348","number":348,"state":"open","locked":false,"title":"[FIX]  ref #343 fix and factorisation of sorting method for notifications","user":{"login":"MLE-Astek","id":15086612,"avatar_url":"https://avatars.githubusercontent.com/u/15086612?v=3","gravatar_id":"","url":"https://api.github.com/users/MLE-Astek","html_url":"https://github.com/MLE-Astek","followers_url":"https://api.github.com/users/MLE-Astek/followers","following_url":"https://api.github.com/users/MLE-Astek/following{/other_user}","gists_url":"https://api.github.com/users/MLE-Astek/gists{/gist_id}","starred_url":"https://api.github.com/users/MLE-Astek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MLE-Astek/subscriptions","organizations_url":"https://api.github.com/users/MLE-Astek/orgs","repos_url":"https://api.github.com/users/MLE-Astek/repos","events_url":"https://api.github.com/users/MLE-Astek/events{/privacy}","received_events_url":"https://api.github.com/users/MLE-Astek/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-04T17:42:25Z","updated_at":"2015-12-07T08:40:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9df20489065c35ac7b71e57bfb0472a3eb1adeb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/348/commits","review_comments_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/348/comments","review_comment_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues/348/comments","statuses_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/statuses/1cda738cd4c4879aebb2ddb5613aa23015039e6c","head":{"label":"ozwillo:343-fix-sorting-notification","ref":"343-fix-sorting-notification","sha":"1cda738cd4c4879aebb2ddb5613aa23015039e6c","user":{"login":"ozwillo","id":9085702,"avatar_url":"https://avatars.githubusercontent.com/u/9085702?v=3","gravatar_id":"","url":"https://api.github.com/users/ozwillo","html_url":"https://github.com/ozwillo","followers_url":"https://api.github.com/users/ozwillo/followers","following_url":"https://api.github.com/users/ozwillo/following{/other_user}","gists_url":"https://api.github.com/users/ozwillo/gists{/gist_id}","starred_url":"https://api.github.com/users/ozwillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozwillo/subscriptions","organizations_url":"https://api.github.com/users/ozwillo/orgs","repos_url":"https://api.github.com/users/ozwillo/repos","events_url":"https://api.github.com/users/ozwillo/events{/privacy}","received_events_url":"https://api.github.com/users/ozwillo/received_events","type":"Organization","site_admin":false},"repo":{"id":19692500,"name":"ozwillo-portal","full_name":"ozwillo/ozwillo-portal","owner":{"login":"ozwillo","id":9085702,"avatar_url":"https://avatars.githubusercontent.com/u/9085702?v=3","gravatar_id":"","url":"https://api.github.com/users/ozwillo","html_url":"https://github.com/ozwillo","followers_url":"https://api.github.com/users/ozwillo/followers","following_url":"https://api.github.com/users/ozwillo/following{/other_user}","gists_url":"https://api.github.com/users/ozwillo/gists{/gist_id}","starred_url":"https://api.github.com/users/ozwillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozwillo/subscriptions","organizations_url":"https://api.github.com/users/ozwillo/orgs","repos_url":"https://api.github.com/users/ozwillo/repos","events_url":"https://api.github.com/users/ozwillo/events{/privacy}","received_events_url":"https://api.github.com/users/ozwillo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ozwillo/ozwillo-portal","description":"Ozwillo's user portal","fork":false,"url":"https://api.github.com/repos/ozwillo/ozwillo-portal","forks_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/forks","keys_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/teams","hooks_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/hooks","issue_events_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues/events{/number}","events_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/events","assignees_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/assignees{/user}","branches_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/branches{/branch}","tags_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/tags","blobs_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/languages","stargazers_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/stargazers","contributors_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/contributors","subscribers_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/subscribers","subscription_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/subscription","commits_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/contents/{+path}","compare_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/merges","archive_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/downloads","issues_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues{/number}","pulls_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/labels{/name}","releases_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/releases{/id}","created_at":"2014-05-12T09:15:19Z","updated_at":"2015-12-04T13:33:53Z","pushed_at":"2015-12-06T12:12:49Z","git_url":"git://github.com/ozwillo/ozwillo-portal.git","ssh_url":"git@github.com:ozwillo/ozwillo-portal.git","clone_url":"https://github.com/ozwillo/ozwillo-portal.git","svn_url":"https://github.com/ozwillo/ozwillo-portal","homepage":"https://www.ozwillo.com","size":7932,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":60,"forks":0,"open_issues":60,"watchers":1,"default_branch":"master"}},"base":{"label":"ozwillo:master","ref":"master","sha":"ae9727f9b216be7471f092ae325a550cee5cfa1e","user":{"login":"ozwillo","id":9085702,"avatar_url":"https://avatars.githubusercontent.com/u/9085702?v=3","gravatar_id":"","url":"https://api.github.com/users/ozwillo","html_url":"https://github.com/ozwillo","followers_url":"https://api.github.com/users/ozwillo/followers","following_url":"https://api.github.com/users/ozwillo/following{/other_user}","gists_url":"https://api.github.com/users/ozwillo/gists{/gist_id}","starred_url":"https://api.github.com/users/ozwillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozwillo/subscriptions","organizations_url":"https://api.github.com/users/ozwillo/orgs","repos_url":"https://api.github.com/users/ozwillo/repos","events_url":"https://api.github.com/users/ozwillo/events{/privacy}","received_events_url":"https://api.github.com/users/ozwillo/received_events","type":"Organization","site_admin":false},"repo":{"id":19692500,"name":"ozwillo-portal","full_name":"ozwillo/ozwillo-portal","owner":{"login":"ozwillo","id":9085702,"avatar_url":"https://avatars.githubusercontent.com/u/9085702?v=3","gravatar_id":"","url":"https://api.github.com/users/ozwillo","html_url":"https://github.com/ozwillo","followers_url":"https://api.github.com/users/ozwillo/followers","following_url":"https://api.github.com/users/ozwillo/following{/other_user}","gists_url":"https://api.github.com/users/ozwillo/gists{/gist_id}","starred_url":"https://api.github.com/users/ozwillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ozwillo/subscriptions","organizations_url":"https://api.github.com/users/ozwillo/orgs","repos_url":"https://api.github.com/users/ozwillo/repos","events_url":"https://api.github.com/users/ozwillo/events{/privacy}","received_events_url":"https://api.github.com/users/ozwillo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ozwillo/ozwillo-portal","description":"Ozwillo's user portal","fork":false,"url":"https://api.github.com/repos/ozwillo/ozwillo-portal","forks_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/forks","keys_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/teams","hooks_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/hooks","issue_events_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues/events{/number}","events_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/events","assignees_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/assignees{/user}","branches_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/branches{/branch}","tags_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/tags","blobs_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/languages","stargazers_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/stargazers","contributors_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/contributors","subscribers_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/subscribers","subscription_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/subscription","commits_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/contents/{+path}","compare_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/merges","archive_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/downloads","issues_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues{/number}","pulls_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/labels{/name}","releases_url":"https://api.github.com/repos/ozwillo/ozwillo-portal/releases{/id}","created_at":"2014-05-12T09:15:19Z","updated_at":"2015-12-04T13:33:53Z","pushed_at":"2015-12-06T12:12:49Z","git_url":"git://github.com/ozwillo/ozwillo-portal.git","ssh_url":"git@github.com:ozwillo/ozwillo-portal.git","clone_url":"https://github.com/ozwillo/ozwillo-portal.git","svn_url":"https://github.com/ozwillo/ozwillo-portal","homepage":"https://www.ozwillo.com","size":7932,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":60,"forks":0,"open_issues":60,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/348"},"html":{"href":"https://github.com/ozwillo/ozwillo-portal/pull/348"},"issue":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues/348"},"comments":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/issues/348/comments"},"review_comments":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/348/comments"},"review_comment":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/pulls/348/commits"},"statuses":{"href":"https://api.github.com/repos/ozwillo/ozwillo-portal/statuses/1cda738cd4c4879aebb2ddb5613aa23015039e6c"}}}}