{"action":"created","comment":{"url":"https://api.github.com/repos/tadatuta/bem-forum/pulls/comments/71726658","id":71726658,"diff_hunk":"@@ -0,0 +1,38 @@\n+modules.define('sorting', ['i-bem__dom', 'select', 'jquery'], function(provide, BEMDOM, Select, $) {\n+  provide(BEMDOM.decl(this.name, {\n+    onSetMod: {\n+      js: {\n+        'inited': function() {\n+          Select.on(this.elem('select'), 'change', this._onSortingSelectChanged, this);\n+        }\n+      }\n+    },\n+    _onSortingSelectChanged: function(e) {\n+      var queryString = this._getQueryString(e.target.getVal()),\n+      contentBlock = this.findBlockOutside('content'),\n+      contentLeftSpinBlock = contentBlock.findBlockInside('content__spin').findBlockOn('spin'),\n+      issuesBlock = contentBlock.findBlockInside('issues');\n+\n+      issuesBlock.setMod('loading');\n+      contentLeftSpinBlock.setMod('visible');\n+\n+      $.get(`/?${queryString}`)\n+      .then(function(data) {\n+        issuesBlock.delMod('loading');\n+        BEMDOM.replace(issuesBlock.domElem, data);\n+        contentLeftSpinBlock.delMod('visible');\n+      });\n+    },\n+    _getQueryString: function(val) {\n+      switch (val) {","path":"common.blocks/sorting/sorting.js","position":27,"original_position":27,"commit_id":"c9c045e13326ff2507efd7cf9637b08b17d5fa93","original_commit_id":"c9c045e13326ff2507efd7cf9637b08b17d5fa93","user":{"login":"tadatuta","id":475746,"avatar_url":"https://avatars.githubusercontent.com/u/475746?v=3","gravatar_id":"","url":"https://api.github.com/users/tadatuta","html_url":"https://github.com/tadatuta","followers_url":"https://api.github.com/users/tadatuta/followers","following_url":"https://api.github.com/users/tadatuta/following{/other_user}","gists_url":"https://api.github.com/users/tadatuta/gists{/gist_id}","starred_url":"https://api.github.com/users/tadatuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadatuta/subscriptions","organizations_url":"https://api.github.com/users/tadatuta/orgs","repos_url":"https://api.github.com/users/tadatuta/repos","events_url":"https://api.github.com/users/tadatuta/events{/privacy}","received_events_url":"https://api.github.com/users/tadatuta/received_events","type":"User","site_admin":false},"body":"oh, actually there's no need in this function at all, just move the values to https://github.com/tadatuta/bem-forum/pull/21/files#diff-9f325be26d59702b218b09327cffecc2R13 instead of numbers","created_at":"2016-07-21T15:21:32Z","updated_at":"2016-07-21T15:21:32Z","html_url":"https://github.com/tadatuta/bem-forum/pull/21#discussion_r71726658","pull_request_url":"https://api.github.com/repos/tadatuta/bem-forum/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/tadatuta/bem-forum/pulls/comments/71726658"},"html":{"href":"https://github.com/tadatuta/bem-forum/pull/21#discussion_r71726658"},"pull_request":{"href":"https://api.github.com/repos/tadatuta/bem-forum/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/tadatuta/bem-forum/pulls/21","id":78329704,"html_url":"https://github.com/tadatuta/bem-forum/pull/21","diff_url":"https://github.com/tadatuta/bem-forum/pull/21.diff","patch_url":"https://github.com/tadatuta/bem-forum/pull/21.patch","issue_url":"https://api.github.com/repos/tadatuta/bem-forum/issues/21","number":21,"state":"open","locked":false,"title":"Support different sorting","user":{"login":"dima716","id":8137279,"avatar_url":"https://avatars.githubusercontent.com/u/8137279?v=3","gravatar_id":"","url":"https://api.github.com/users/dima716","html_url":"https://github.com/dima716","followers_url":"https://api.github.com/users/dima716/followers","following_url":"https://api.github.com/users/dima716/following{/other_user}","gists_url":"https://api.github.com/users/dima716/gists{/gist_id}","starred_url":"https://api.github.com/users/dima716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima716/subscriptions","organizations_url":"https://api.github.com/users/dima716/orgs","repos_url":"https://api.github.com/users/dima716/repos","events_url":"https://api.github.com/users/dima716/events{/privacy}","received_events_url":"https://api.github.com/users/dima716/received_events","type":"User","site_admin":false},"body":"Add select control which allows to get sorted issues.\r\nThe way the select work is similar to the select on [bem forum site](https://en.bem.info/forum/)\r\nGithub Api for sort can be found [here](https://developer.github.com/v3/issues/#parameters-1)","created_at":"2016-07-21T14:50:32Z","updated_at":"2016-07-21T15:21:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56b915b6c132288c05f20a950e10865ca9907fa7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tadatuta/bem-forum/pulls/21/commits","review_comments_url":"https://api.github.com/repos/tadatuta/bem-forum/pulls/21/comments","review_comment_url":"https://api.github.com/repos/tadatuta/bem-forum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tadatuta/bem-forum/issues/21/comments","statuses_url":"https://api.github.com/repos/tadatuta/bem-forum/statuses/c9c045e13326ff2507efd7cf9637b08b17d5fa93","head":{"label":"dima716:issues/5","ref":"issues/5","sha":"c9c045e13326ff2507efd7cf9637b08b17d5fa93","user":{"login":"dima716","id":8137279,"avatar_url":"https://avatars.githubusercontent.com/u/8137279?v=3","gravatar_id":"","url":"https://api.github.com/users/dima716","html_url":"https://github.com/dima716","followers_url":"https://api.github.com/users/dima716/followers","following_url":"https://api.github.com/users/dima716/following{/other_user}","gists_url":"https://api.github.com/users/dima716/gists{/gist_id}","starred_url":"https://api.github.com/users/dima716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima716/subscriptions","organizations_url":"https://api.github.com/users/dima716/orgs","repos_url":"https://api.github.com/users/dima716/repos","events_url":"https://api.github.com/users/dima716/events{/privacy}","received_events_url":"https://api.github.com/users/dima716/received_events","type":"User","site_admin":false},"repo":{"id":63777345,"name":"bem-forum","full_name":"dima716/bem-forum","owner":{"login":"dima716","id":8137279,"avatar_url":"https://avatars.githubusercontent.com/u/8137279?v=3","gravatar_id":"","url":"https://api.github.com/users/dima716","html_url":"https://github.com/dima716","followers_url":"https://api.github.com/users/dima716/followers","following_url":"https://api.github.com/users/dima716/following{/other_user}","gists_url":"https://api.github.com/users/dima716/gists{/gist_id}","starred_url":"https://api.github.com/users/dima716/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dima716/subscriptions","organizations_url":"https://api.github.com/users/dima716/orgs","repos_url":"https://api.github.com/users/dima716/repos","events_url":"https://api.github.com/users/dima716/events{/privacy}","received_events_url":"https://api.github.com/users/dima716/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dima716/bem-forum","description":null,"fork":true,"url":"https://api.github.com/repos/dima716/bem-forum","forks_url":"https://api.github.com/repos/dima716/bem-forum/forks","keys_url":"https://api.github.com/repos/dima716/bem-forum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dima716/bem-forum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dima716/bem-forum/teams","hooks_url":"https://api.github.com/repos/dima716/bem-forum/hooks","issue_events_url":"https://api.github.com/repos/dima716/bem-forum/issues/events{/number}","events_url":"https://api.github.com/repos/dima716/bem-forum/events","assignees_url":"https://api.github.com/repos/dima716/bem-forum/assignees{/user}","branches_url":"https://api.github.com/repos/dima716/bem-forum/branches{/branch}","tags_url":"https://api.github.com/repos/dima716/bem-forum/tags","blobs_url":"https://api.github.com/repos/dima716/bem-forum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dima716/bem-forum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dima716/bem-forum/git/refs{/sha}","trees_url":"https://api.github.com/repos/dima716/bem-forum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dima716/bem-forum/statuses/{sha}","languages_url":"https://api.github.com/repos/dima716/bem-forum/languages","stargazers_url":"https://api.github.com/repos/dima716/bem-forum/stargazers","contributors_url":"https://api.github.com/repos/dima716/bem-forum/contributors","subscribers_url":"https://api.github.com/repos/dima716/bem-forum/subscribers","subscription_url":"https://api.github.com/repos/dima716/bem-forum/subscription","commits_url":"https://api.github.com/repos/dima716/bem-forum/commits{/sha}","git_commits_url":"https://api.github.com/repos/dima716/bem-forum/git/commits{/sha}","comments_url":"https://api.github.com/repos/dima716/bem-forum/comments{/number}","issue_comment_url":"https://api.github.com/repos/dima716/bem-forum/issues/comments{/number}","contents_url":"https://api.github.com/repos/dima716/bem-forum/contents/{+path}","compare_url":"https://api.github.com/repos/dima716/bem-forum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dima716/bem-forum/merges","archive_url":"https://api.github.com/repos/dima716/bem-forum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dima716/bem-forum/downloads","issues_url":"https://api.github.com/repos/dima716/bem-forum/issues{/number}","pulls_url":"https://api.github.com/repos/dima716/bem-forum/pulls{/number}","milestones_url":"https://api.github.com/repos/dima716/bem-forum/milestones{/number}","notifications_url":"https://api.github.com/repos/dima716/bem-forum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dima716/bem-forum/labels{/name}","releases_url":"https://api.github.com/repos/dima716/bem-forum/releases{/id}","deployments_url":"https://api.github.com/repos/dima716/bem-forum/deployments","created_at":"2016-07-20T11:50:01Z","updated_at":"2016-07-20T11:50:02Z","pushed_at":"2016-07-21T14:43:25Z","git_url":"git://github.com/dima716/bem-forum.git","ssh_url":"git@github.com:dima716/bem-forum.git","clone_url":"https://github.com/dima716/bem-forum.git","svn_url":"https://github.com/dima716/bem-forum","homepage":null,"size":43,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"tadatuta:master","ref":"master","sha":"007d6f12687980346375ab7917c0f719f6bdfb00","user":{"login":"tadatuta","id":475746,"avatar_url":"https://avatars.githubusercontent.com/u/475746?v=3","gravatar_id":"","url":"https://api.github.com/users/tadatuta","html_url":"https://github.com/tadatuta","followers_url":"https://api.github.com/users/tadatuta/followers","following_url":"https://api.github.com/users/tadatuta/following{/other_user}","gists_url":"https://api.github.com/users/tadatuta/gists{/gist_id}","starred_url":"https://api.github.com/users/tadatuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadatuta/subscriptions","organizations_url":"https://api.github.com/users/tadatuta/orgs","repos_url":"https://api.github.com/users/tadatuta/repos","events_url":"https://api.github.com/users/tadatuta/events{/privacy}","received_events_url":"https://api.github.com/users/tadatuta/received_events","type":"User","site_admin":false},"repo":{"id":62709287,"name":"bem-forum","full_name":"tadatuta/bem-forum","owner":{"login":"tadatuta","id":475746,"avatar_url":"https://avatars.githubusercontent.com/u/475746?v=3","gravatar_id":"","url":"https://api.github.com/users/tadatuta","html_url":"https://github.com/tadatuta","followers_url":"https://api.github.com/users/tadatuta/followers","following_url":"https://api.github.com/users/tadatuta/following{/other_user}","gists_url":"https://api.github.com/users/tadatuta/gists{/gist_id}","starred_url":"https://api.github.com/users/tadatuta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tadatuta/subscriptions","organizations_url":"https://api.github.com/users/tadatuta/orgs","repos_url":"https://api.github.com/users/tadatuta/repos","events_url":"https://api.github.com/users/tadatuta/events{/privacy}","received_events_url":"https://api.github.com/users/tadatuta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tadatuta/bem-forum","description":null,"fork":false,"url":"https://api.github.com/repos/tadatuta/bem-forum","forks_url":"https://api.github.com/repos/tadatuta/bem-forum/forks","keys_url":"https://api.github.com/repos/tadatuta/bem-forum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tadatuta/bem-forum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tadatuta/bem-forum/teams","hooks_url":"https://api.github.com/repos/tadatuta/bem-forum/hooks","issue_events_url":"https://api.github.com/repos/tadatuta/bem-forum/issues/events{/number}","events_url":"https://api.github.com/repos/tadatuta/bem-forum/events","assignees_url":"https://api.github.com/repos/tadatuta/bem-forum/assignees{/user}","branches_url":"https://api.github.com/repos/tadatuta/bem-forum/branches{/branch}","tags_url":"https://api.github.com/repos/tadatuta/bem-forum/tags","blobs_url":"https://api.github.com/repos/tadatuta/bem-forum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tadatuta/bem-forum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tadatuta/bem-forum/git/refs{/sha}","trees_url":"https://api.github.com/repos/tadatuta/bem-forum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tadatuta/bem-forum/statuses/{sha}","languages_url":"https://api.github.com/repos/tadatuta/bem-forum/languages","stargazers_url":"https://api.github.com/repos/tadatuta/bem-forum/stargazers","contributors_url":"https://api.github.com/repos/tadatuta/bem-forum/contributors","subscribers_url":"https://api.github.com/repos/tadatuta/bem-forum/subscribers","subscription_url":"https://api.github.com/repos/tadatuta/bem-forum/subscription","commits_url":"https://api.github.com/repos/tadatuta/bem-forum/commits{/sha}","git_commits_url":"https://api.github.com/repos/tadatuta/bem-forum/git/commits{/sha}","comments_url":"https://api.github.com/repos/tadatuta/bem-forum/comments{/number}","issue_comment_url":"https://api.github.com/repos/tadatuta/bem-forum/issues/comments{/number}","contents_url":"https://api.github.com/repos/tadatuta/bem-forum/contents/{+path}","compare_url":"https://api.github.com/repos/tadatuta/bem-forum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tadatuta/bem-forum/merges","archive_url":"https://api.github.com/repos/tadatuta/bem-forum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tadatuta/bem-forum/downloads","issues_url":"https://api.github.com/repos/tadatuta/bem-forum/issues{/number}","pulls_url":"https://api.github.com/repos/tadatuta/bem-forum/pulls{/number}","milestones_url":"https://api.github.com/repos/tadatuta/bem-forum/milestones{/number}","notifications_url":"https://api.github.com/repos/tadatuta/bem-forum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tadatuta/bem-forum/labels{/name}","releases_url":"https://api.github.com/repos/tadatuta/bem-forum/releases{/id}","deployments_url":"https://api.github.com/repos/tadatuta/bem-forum/deployments","created_at":"2016-07-06T09:35:45Z","updated_at":"2016-07-18T13:33:39Z","pushed_at":"2016-07-21T14:50:32Z","git_url":"git://github.com/tadatuta/bem-forum.git","ssh_url":"git@github.com:tadatuta/bem-forum.git","clone_url":"https://github.com/tadatuta/bem-forum.git","svn_url":"https://github.com/tadatuta/bem-forum","homepage":null,"size":43,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":12,"forks":3,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tadatuta/bem-forum/pulls/21"},"html":{"href":"https://github.com/tadatuta/bem-forum/pull/21"},"issue":{"href":"https://api.github.com/repos/tadatuta/bem-forum/issues/21"},"comments":{"href":"https://api.github.com/repos/tadatuta/bem-forum/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/tadatuta/bem-forum/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/tadatuta/bem-forum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tadatuta/bem-forum/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/tadatuta/bem-forum/statuses/c9c045e13326ff2507efd7cf9637b08b17d5fa93"}}}}
{"actor":{"display_login":"tadatuta"}}