{"action":"created","comment":{"url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/comments/27040003","id":27040003,"diff_hunk":"@@ -0,0 +1,270 @@\n+// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n+// use this file except in compliance with the License. You may obtain a copy of\n+// the License at\n+//\n+//   http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n+// License for the specific language governing permissions and limitations under\n+// the License.\n+\n+define([\n+  'api',\n+  'addons/documents/index-results/actiontypes',\n+  'addons/documents/header/header.actiontypes',\n+  \"addons/documents/resources\"\n+],\n+\n+function(FauxtonAPI, ActionTypes, HeaderActionTypes, Documents) {\n+  var Stores = {};\n+\n+  /*TODO:\n+  remove header code, add delete, clean up pagination tests\n+  */\n+\n+  Stores.IndexResultsStore = FauxtonAPI.Store.extend({\n+\n+    initialize: function () {\n+      this._deleteable = false;\n+      this._collection = [];\n+      this.clearSelectedItems();\n+      this.clearCollapsedDocs();\n+      this._isLoading = false;\n+    },\n+\n+    clearSelectedItems: function () {\n+      this._selectedItems = {};\n+    },\n+\n+    clearCollapsedDocs: function () {\n+      this._collapsedDocs = {};\n+    },\n+\n+    newResults: function (options) {\n+      this._collection = options.collection;\n+      this._deleteable = options.deleteable;\n+      this.clearSelectedItems();\n+      this.clearCollapsedDocs();\n+    },\n+\n+    hasReduce: function () {\n+      if (!this._collection || !this._collection.params) {\n+        return false;\n+      }\n+      return this._collection.params.reduce;\n+    },\n+\n+    getCollection: function () {\n+      return this._collection;\n+    },\n+\n+    getDocContent: function (originalDoc) {\n+      var doc = originalDoc.toJSON();\n+\n+      if (this.isCollapsed(doc._id)) {\n+        doc = {\n+          _id: _.isUndefined(doc._id),\n+          _rev: doc._rev\n+        };\n+      }\n+\n+      return JSON.stringify(doc, null, \"  \");","path":"app/addons/documents/index-results/stores.js","position":73,"original_position":73,"commit_id":"0ea03048b70152df6726af669582aa685ec7ac7e","original_commit_id":"0ea03048b70152df6726af669582aa685ec7ac7e","user":{"login":"robertkowalski","id":298166,"avatar_url":"https://avatars.githubusercontent.com/u/298166?v=3","gravatar_id":"","url":"https://api.github.com/users/robertkowalski","html_url":"https://github.com/robertkowalski","followers_url":"https://api.github.com/users/robertkowalski/followers","following_url":"https://api.github.com/users/robertkowalski/following{/other_user}","gists_url":"https://api.github.com/users/robertkowalski/gists{/gist_id}","starred_url":"https://api.github.com/users/robertkowalski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertkowalski/subscriptions","organizations_url":"https://api.github.com/users/robertkowalski/orgs","repos_url":"https://api.github.com/users/robertkowalski/repos","events_url":"https://api.github.com/users/robertkowalski/events{/privacy}","received_events_url":"https://api.github.com/users/robertkowalski/received_events","type":"User","site_admin":false},"body":"single quotes","created_at":"2015-03-24T15:40:19Z","updated_at":"2015-03-24T15:40:19Z","html_url":"https://github.com/apache/couchdb-fauxton/pull/324#discussion_r27040003","pull_request_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/324","_links":{"self":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/comments/27040003"},"html":{"href":"https://github.com/apache/couchdb-fauxton/pull/324#discussion_r27040003"},"pull_request":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/324"}}},"pull_request":{"url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/324","id":31600865,"html_url":"https://github.com/apache/couchdb-fauxton/pull/324","diff_url":"https://github.com/apache/couchdb-fauxton/pull/324.diff","patch_url":"https://github.com/apache/couchdb-fauxton/pull/324.patch","issue_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/324","number":324,"state":"open","locked":false,"title":"React docs list","user":{"login":"garrensmith","id":179458,"avatar_url":"https://avatars.githubusercontent.com/u/179458?v=3","gravatar_id":"","url":"https://api.github.com/users/garrensmith","html_url":"https://github.com/garrensmith","followers_url":"https://api.github.com/users/garrensmith/followers","following_url":"https://api.github.com/users/garrensmith/following{/other_user}","gists_url":"https://api.github.com/users/garrensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/garrensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrensmith/subscriptions","organizations_url":"https://api.github.com/users/garrensmith/orgs","repos_url":"https://api.github.com/users/garrensmith/repos","events_url":"https://api.github.com/users/garrensmith/events{/privacy}","received_events_url":"https://api.github.com/users/garrensmith/received_events","type":"User","site_admin":false},"body":"This is the document list for views, _all_docs redone in React.js","created_at":"2015-03-20T10:05:07Z","updated_at":"2015-03-24T15:40:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4528bd76f2f553631da66c1698c4158cd6f5ccee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/324/commits","review_comments_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/324/comments","review_comment_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/324/comments","statuses_url":"https://api.github.com/repos/apache/couchdb-fauxton/statuses/0ea03048b70152df6726af669582aa685ec7ac7e","head":{"label":"garrensmith:react-docs-list","ref":"react-docs-list","sha":"0ea03048b70152df6726af669582aa685ec7ac7e","user":{"login":"garrensmith","id":179458,"avatar_url":"https://avatars.githubusercontent.com/u/179458?v=3","gravatar_id":"","url":"https://api.github.com/users/garrensmith","html_url":"https://github.com/garrensmith","followers_url":"https://api.github.com/users/garrensmith/followers","following_url":"https://api.github.com/users/garrensmith/following{/other_user}","gists_url":"https://api.github.com/users/garrensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/garrensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrensmith/subscriptions","organizations_url":"https://api.github.com/users/garrensmith/orgs","repos_url":"https://api.github.com/users/garrensmith/repos","events_url":"https://api.github.com/users/garrensmith/events{/privacy}","received_events_url":"https://api.github.com/users/garrensmith/received_events","type":"User","site_admin":false},"repo":{"id":22055078,"name":"couchdb-fauxton","full_name":"garrensmith/couchdb-fauxton","owner":{"login":"garrensmith","id":179458,"avatar_url":"https://avatars.githubusercontent.com/u/179458?v=3","gravatar_id":"","url":"https://api.github.com/users/garrensmith","html_url":"https://github.com/garrensmith","followers_url":"https://api.github.com/users/garrensmith/followers","following_url":"https://api.github.com/users/garrensmith/following{/other_user}","gists_url":"https://api.github.com/users/garrensmith/gists{/gist_id}","starred_url":"https://api.github.com/users/garrensmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garrensmith/subscriptions","organizations_url":"https://api.github.com/users/garrensmith/orgs","repos_url":"https://api.github.com/users/garrensmith/repos","events_url":"https://api.github.com/users/garrensmith/events{/privacy}","received_events_url":"https://api.github.com/users/garrensmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garrensmith/couchdb-fauxton","description":"Mirror of Apache CouchDB","fork":true,"url":"https://api.github.com/repos/garrensmith/couchdb-fauxton","forks_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/forks","keys_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/teams","hooks_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/hooks","issue_events_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/issues/events{/number}","events_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/events","assignees_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/assignees{/user}","branches_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/branches{/branch}","tags_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/tags","blobs_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/git/refs{/sha}","trees_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/statuses/{sha}","languages_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/languages","stargazers_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/stargazers","contributors_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/contributors","subscribers_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/subscribers","subscription_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/subscription","commits_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/commits{/sha}","git_commits_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/git/commits{/sha}","comments_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/comments{/number}","issue_comment_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/issues/comments{/number}","contents_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/contents/{+path}","compare_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/merges","archive_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/downloads","issues_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/issues{/number}","pulls_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/pulls{/number}","milestones_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/milestones{/number}","notifications_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/labels{/name}","releases_url":"https://api.github.com/repos/garrensmith/couchdb-fauxton/releases{/id}","created_at":"2014-07-21T07:08:48Z","updated_at":"2015-03-24T10:59:14Z","pushed_at":"2015-03-24T13:20:09Z","git_url":"git://github.com/garrensmith/couchdb-fauxton.git","ssh_url":"git@github.com:garrensmith/couchdb-fauxton.git","clone_url":"https://github.com/garrensmith/couchdb-fauxton.git","svn_url":"https://github.com/garrensmith/couchdb-fauxton","homepage":null,"size":6502,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","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":4,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"b62db06a60ecf6c75f818a32d729e0cf287b6013","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":15993612,"name":"couchdb-fauxton","full_name":"apache/couchdb-fauxton","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/couchdb-fauxton","description":"Mirror of Apache CouchDB","fork":false,"url":"https://api.github.com/repos/apache/couchdb-fauxton","forks_url":"https://api.github.com/repos/apache/couchdb-fauxton/forks","keys_url":"https://api.github.com/repos/apache/couchdb-fauxton/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/couchdb-fauxton/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/couchdb-fauxton/teams","hooks_url":"https://api.github.com/repos/apache/couchdb-fauxton/hooks","issue_events_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/events{/number}","events_url":"https://api.github.com/repos/apache/couchdb-fauxton/events","assignees_url":"https://api.github.com/repos/apache/couchdb-fauxton/assignees{/user}","branches_url":"https://api.github.com/repos/apache/couchdb-fauxton/branches{/branch}","tags_url":"https://api.github.com/repos/apache/couchdb-fauxton/tags","blobs_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/couchdb-fauxton/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/couchdb-fauxton/languages","stargazers_url":"https://api.github.com/repos/apache/couchdb-fauxton/stargazers","contributors_url":"https://api.github.com/repos/apache/couchdb-fauxton/contributors","subscribers_url":"https://api.github.com/repos/apache/couchdb-fauxton/subscribers","subscription_url":"https://api.github.com/repos/apache/couchdb-fauxton/subscription","commits_url":"https://api.github.com/repos/apache/couchdb-fauxton/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/couchdb-fauxton/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/couchdb-fauxton/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/couchdb-fauxton/contents/{+path}","compare_url":"https://api.github.com/repos/apache/couchdb-fauxton/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/couchdb-fauxton/merges","archive_url":"https://api.github.com/repos/apache/couchdb-fauxton/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/couchdb-fauxton/downloads","issues_url":"https://api.github.com/repos/apache/couchdb-fauxton/issues{/number}","pulls_url":"https://api.github.com/repos/apache/couchdb-fauxton/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/couchdb-fauxton/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/couchdb-fauxton/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/couchdb-fauxton/labels{/name}","releases_url":"https://api.github.com/repos/apache/couchdb-fauxton/releases{/id}","created_at":"2014-01-17T08:00:08Z","updated_at":"2015-03-23T17:24:30Z","pushed_at":"2015-03-24T13:20:09Z","git_url":"git://github.com/apache/couchdb-fauxton.git","ssh_url":"git@github.com:apache/couchdb-fauxton.git","clone_url":"https://github.com/apache/couchdb-fauxton.git","svn_url":"https://github.com/apache/couchdb-fauxton","homepage":null,"size":11166,"stargazers_count":40,"watchers_count":40,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":45,"mirror_url":"git://git.apache.org/couchdb-fauxton.git","open_issues_count":16,"forks":45,"open_issues":16,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/324"},"html":{"href":"https://github.com/apache/couchdb-fauxton/pull/324"},"issue":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/issues/324"},"comments":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/issues/324/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/324/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/pulls/324/commits"},"statuses":{"href":"https://api.github.com/repos/apache/couchdb-fauxton/statuses/0ea03048b70152df6726af669582aa685ec7ac7e"}}}}