{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/servey_01/pulls/comments/185976845","pull_request_review_id":117478149,"id":185976845,"diff_hunk":"@@ -1844,6 +1844,37 @@ jQuery(document).ready(function () {\n         .fail(function (data) {});\n     });\n \n+    //preview\n+\n+    $('#preview-survey-btn').click(function (e) {\n+        e.preventDefault();\n+\n+        var valid = validateSurvey();\n+        var urlLocation = $(this).attr('url-location');\n+        var dataArray = $('form.survey-form').serializeArray();\n+        var survey = getSurvey(dataArray);\n+        var data = JSON.stringify(survey);\n+\n+        if (!valid || !survey) {\n+            return;\n+        }\n+\n+        $.ajax({\n+            method: 'POST',\n+            url: $(this).data('url'),\n+            data: {\n+                data: data\n+            }\n+        })\n+        .done(function (data) {\n+            if (data.success) {\n+                window.open(urlLocation);\n+            }\n+        })\n+        .fail(function (data) {","path":"resources/assets/templates/survey/js/builder-custom.js","position":40,"original_position":40,"commit_id":"31e0e102ea9afebea6fd3bc9a8ea50f1e16d55ac","original_commit_id":"31e0e102ea9afebea6fd3bc9a8ea50f1e16d55ac","user":{"login":"nguyenhathanh2212","id":18241956,"avatar_url":"https://avatars1.githubusercontent.com/u/18241956?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenhathanh2212","html_url":"https://github.com/nguyenhathanh2212","followers_url":"https://api.github.com/users/nguyenhathanh2212/followers","following_url":"https://api.github.com/users/nguyenhathanh2212/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhathanh2212/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhathanh2212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhathanh2212/subscriptions","organizations_url":"https://api.github.com/users/nguyenhathanh2212/orgs","repos_url":"https://api.github.com/users/nguyenhathanh2212/repos","events_url":"https://api.github.com/users/nguyenhathanh2212/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhathanh2212/received_events","type":"User","site_admin":false},"body":"tính ra là t copy của m á :)) dòng 1844","created_at":"2018-05-04T01:38:19Z","updated_at":"2018-05-04T01:39:48Z","html_url":"https://github.com/framgia/servey_01/pull/248#discussion_r185976845","pull_request_url":"https://api.github.com/repos/framgia/servey_01/pulls/248","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/comments/185976845"},"html":{"href":"https://github.com/framgia/servey_01/pull/248#discussion_r185976845"},"pull_request":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/248"}},"in_reply_to_id":185975398},"pull_request":{"url":"https://api.github.com/repos/framgia/servey_01/pulls/248","id":185608722,"html_url":"https://github.com/framgia/servey_01/pull/248","diff_url":"https://github.com/framgia/servey_01/pull/248.diff","patch_url":"https://github.com/framgia/servey_01/pull/248.patch","issue_url":"https://api.github.com/repos/framgia/servey_01/issues/248","number":248,"state":"open","locked":false,"title":"manage preview","user":{"login":"nguyenhathanh2212","id":18241956,"avatar_url":"https://avatars1.githubusercontent.com/u/18241956?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenhathanh2212","html_url":"https://github.com/nguyenhathanh2212","followers_url":"https://api.github.com/users/nguyenhathanh2212/followers","following_url":"https://api.github.com/users/nguyenhathanh2212/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhathanh2212/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhathanh2212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhathanh2212/subscriptions","organizations_url":"https://api.github.com/users/nguyenhathanh2212/orgs","repos_url":"https://api.github.com/users/nguyenhathanh2212/repos","events_url":"https://api.github.com/users/nguyenhathanh2212/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhathanh2212/received_events","type":"User","site_admin":false},"body":"redmine : https://dev.framgia.com/redmine/issues/169193\r\n![peek 2018-05-03 10-01](https://user-images.githubusercontent.com/18241956/39558666-c816eaca-4eba-11e8-96e8-b4b14eb04050.gif)\r\n\r\n\r\n\r\n\r\n\r\n![peek 2018-05-03 10-03](https://user-images.githubusercontent.com/18241956/39558667-c84cc028-4eba-11e8-9871-5795ff0e543c.gif)\r\n","created_at":"2018-05-03T03:14:57Z","updated_at":"2018-05-04T01:39:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3008e95433196e7737dec0628a75eb6e60bf142f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/servey_01/pulls/248/commits","review_comments_url":"https://api.github.com/repos/framgia/servey_01/pulls/248/comments","review_comment_url":"https://api.github.com/repos/framgia/servey_01/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/servey_01/issues/248/comments","statuses_url":"https://api.github.com/repos/framgia/servey_01/statuses/31e0e102ea9afebea6fd3bc9a8ea50f1e16d55ac","head":{"label":"nguyenhathanh2212:import-data-preview","ref":"import-data-preview","sha":"31e0e102ea9afebea6fd3bc9a8ea50f1e16d55ac","user":{"login":"nguyenhathanh2212","id":18241956,"avatar_url":"https://avatars1.githubusercontent.com/u/18241956?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenhathanh2212","html_url":"https://github.com/nguyenhathanh2212","followers_url":"https://api.github.com/users/nguyenhathanh2212/followers","following_url":"https://api.github.com/users/nguyenhathanh2212/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhathanh2212/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhathanh2212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhathanh2212/subscriptions","organizations_url":"https://api.github.com/users/nguyenhathanh2212/orgs","repos_url":"https://api.github.com/users/nguyenhathanh2212/repos","events_url":"https://api.github.com/users/nguyenhathanh2212/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhathanh2212/received_events","type":"User","site_admin":false},"repo":{"id":126939046,"name":"servey_01","full_name":"nguyenhathanh2212/servey_01","owner":{"login":"nguyenhathanh2212","id":18241956,"avatar_url":"https://avatars1.githubusercontent.com/u/18241956?v=4","gravatar_id":"","url":"https://api.github.com/users/nguyenhathanh2212","html_url":"https://github.com/nguyenhathanh2212","followers_url":"https://api.github.com/users/nguyenhathanh2212/followers","following_url":"https://api.github.com/users/nguyenhathanh2212/following{/other_user}","gists_url":"https://api.github.com/users/nguyenhathanh2212/gists{/gist_id}","starred_url":"https://api.github.com/users/nguyenhathanh2212/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nguyenhathanh2212/subscriptions","organizations_url":"https://api.github.com/users/nguyenhathanh2212/orgs","repos_url":"https://api.github.com/users/nguyenhathanh2212/repos","events_url":"https://api.github.com/users/nguyenhathanh2212/events{/privacy}","received_events_url":"https://api.github.com/users/nguyenhathanh2212/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nguyenhathanh2212/servey_01","description":null,"fork":true,"url":"https://api.github.com/repos/nguyenhathanh2212/servey_01","forks_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/forks","keys_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/teams","hooks_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/hooks","issue_events_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/issues/events{/number}","events_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/events","assignees_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/assignees{/user}","branches_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/branches{/branch}","tags_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/tags","blobs_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/statuses/{sha}","languages_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/languages","stargazers_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/stargazers","contributors_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/contributors","subscribers_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/subscribers","subscription_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/subscription","commits_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/contents/{+path}","compare_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/merges","archive_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/downloads","issues_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/issues{/number}","pulls_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/pulls{/number}","milestones_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/milestones{/number}","notifications_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/labels{/name}","releases_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/releases{/id}","deployments_url":"https://api.github.com/repos/nguyenhathanh2212/servey_01/deployments","created_at":"2018-03-27T06:24:45Z","updated_at":"2018-03-27T06:24:47Z","pushed_at":"2018-05-03T09:49:35Z","git_url":"git://github.com/nguyenhathanh2212/servey_01.git","ssh_url":"git@github.com:nguyenhathanh2212/servey_01.git","clone_url":"https://github.com/nguyenhathanh2212/servey_01.git","svn_url":"https://github.com/nguyenhathanh2212/servey_01","homepage":null,"size":18944,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"framgia:improve_view","ref":"improve_view","sha":"07465d46b0cd3b3fca39fd71b857aa7e56eccc3a","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":78068076,"name":"servey_01","full_name":"framgia/servey_01","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/servey_01","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/servey_01","forks_url":"https://api.github.com/repos/framgia/servey_01/forks","keys_url":"https://api.github.com/repos/framgia/servey_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/servey_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/servey_01/teams","hooks_url":"https://api.github.com/repos/framgia/servey_01/hooks","issue_events_url":"https://api.github.com/repos/framgia/servey_01/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/servey_01/events","assignees_url":"https://api.github.com/repos/framgia/servey_01/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/servey_01/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/servey_01/tags","blobs_url":"https://api.github.com/repos/framgia/servey_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/servey_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/servey_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/servey_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/servey_01/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/servey_01/languages","stargazers_url":"https://api.github.com/repos/framgia/servey_01/stargazers","contributors_url":"https://api.github.com/repos/framgia/servey_01/contributors","subscribers_url":"https://api.github.com/repos/framgia/servey_01/subscribers","subscription_url":"https://api.github.com/repos/framgia/servey_01/subscription","commits_url":"https://api.github.com/repos/framgia/servey_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/servey_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/servey_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/servey_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/servey_01/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/servey_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/servey_01/merges","archive_url":"https://api.github.com/repos/framgia/servey_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/servey_01/downloads","issues_url":"https://api.github.com/repos/framgia/servey_01/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/servey_01/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/servey_01/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/servey_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/servey_01/labels{/name}","releases_url":"https://api.github.com/repos/framgia/servey_01/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/servey_01/deployments","created_at":"2017-01-05T01:37:19Z","updated_at":"2018-03-29T02:58:47Z","pushed_at":"2018-05-04T01:29:42Z","git_url":"git://github.com/framgia/servey_01.git","ssh_url":"git@github.com:framgia/servey_01.git","clone_url":"https://github.com/framgia/servey_01.git","svn_url":"https://github.com/framgia/servey_01","homepage":null,"size":18932,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":12,"open_issues":3,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/248"},"html":{"href":"https://github.com/framgia/servey_01/pull/248"},"issue":{"href":"https://api.github.com/repos/framgia/servey_01/issues/248"},"comments":{"href":"https://api.github.com/repos/framgia/servey_01/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/servey_01/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/servey_01/statuses/31e0e102ea9afebea6fd3bc9a8ea50f1e16d55ac"}},"author_association":"NONE"}}
{"actor":{"display_login":"nguyenhathanh2212"}}