{"action":"created","comment":{"url":"https://api.github.com/repos/tkomstadius/bruse/pulls/comments/25945430","id":25945430,"diff_hunk":"@@ -0,0 +1,41 @@\n+@bruseApp.controller 'FileCtrl', ['FileHandler', '$scope', '$http', (FileHandler, $scope, $http) ->\n+  $scope.files = []\n+  $scope.loading = true\n+\n+  # get identity information from add view\n+  $scope.identity = IDENTITY_PARAMS\n+\n+  # load root files on page load\n+  FileHandler.get($scope.identity.id, '/').then((data) ->\n+    $scope.files = data\n+    $scope.loading = false\n+    )\n+\n+  $scope.expand = (file) ->\n+    # set this folder as expanded\n+    file.expand = !file.expand\n+\n+    # if we haven't allready, load file info from dropbox\n+    unless file.contents and file.contents.length > 0\n+      $scope.loading = true\n+      FileHandler.get($scope.identity.id, file.path).then((data) ->\n+        file.contents = data\n+        $scope.loading = false\n+        )\n+\n+  $scope.add = (file) ->\n+    # make sure we are not adding a file\n+    unless file.is_dir","path":"app/assets/javascripts/controllers/FileCtrl.coffee","position":28,"original_position":28,"commit_id":"d8f2543b20e44d5ff93ad7ece3de0a378295389b","original_commit_id":"d8f2543b20e44d5ff93ad7ece3de0a378295389b","user":{"login":"klaseskilson","id":1674076,"avatar_url":"https://avatars.githubusercontent.com/u/1674076?v=3","gravatar_id":"","url":"https://api.github.com/users/klaseskilson","html_url":"https://github.com/klaseskilson","followers_url":"https://api.github.com/users/klaseskilson/followers","following_url":"https://api.github.com/users/klaseskilson/following{/other_user}","gists_url":"https://api.github.com/users/klaseskilson/gists{/gist_id}","starred_url":"https://api.github.com/users/klaseskilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klaseskilson/subscriptions","organizations_url":"https://api.github.com/users/klaseskilson/orgs","repos_url":"https://api.github.com/users/klaseskilson/repos","events_url":"https://api.github.com/users/klaseskilson/events{/privacy}","received_events_url":"https://api.github.com/users/klaseskilson/received_events","type":"User","site_admin":false},"body":"`is_dir` is a propertry that we get from Dropbox. It's a boolean that says if the object is a folder or if it's actually a file. On this line we make sure that the current object actually is a file, and *not* a folder. \r\n\r\nI guess it would be nice to be able to add entire folders to, but that requires further work. ","created_at":"2015-03-06T13:59:51Z","updated_at":"2015-03-06T13:59:51Z","html_url":"https://github.com/tkomstadius/bruse/pull/6#discussion_r25945430","pull_request_url":"https://api.github.com/repos/tkomstadius/bruse/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/tkomstadius/bruse/pulls/comments/25945430"},"html":{"href":"https://github.com/tkomstadius/bruse/pull/6#discussion_r25945430"},"pull_request":{"href":"https://api.github.com/repos/tkomstadius/bruse/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/tkomstadius/bruse/pulls/6","id":30643420,"html_url":"https://github.com/tkomstadius/bruse/pull/6","diff_url":"https://github.com/tkomstadius/bruse/pull/6.diff","patch_url":"https://github.com/tkomstadius/bruse/pull/6.patch","issue_url":"https://api.github.com/repos/tkomstadius/bruse/issues/6","number":6,"state":"open","locked":false,"title":"Feature/dropbox files","user":{"login":"klaseskilson","id":1674076,"avatar_url":"https://avatars.githubusercontent.com/u/1674076?v=3","gravatar_id":"","url":"https://api.github.com/users/klaseskilson","html_url":"https://github.com/klaseskilson","followers_url":"https://api.github.com/users/klaseskilson/followers","following_url":"https://api.github.com/users/klaseskilson/following{/other_user}","gists_url":"https://api.github.com/users/klaseskilson/gists{/gist_id}","starred_url":"https://api.github.com/users/klaseskilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klaseskilson/subscriptions","organizations_url":"https://api.github.com/users/klaseskilson/orgs","repos_url":"https://api.github.com/users/klaseskilson/repos","events_url":"https://api.github.com/users/klaseskilson/events{/privacy}","received_events_url":"https://api.github.com/users/klaseskilson/received_events","type":"User","site_admin":false},"body":"Dropbox file browsing! Save files from Dropbox!","created_at":"2015-03-06T13:11:59Z","updated_at":"2015-03-06T13:59:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7b784d31bbbe63d822600e6cee848922c13d822","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tkomstadius/bruse/pulls/6/commits","review_comments_url":"https://api.github.com/repos/tkomstadius/bruse/pulls/6/comments","review_comment_url":"https://api.github.com/repos/tkomstadius/bruse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tkomstadius/bruse/issues/6/comments","statuses_url":"https://api.github.com/repos/tkomstadius/bruse/statuses/d8f2543b20e44d5ff93ad7ece3de0a378295389b","head":{"label":"tkomstadius:feature/dropbox-files","ref":"feature/dropbox-files","sha":"d8f2543b20e44d5ff93ad7ece3de0a378295389b","user":{"login":"tkomstadius","id":6851652,"avatar_url":"https://avatars.githubusercontent.com/u/6851652?v=3","gravatar_id":"","url":"https://api.github.com/users/tkomstadius","html_url":"https://github.com/tkomstadius","followers_url":"https://api.github.com/users/tkomstadius/followers","following_url":"https://api.github.com/users/tkomstadius/following{/other_user}","gists_url":"https://api.github.com/users/tkomstadius/gists{/gist_id}","starred_url":"https://api.github.com/users/tkomstadius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkomstadius/subscriptions","organizations_url":"https://api.github.com/users/tkomstadius/orgs","repos_url":"https://api.github.com/users/tkomstadius/repos","events_url":"https://api.github.com/users/tkomstadius/events{/privacy}","received_events_url":"https://api.github.com/users/tkomstadius/received_events","type":"User","site_admin":false},"repo":{"id":30348061,"name":"bruse","full_name":"tkomstadius/bruse","owner":{"login":"tkomstadius","id":6851652,"avatar_url":"https://avatars.githubusercontent.com/u/6851652?v=3","gravatar_id":"","url":"https://api.github.com/users/tkomstadius","html_url":"https://github.com/tkomstadius","followers_url":"https://api.github.com/users/tkomstadius/followers","following_url":"https://api.github.com/users/tkomstadius/following{/other_user}","gists_url":"https://api.github.com/users/tkomstadius/gists{/gist_id}","starred_url":"https://api.github.com/users/tkomstadius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkomstadius/subscriptions","organizations_url":"https://api.github.com/users/tkomstadius/orgs","repos_url":"https://api.github.com/users/tkomstadius/repos","events_url":"https://api.github.com/users/tkomstadius/events{/privacy}","received_events_url":"https://api.github.com/users/tkomstadius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tkomstadius/bruse","description":"Projekt i kursen TNM094 - KEx","fork":false,"url":"https://api.github.com/repos/tkomstadius/bruse","forks_url":"https://api.github.com/repos/tkomstadius/bruse/forks","keys_url":"https://api.github.com/repos/tkomstadius/bruse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tkomstadius/bruse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tkomstadius/bruse/teams","hooks_url":"https://api.github.com/repos/tkomstadius/bruse/hooks","issue_events_url":"https://api.github.com/repos/tkomstadius/bruse/issues/events{/number}","events_url":"https://api.github.com/repos/tkomstadius/bruse/events","assignees_url":"https://api.github.com/repos/tkomstadius/bruse/assignees{/user}","branches_url":"https://api.github.com/repos/tkomstadius/bruse/branches{/branch}","tags_url":"https://api.github.com/repos/tkomstadius/bruse/tags","blobs_url":"https://api.github.com/repos/tkomstadius/bruse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tkomstadius/bruse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tkomstadius/bruse/git/refs{/sha}","trees_url":"https://api.github.com/repos/tkomstadius/bruse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tkomstadius/bruse/statuses/{sha}","languages_url":"https://api.github.com/repos/tkomstadius/bruse/languages","stargazers_url":"https://api.github.com/repos/tkomstadius/bruse/stargazers","contributors_url":"https://api.github.com/repos/tkomstadius/bruse/contributors","subscribers_url":"https://api.github.com/repos/tkomstadius/bruse/subscribers","subscription_url":"https://api.github.com/repos/tkomstadius/bruse/subscription","commits_url":"https://api.github.com/repos/tkomstadius/bruse/commits{/sha}","git_commits_url":"https://api.github.com/repos/tkomstadius/bruse/git/commits{/sha}","comments_url":"https://api.github.com/repos/tkomstadius/bruse/comments{/number}","issue_comment_url":"https://api.github.com/repos/tkomstadius/bruse/issues/comments{/number}","contents_url":"https://api.github.com/repos/tkomstadius/bruse/contents/{+path}","compare_url":"https://api.github.com/repos/tkomstadius/bruse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tkomstadius/bruse/merges","archive_url":"https://api.github.com/repos/tkomstadius/bruse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tkomstadius/bruse/downloads","issues_url":"https://api.github.com/repos/tkomstadius/bruse/issues{/number}","pulls_url":"https://api.github.com/repos/tkomstadius/bruse/pulls{/number}","milestones_url":"https://api.github.com/repos/tkomstadius/bruse/milestones{/number}","notifications_url":"https://api.github.com/repos/tkomstadius/bruse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tkomstadius/bruse/labels{/name}","releases_url":"https://api.github.com/repos/tkomstadius/bruse/releases{/id}","created_at":"2015-02-05T09:41:40Z","updated_at":"2015-03-06T10:54:54Z","pushed_at":"2015-03-06T13:00:40Z","git_url":"git://github.com/tkomstadius/bruse.git","ssh_url":"git@github.com:tkomstadius/bruse.git","clone_url":"https://github.com/tkomstadius/bruse.git","svn_url":"https://github.com/tkomstadius/bruse","homepage":"","size":440,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"tkomstadius:develop","ref":"develop","sha":"5483a672ec7cc324263cb5acf863e08bdefdfd5f","user":{"login":"tkomstadius","id":6851652,"avatar_url":"https://avatars.githubusercontent.com/u/6851652?v=3","gravatar_id":"","url":"https://api.github.com/users/tkomstadius","html_url":"https://github.com/tkomstadius","followers_url":"https://api.github.com/users/tkomstadius/followers","following_url":"https://api.github.com/users/tkomstadius/following{/other_user}","gists_url":"https://api.github.com/users/tkomstadius/gists{/gist_id}","starred_url":"https://api.github.com/users/tkomstadius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkomstadius/subscriptions","organizations_url":"https://api.github.com/users/tkomstadius/orgs","repos_url":"https://api.github.com/users/tkomstadius/repos","events_url":"https://api.github.com/users/tkomstadius/events{/privacy}","received_events_url":"https://api.github.com/users/tkomstadius/received_events","type":"User","site_admin":false},"repo":{"id":30348061,"name":"bruse","full_name":"tkomstadius/bruse","owner":{"login":"tkomstadius","id":6851652,"avatar_url":"https://avatars.githubusercontent.com/u/6851652?v=3","gravatar_id":"","url":"https://api.github.com/users/tkomstadius","html_url":"https://github.com/tkomstadius","followers_url":"https://api.github.com/users/tkomstadius/followers","following_url":"https://api.github.com/users/tkomstadius/following{/other_user}","gists_url":"https://api.github.com/users/tkomstadius/gists{/gist_id}","starred_url":"https://api.github.com/users/tkomstadius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkomstadius/subscriptions","organizations_url":"https://api.github.com/users/tkomstadius/orgs","repos_url":"https://api.github.com/users/tkomstadius/repos","events_url":"https://api.github.com/users/tkomstadius/events{/privacy}","received_events_url":"https://api.github.com/users/tkomstadius/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tkomstadius/bruse","description":"Projekt i kursen TNM094 - KEx","fork":false,"url":"https://api.github.com/repos/tkomstadius/bruse","forks_url":"https://api.github.com/repos/tkomstadius/bruse/forks","keys_url":"https://api.github.com/repos/tkomstadius/bruse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tkomstadius/bruse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tkomstadius/bruse/teams","hooks_url":"https://api.github.com/repos/tkomstadius/bruse/hooks","issue_events_url":"https://api.github.com/repos/tkomstadius/bruse/issues/events{/number}","events_url":"https://api.github.com/repos/tkomstadius/bruse/events","assignees_url":"https://api.github.com/repos/tkomstadius/bruse/assignees{/user}","branches_url":"https://api.github.com/repos/tkomstadius/bruse/branches{/branch}","tags_url":"https://api.github.com/repos/tkomstadius/bruse/tags","blobs_url":"https://api.github.com/repos/tkomstadius/bruse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tkomstadius/bruse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tkomstadius/bruse/git/refs{/sha}","trees_url":"https://api.github.com/repos/tkomstadius/bruse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tkomstadius/bruse/statuses/{sha}","languages_url":"https://api.github.com/repos/tkomstadius/bruse/languages","stargazers_url":"https://api.github.com/repos/tkomstadius/bruse/stargazers","contributors_url":"https://api.github.com/repos/tkomstadius/bruse/contributors","subscribers_url":"https://api.github.com/repos/tkomstadius/bruse/subscribers","subscription_url":"https://api.github.com/repos/tkomstadius/bruse/subscription","commits_url":"https://api.github.com/repos/tkomstadius/bruse/commits{/sha}","git_commits_url":"https://api.github.com/repos/tkomstadius/bruse/git/commits{/sha}","comments_url":"https://api.github.com/repos/tkomstadius/bruse/comments{/number}","issue_comment_url":"https://api.github.com/repos/tkomstadius/bruse/issues/comments{/number}","contents_url":"https://api.github.com/repos/tkomstadius/bruse/contents/{+path}","compare_url":"https://api.github.com/repos/tkomstadius/bruse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tkomstadius/bruse/merges","archive_url":"https://api.github.com/repos/tkomstadius/bruse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tkomstadius/bruse/downloads","issues_url":"https://api.github.com/repos/tkomstadius/bruse/issues{/number}","pulls_url":"https://api.github.com/repos/tkomstadius/bruse/pulls{/number}","milestones_url":"https://api.github.com/repos/tkomstadius/bruse/milestones{/number}","notifications_url":"https://api.github.com/repos/tkomstadius/bruse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tkomstadius/bruse/labels{/name}","releases_url":"https://api.github.com/repos/tkomstadius/bruse/releases{/id}","created_at":"2015-02-05T09:41:40Z","updated_at":"2015-03-06T10:54:54Z","pushed_at":"2015-03-06T13:00:40Z","git_url":"git://github.com/tkomstadius/bruse.git","ssh_url":"git@github.com:tkomstadius/bruse.git","clone_url":"https://github.com/tkomstadius/bruse.git","svn_url":"https://github.com/tkomstadius/bruse","homepage":"","size":440,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/tkomstadius/bruse/pulls/6"},"html":{"href":"https://github.com/tkomstadius/bruse/pull/6"},"issue":{"href":"https://api.github.com/repos/tkomstadius/bruse/issues/6"},"comments":{"href":"https://api.github.com/repos/tkomstadius/bruse/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/tkomstadius/bruse/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/tkomstadius/bruse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tkomstadius/bruse/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/tkomstadius/bruse/statuses/d8f2543b20e44d5ff93ad7ece3de0a378295389b"}}}}