{"action":"created","comment":{"url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/comments/92839769","pull_request_review_id":13362938,"id":92839769,"diff_hunk":"@@ -302,36 +302,50 @@ function StudioEditableXBlock(runtime, element) {\n \n     };\n \n+    var showUploadStatus = function($element, filename){\n+        $element.find('.status-upload').text('File ' + '\"' + filename + '\"' + ' uploaded successfully').show();\n+        setTimeout(function(){\n+            $('.status-upload', $element).hide()\n+        }, 5000);\n+    };\n+\n     $fileUploader.on('change', function(event) {\n         var fieldName = $(event.currentTarget).attr('data-change-field-name');\n         var lang = $(event.currentTarget).attr('data-lang-code');\n         var label = $(event.currentTarget).attr('data-lang-label');\n         var currentLiIndex = $(event.currentTarget).attr('data-li-index');\n         var currentLiTag = $('.language-transcript-selector').children()[parseInt(currentLiIndex)];\n         $('.upload-setting', element).addClass('is-disabled');\n-        $('.file-uploader-form', element).ajaxSubmit({\n-            success: function(response, statusText, xhr, form) {\n-                if(fieldName == \"handout\"){\n-                    $('input[data-field-name=' + fieldName + ']').val(response['asset']['id']).change();\n-                } else {\n+        if($fileUploader.val()){\n+            $('.file-uploader-form', element).ajaxSubmit({\n+                success: function(response, statusText, xhr, form) {","path":"video_xblock/static/js/studio_edit.js","position":34,"original_position":34,"commit_id":"3fa7c32e73831727543a7f1537503f2ce6e8ff9f","original_commit_id":"3fa7c32e73831727543a7f1537503f2ce6e8ff9f","user":{"login":"z4y4ts","id":453047,"avatar_url":"https://avatars.githubusercontent.com/u/453047?v=3","gravatar_id":"","url":"https://api.github.com/users/z4y4ts","html_url":"https://github.com/z4y4ts","followers_url":"https://api.github.com/users/z4y4ts/followers","following_url":"https://api.github.com/users/z4y4ts/following{/other_user}","gists_url":"https://api.github.com/users/z4y4ts/gists{/gist_id}","starred_url":"https://api.github.com/users/z4y4ts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z4y4ts/subscriptions","organizations_url":"https://api.github.com/users/z4y4ts/orgs","repos_url":"https://api.github.com/users/z4y4ts/repos","events_url":"https://api.github.com/users/z4y4ts/events{/privacy}","received_events_url":"https://api.github.com/users/z4y4ts/received_events","type":"User","site_admin":false},"body":"Please extract success callback into a function for easier reading.","created_at":"2016-12-16T16:20:46Z","updated_at":"2016-12-16T16:25:42Z","html_url":"https://github.com/raccoongang/xblock-video/pull/29#discussion_r92839769","pull_request_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/comments/92839769"},"html":{"href":"https://github.com/raccoongang/xblock-video/pull/29#discussion_r92839769"},"pull_request":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/29","id":98358796,"html_url":"https://github.com/raccoongang/xblock-video/pull/29","diff_url":"https://github.com/raccoongang/xblock-video/pull/29.diff","patch_url":"https://github.com/raccoongang/xblock-video/pull/29.patch","issue_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/29","number":29,"state":"open","locked":false,"title":"Fixed bugs","user":{"login":"sendr","id":1757048,"avatar_url":"https://avatars.githubusercontent.com/u/1757048?v=3","gravatar_id":"","url":"https://api.github.com/users/sendr","html_url":"https://github.com/sendr","followers_url":"https://api.github.com/users/sendr/followers","following_url":"https://api.github.com/users/sendr/following{/other_user}","gists_url":"https://api.github.com/users/sendr/gists{/gist_id}","starred_url":"https://api.github.com/users/sendr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sendr/subscriptions","organizations_url":"https://api.github.com/users/sendr/orgs","repos_url":"https://api.github.com/users/sendr/repos","events_url":"https://api.github.com/users/sendr/events{/privacy}","received_events_url":"https://api.github.com/users/sendr/received_events","type":"User","site_admin":false},"body":" - 500 error with canceling of file upload\r\n - Handout download on both sides\r\n - Add status of upload handout\r\n - Add name of file to status of uploading\r\n - Add name of file to download attribute in button \"Download\"\r\n - After uploading handout replace wording \"Upload\" to \"Replace\" in button","created_at":"2016-12-16T16:02:01Z","updated_at":"2016-12-16T16:25:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"848bcefa1aac264ab1c4ae18346916f602cd65b8","assignee":{"login":"z4y4ts","id":453047,"avatar_url":"https://avatars.githubusercontent.com/u/453047?v=3","gravatar_id":"","url":"https://api.github.com/users/z4y4ts","html_url":"https://github.com/z4y4ts","followers_url":"https://api.github.com/users/z4y4ts/followers","following_url":"https://api.github.com/users/z4y4ts/following{/other_user}","gists_url":"https://api.github.com/users/z4y4ts/gists{/gist_id}","starred_url":"https://api.github.com/users/z4y4ts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z4y4ts/subscriptions","organizations_url":"https://api.github.com/users/z4y4ts/orgs","repos_url":"https://api.github.com/users/z4y4ts/repos","events_url":"https://api.github.com/users/z4y4ts/events{/privacy}","received_events_url":"https://api.github.com/users/z4y4ts/received_events","type":"User","site_admin":false},"assignees":[{"login":"z4y4ts","id":453047,"avatar_url":"https://avatars.githubusercontent.com/u/453047?v=3","gravatar_id":"","url":"https://api.github.com/users/z4y4ts","html_url":"https://github.com/z4y4ts","followers_url":"https://api.github.com/users/z4y4ts/followers","following_url":"https://api.github.com/users/z4y4ts/following{/other_user}","gists_url":"https://api.github.com/users/z4y4ts/gists{/gist_id}","starred_url":"https://api.github.com/users/z4y4ts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/z4y4ts/subscriptions","organizations_url":"https://api.github.com/users/z4y4ts/orgs","repos_url":"https://api.github.com/users/z4y4ts/repos","events_url":"https://api.github.com/users/z4y4ts/events{/privacy}","received_events_url":"https://api.github.com/users/z4y4ts/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/29/commits","review_comments_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/29/comments","review_comment_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls/comments{/number}","comments_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/29/comments","statuses_url":"https://api.github.com/repos/raccoongang/xblock-video/statuses/3fa7c32e73831727543a7f1537503f2ce6e8ff9f","head":{"label":"raccoongang:bugfix/upload-download-handout","ref":"bugfix/upload-download-handout","sha":"3fa7c32e73831727543a7f1537503f2ce6e8ff9f","user":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"repo":{"id":72450225,"name":"xblock-video","full_name":"raccoongang/xblock-video","owner":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raccoongang/xblock-video","description":"Universal Video XBlock with pluggable backend for many video hosting providers","fork":true,"url":"https://api.github.com/repos/raccoongang/xblock-video","forks_url":"https://api.github.com/repos/raccoongang/xblock-video/forks","keys_url":"https://api.github.com/repos/raccoongang/xblock-video/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raccoongang/xblock-video/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raccoongang/xblock-video/teams","hooks_url":"https://api.github.com/repos/raccoongang/xblock-video/hooks","issue_events_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/events{/number}","events_url":"https://api.github.com/repos/raccoongang/xblock-video/events","assignees_url":"https://api.github.com/repos/raccoongang/xblock-video/assignees{/user}","branches_url":"https://api.github.com/repos/raccoongang/xblock-video/branches{/branch}","tags_url":"https://api.github.com/repos/raccoongang/xblock-video/tags","blobs_url":"https://api.github.com/repos/raccoongang/xblock-video/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raccoongang/xblock-video/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raccoongang/xblock-video/git/refs{/sha}","trees_url":"https://api.github.com/repos/raccoongang/xblock-video/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raccoongang/xblock-video/statuses/{sha}","languages_url":"https://api.github.com/repos/raccoongang/xblock-video/languages","stargazers_url":"https://api.github.com/repos/raccoongang/xblock-video/stargazers","contributors_url":"https://api.github.com/repos/raccoongang/xblock-video/contributors","subscribers_url":"https://api.github.com/repos/raccoongang/xblock-video/subscribers","subscription_url":"https://api.github.com/repos/raccoongang/xblock-video/subscription","commits_url":"https://api.github.com/repos/raccoongang/xblock-video/commits{/sha}","git_commits_url":"https://api.github.com/repos/raccoongang/xblock-video/git/commits{/sha}","comments_url":"https://api.github.com/repos/raccoongang/xblock-video/comments{/number}","issue_comment_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/comments{/number}","contents_url":"https://api.github.com/repos/raccoongang/xblock-video/contents/{+path}","compare_url":"https://api.github.com/repos/raccoongang/xblock-video/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raccoongang/xblock-video/merges","archive_url":"https://api.github.com/repos/raccoongang/xblock-video/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raccoongang/xblock-video/downloads","issues_url":"https://api.github.com/repos/raccoongang/xblock-video/issues{/number}","pulls_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls{/number}","milestones_url":"https://api.github.com/repos/raccoongang/xblock-video/milestones{/number}","notifications_url":"https://api.github.com/repos/raccoongang/xblock-video/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raccoongang/xblock-video/labels{/name}","releases_url":"https://api.github.com/repos/raccoongang/xblock-video/releases{/id}","deployments_url":"https://api.github.com/repos/raccoongang/xblock-video/deployments","created_at":"2016-10-31T15:30:25Z","updated_at":"2016-11-30T17:10:35Z","pushed_at":"2016-12-16T16:02:01Z","git_url":"git://github.com/raccoongang/xblock-video.git","ssh_url":"git@github.com:raccoongang/xblock-video.git","clone_url":"https://github.com/raccoongang/xblock-video.git","svn_url":"https://github.com/raccoongang/xblock-video","homepage":null,"size":3652,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"raccoongang:dev","ref":"dev","sha":"40d318e2e5cf5296ba3d98c5e1296197e4c09949","user":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"repo":{"id":72450225,"name":"xblock-video","full_name":"raccoongang/xblock-video","owner":{"login":"raccoongang","id":11388447,"avatar_url":"https://avatars.githubusercontent.com/u/11388447?v=3","gravatar_id":"","url":"https://api.github.com/users/raccoongang","html_url":"https://github.com/raccoongang","followers_url":"https://api.github.com/users/raccoongang/followers","following_url":"https://api.github.com/users/raccoongang/following{/other_user}","gists_url":"https://api.github.com/users/raccoongang/gists{/gist_id}","starred_url":"https://api.github.com/users/raccoongang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raccoongang/subscriptions","organizations_url":"https://api.github.com/users/raccoongang/orgs","repos_url":"https://api.github.com/users/raccoongang/repos","events_url":"https://api.github.com/users/raccoongang/events{/privacy}","received_events_url":"https://api.github.com/users/raccoongang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raccoongang/xblock-video","description":"Universal Video XBlock with pluggable backend for many video hosting providers","fork":true,"url":"https://api.github.com/repos/raccoongang/xblock-video","forks_url":"https://api.github.com/repos/raccoongang/xblock-video/forks","keys_url":"https://api.github.com/repos/raccoongang/xblock-video/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raccoongang/xblock-video/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raccoongang/xblock-video/teams","hooks_url":"https://api.github.com/repos/raccoongang/xblock-video/hooks","issue_events_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/events{/number}","events_url":"https://api.github.com/repos/raccoongang/xblock-video/events","assignees_url":"https://api.github.com/repos/raccoongang/xblock-video/assignees{/user}","branches_url":"https://api.github.com/repos/raccoongang/xblock-video/branches{/branch}","tags_url":"https://api.github.com/repos/raccoongang/xblock-video/tags","blobs_url":"https://api.github.com/repos/raccoongang/xblock-video/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raccoongang/xblock-video/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raccoongang/xblock-video/git/refs{/sha}","trees_url":"https://api.github.com/repos/raccoongang/xblock-video/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raccoongang/xblock-video/statuses/{sha}","languages_url":"https://api.github.com/repos/raccoongang/xblock-video/languages","stargazers_url":"https://api.github.com/repos/raccoongang/xblock-video/stargazers","contributors_url":"https://api.github.com/repos/raccoongang/xblock-video/contributors","subscribers_url":"https://api.github.com/repos/raccoongang/xblock-video/subscribers","subscription_url":"https://api.github.com/repos/raccoongang/xblock-video/subscription","commits_url":"https://api.github.com/repos/raccoongang/xblock-video/commits{/sha}","git_commits_url":"https://api.github.com/repos/raccoongang/xblock-video/git/commits{/sha}","comments_url":"https://api.github.com/repos/raccoongang/xblock-video/comments{/number}","issue_comment_url":"https://api.github.com/repos/raccoongang/xblock-video/issues/comments{/number}","contents_url":"https://api.github.com/repos/raccoongang/xblock-video/contents/{+path}","compare_url":"https://api.github.com/repos/raccoongang/xblock-video/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raccoongang/xblock-video/merges","archive_url":"https://api.github.com/repos/raccoongang/xblock-video/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raccoongang/xblock-video/downloads","issues_url":"https://api.github.com/repos/raccoongang/xblock-video/issues{/number}","pulls_url":"https://api.github.com/repos/raccoongang/xblock-video/pulls{/number}","milestones_url":"https://api.github.com/repos/raccoongang/xblock-video/milestones{/number}","notifications_url":"https://api.github.com/repos/raccoongang/xblock-video/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raccoongang/xblock-video/labels{/name}","releases_url":"https://api.github.com/repos/raccoongang/xblock-video/releases{/id}","deployments_url":"https://api.github.com/repos/raccoongang/xblock-video/deployments","created_at":"2016-10-31T15:30:25Z","updated_at":"2016-11-30T17:10:35Z","pushed_at":"2016-12-16T16:02:01Z","git_url":"git://github.com/raccoongang/xblock-video.git","ssh_url":"git@github.com:raccoongang/xblock-video.git","clone_url":"https://github.com/raccoongang/xblock-video.git","svn_url":"https://github.com/raccoongang/xblock-video","homepage":null,"size":3652,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/29"},"html":{"href":"https://github.com/raccoongang/xblock-video/pull/29"},"issue":{"href":"https://api.github.com/repos/raccoongang/xblock-video/issues/29"},"comments":{"href":"https://api.github.com/repos/raccoongang/xblock-video/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/raccoongang/xblock-video/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/raccoongang/xblock-video/statuses/3fa7c32e73831727543a7f1537503f2ce6e8ff9f"}}}}
{"actor":{"display_login":"z4y4ts"}}