{"action":"created","comment":{"url":"https://api.github.com/repos/gdetrez/scanomatic/pulls/comments/152023332","pull_request_review_id":77821446,"id":152023332,"diff_hunk":"@@ -1,102 +1,102 @@\n-import React from 'react';\n-import ReactDOM from 'react-dom';\n+    import React from 'react';\n+    import ReactDOM from 'react-dom';\n \n-import {\n-    GetFixtures,\n-    GetPinningFormats,\n-    InitiateCCC,\n-} from './api';\n+    import {\n+        GetFixtures,\n+        GetPinningFormats,\n+        InitiateCCC,\n+    } from './api';\n \n-import CCCEditorContainer from './containers/CCCEditorContainer';\n+    import CCCEditorContainer from './containers/CCCEditorContainer';\n \n \n \n-window.cccFunctions = {\n-    initiateNewCcc: (species, reference, allFields) => {\n-        let valid = true;\n-        const validNameRegexp = /^[a-z]([0-9a-z_\\s])+$/i;\n-        const invalidNameMsg = \"This field may consist of a-z, 0-9, underscores and spaces, and must begin with a letter.\";\n+    window.cccFunctions = {\n+        initiateNewCcc: (species, reference, allFields) => {\n+            let valid = true;\n+            const validNameRegexp = /^[a-z]([0-9a-z_\\s])+$/i;\n+            const invalidNameMsg = \"This field may consist of a-z, 0-9, underscores and spaces, and must begin with a letter.\";\n \n-        allFields.removeClass(\"ui-state-error\");\n-\n-        valid = valid && cccFunctions.checkLength(\n-            species, 3, 20, \"species\");\n-        valid = valid && cccFunctions.checkLength(\n-            reference, 3, 20, \"reference\");\n-\n-        valid = valid && cccFunctions.checkName(\n-            species, validNameRegexp, invalidNameMsg);\n-        valid = valid && cccFunctions.checkName(\n-            reference, validNameRegexp, invalidNameMsg);\n-\n-        if (valid) {\n-            InitiateCCC(\n-                species.val(),\n-                reference.val(),\n-                cccFunctions.initiateCccSuccess,\n-                cccFunctions.initiateCccError);\n-        }\n-        return valid;\n-    },\n-    initiateCccError: (data) => {\n-        cccFunctions.updateTips(data.responseJSON.reason);\n-    },\n-    checkLength: (obj, min, max, field) => {\n-        if (obj.val().length > max || obj.val().length < min) {\n-            obj.addClass(\"ui-state-error\");\n-            cccFunctions.updateTips(\n-                `Length of ${field} must be between ${min} and ${max}.`);\n-            return false;\n-        } else {\n-            return true;\n-        }\n-    },\n-    checkName: (obj, regexp, message) => {\n-        if (!(regexp.test(obj.val()))) {\n-            obj.addClass(\"ui-state-error\");\n-            cccFunctions.updateTips(message);\n-            return false;\n-        } else {\n-            return true;\n-        }\n-    }\n-};\n+            allFields.removeClass(\"ui-state-error\");\n \n-window.executeCCC = function() {\n-    var selFixtureName = \"selFixtures\";\n-    var selPinFormatsName = \"selPinFormats\";\n-    var dialogCCCIni;\n-    var form;\n-    var species = $(\"#inSpecies\");\n-    var reference = $(\"#inReference\");\n-    var allFields = $([]).add(species).add(reference);\n-    var tips = $(\".validateTips\");\n-\n-   dialogCCCIni = $(\"#dialogFormIniCCC\").dialog({\n-        autoOpen: false,\n-        height: 400,\n-        width: 350,\n-        modal: true,\n-        buttons: {\n-            \"Initiate new CCC\": () => cccFunctions.initiateNewCcc(\n-                species, reference, allFields),\n-            Cancel: function() { dialogCCCIni.dialog(\"close\"); }\n+            valid = valid && cccFunctions.checkLength(\n+                species, 3, 20, \"species\");\n+            valid = valid && cccFunctions.checkLength(\n+                reference, 3, 20, \"reference\");\n+\n+            valid = valid && cccFunctions.checkName(\n+                species, validNameRegexp, invalidNameMsg);\n+            valid = valid && cccFunctions.checkName(\n+                reference, validNameRegexp, invalidNameMsg);\n+\n+            if (valid) {\n+                InitiateCCC(\n+                    species.val(),\n+                    reference.val(),\n+                    cccFunctions.initiateCccSuccess,\n+                    cccFunctions.initiateCccError);\n+            }\n+            return valid;\n         },\n-        close: function() {\n-            form[0].reset();\n-            allFields.removeClass(\"ui-state-error\");\n+        initiateCccError: (data) => {\n+            cccFunctions.updateTips(data.responseJSON.reason);\n+        },\n+        checkLength: (obj, min, max, field) => {\n+            if (obj.val().length > max || obj.val().length < min) {\n+                obj.addClass(\"ui-state-error\");\n+                cccFunctions.updateTips(\n+                    `Length of ${field} must be between ${min} and ${max}.`);\n+                return false;\n+            } else {\n+                return true;\n+            }\n+        },\n+        checkName: (obj, regexp, message) => {\n+            if (!(regexp.test(obj.val()))) {\n+                obj.addClass(\"ui-state-error\");\n+                cccFunctions.updateTips(message);\n+                return false;\n+            } else {\n+                return true;\n+            }\n         }\n-    });\n+    };\n \n-    form = dialogCCCIni.find(\"form\").on(\"submit\",\n-        function(event) {\n-            event.preventDefault();\n-            cccFunctions.initiateNewCcc(species, reference, allFields);\n+    window.executeCCC = function() {\n+        var selFixtureName = \"selFixtures\";\n+        var selPinFormatsName = \"selPinFormats\";","path":"scanomatic/ui_server_data/js/ccc/index.js","position":151,"original_position":151,"commit_id":"81927bb49626dba199c5ed9851d9254eb2308d7e","original_commit_id":"81927bb49626dba199c5ed9851d9254eb2308d7e","user":{"login":"stickler-ci","id":16011037,"avatar_url":"https://avatars3.githubusercontent.com/u/16011037?v=4","gravatar_id":"","url":"https://api.github.com/users/stickler-ci","html_url":"https://github.com/stickler-ci","followers_url":"https://api.github.com/users/stickler-ci/followers","following_url":"https://api.github.com/users/stickler-ci/following{/other_user}","gists_url":"https://api.github.com/users/stickler-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/stickler-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stickler-ci/subscriptions","organizations_url":"https://api.github.com/users/stickler-ci/orgs","repos_url":"https://api.github.com/users/stickler-ci/repos","events_url":"https://api.github.com/users/stickler-ci/events{/privacy}","received_events_url":"https://api.github.com/users/stickler-ci/received_events","type":"User","site_admin":false},"body":"Unexpected var, use let or const instead. (no-var)\nStrings must use singlequote. (quotes)","created_at":"2017-11-20T15:33:15Z","updated_at":"2017-11-20T15:33:17Z","html_url":"https://github.com/gdetrez/scanomatic/pull/5#discussion_r152023332","pull_request_url":"https://api.github.com/repos/gdetrez/scanomatic/pulls/5","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/gdetrez/scanomatic/pulls/comments/152023332"},"html":{"href":"https://github.com/gdetrez/scanomatic/pull/5#discussion_r152023332"},"pull_request":{"href":"https://api.github.com/repos/gdetrez/scanomatic/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/gdetrez/scanomatic/pulls/5","id":153659638,"html_url":"https://github.com/gdetrez/scanomatic/pull/5","diff_url":"https://github.com/gdetrez/scanomatic/pull/5.diff","patch_url":"https://github.com/gdetrez/scanomatic/pull/5.patch","issue_url":"https://api.github.com/repos/gdetrez/scanomatic/issues/5","number":5,"state":"open","locked":false,"title":"Test4","user":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars2.githubusercontent.com/u/38019?v=4","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-20T15:32:52Z","updated_at":"2017-11-20T15:33:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"508ace85ed17c3025765032cea8a8ad8b20e01b9","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/gdetrez/scanomatic/pulls/5/commits","review_comments_url":"https://api.github.com/repos/gdetrez/scanomatic/pulls/5/comments","review_comment_url":"https://api.github.com/repos/gdetrez/scanomatic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gdetrez/scanomatic/issues/5/comments","statuses_url":"https://api.github.com/repos/gdetrez/scanomatic/statuses/81927bb49626dba199c5ed9851d9254eb2308d7e","head":{"label":"gdetrez:test4","ref":"test4","sha":"81927bb49626dba199c5ed9851d9254eb2308d7e","user":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars2.githubusercontent.com/u/38019?v=4","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"repo":{"id":93157275,"name":"scanomatic","full_name":"gdetrez/scanomatic","owner":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars2.githubusercontent.com/u/38019?v=4","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gdetrez/scanomatic","description":"Scanomatic","fork":true,"url":"https://api.github.com/repos/gdetrez/scanomatic","forks_url":"https://api.github.com/repos/gdetrez/scanomatic/forks","keys_url":"https://api.github.com/repos/gdetrez/scanomatic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gdetrez/scanomatic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gdetrez/scanomatic/teams","hooks_url":"https://api.github.com/repos/gdetrez/scanomatic/hooks","issue_events_url":"https://api.github.com/repos/gdetrez/scanomatic/issues/events{/number}","events_url":"https://api.github.com/repos/gdetrez/scanomatic/events","assignees_url":"https://api.github.com/repos/gdetrez/scanomatic/assignees{/user}","branches_url":"https://api.github.com/repos/gdetrez/scanomatic/branches{/branch}","tags_url":"https://api.github.com/repos/gdetrez/scanomatic/tags","blobs_url":"https://api.github.com/repos/gdetrez/scanomatic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gdetrez/scanomatic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gdetrez/scanomatic/git/refs{/sha}","trees_url":"https://api.github.com/repos/gdetrez/scanomatic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gdetrez/scanomatic/statuses/{sha}","languages_url":"https://api.github.com/repos/gdetrez/scanomatic/languages","stargazers_url":"https://api.github.com/repos/gdetrez/scanomatic/stargazers","contributors_url":"https://api.github.com/repos/gdetrez/scanomatic/contributors","subscribers_url":"https://api.github.com/repos/gdetrez/scanomatic/subscribers","subscription_url":"https://api.github.com/repos/gdetrez/scanomatic/subscription","commits_url":"https://api.github.com/repos/gdetrez/scanomatic/commits{/sha}","git_commits_url":"https://api.github.com/repos/gdetrez/scanomatic/git/commits{/sha}","comments_url":"https://api.github.com/repos/gdetrez/scanomatic/comments{/number}","issue_comment_url":"https://api.github.com/repos/gdetrez/scanomatic/issues/comments{/number}","contents_url":"https://api.github.com/repos/gdetrez/scanomatic/contents/{+path}","compare_url":"https://api.github.com/repos/gdetrez/scanomatic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gdetrez/scanomatic/merges","archive_url":"https://api.github.com/repos/gdetrez/scanomatic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gdetrez/scanomatic/downloads","issues_url":"https://api.github.com/repos/gdetrez/scanomatic/issues{/number}","pulls_url":"https://api.github.com/repos/gdetrez/scanomatic/pulls{/number}","milestones_url":"https://api.github.com/repos/gdetrez/scanomatic/milestones{/number}","notifications_url":"https://api.github.com/repos/gdetrez/scanomatic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gdetrez/scanomatic/labels{/name}","releases_url":"https://api.github.com/repos/gdetrez/scanomatic/releases{/id}","deployments_url":"https://api.github.com/repos/gdetrez/scanomatic/deployments","created_at":"2017-06-02T10:59:28Z","updated_at":"2017-06-02T10:59:30Z","pushed_at":"2017-11-20T15:32:53Z","git_url":"git://github.com/gdetrez/scanomatic.git","ssh_url":"git@github.com:gdetrez/scanomatic.git","clone_url":"https://github.com/gdetrez/scanomatic.git","svn_url":"https://github.com/gdetrez/scanomatic","homepage":null,"size":40537,"stargazers_count":0,"watchers_count":0,"language":"Python","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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"gdetrez:master","ref":"master","sha":"5e6166d399b0f27a81f745e3bb314fe860361ac0","user":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars2.githubusercontent.com/u/38019?v=4","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"repo":{"id":93157275,"name":"scanomatic","full_name":"gdetrez/scanomatic","owner":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars2.githubusercontent.com/u/38019?v=4","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gdetrez/scanomatic","description":"Scanomatic","fork":true,"url":"https://api.github.com/repos/gdetrez/scanomatic","forks_url":"https://api.github.com/repos/gdetrez/scanomatic/forks","keys_url":"https://api.github.com/repos/gdetrez/scanomatic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gdetrez/scanomatic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gdetrez/scanomatic/teams","hooks_url":"https://api.github.com/repos/gdetrez/scanomatic/hooks","issue_events_url":"https://api.github.com/repos/gdetrez/scanomatic/issues/events{/number}","events_url":"https://api.github.com/repos/gdetrez/scanomatic/events","assignees_url":"https://api.github.com/repos/gdetrez/scanomatic/assignees{/user}","branches_url":"https://api.github.com/repos/gdetrez/scanomatic/branches{/branch}","tags_url":"https://api.github.com/repos/gdetrez/scanomatic/tags","blobs_url":"https://api.github.com/repos/gdetrez/scanomatic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gdetrez/scanomatic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gdetrez/scanomatic/git/refs{/sha}","trees_url":"https://api.github.com/repos/gdetrez/scanomatic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gdetrez/scanomatic/statuses/{sha}","languages_url":"https://api.github.com/repos/gdetrez/scanomatic/languages","stargazers_url":"https://api.github.com/repos/gdetrez/scanomatic/stargazers","contributors_url":"https://api.github.com/repos/gdetrez/scanomatic/contributors","subscribers_url":"https://api.github.com/repos/gdetrez/scanomatic/subscribers","subscription_url":"https://api.github.com/repos/gdetrez/scanomatic/subscription","commits_url":"https://api.github.com/repos/gdetrez/scanomatic/commits{/sha}","git_commits_url":"https://api.github.com/repos/gdetrez/scanomatic/git/commits{/sha}","comments_url":"https://api.github.com/repos/gdetrez/scanomatic/comments{/number}","issue_comment_url":"https://api.github.com/repos/gdetrez/scanomatic/issues/comments{/number}","contents_url":"https://api.github.com/repos/gdetrez/scanomatic/contents/{+path}","compare_url":"https://api.github.com/repos/gdetrez/scanomatic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gdetrez/scanomatic/merges","archive_url":"https://api.github.com/repos/gdetrez/scanomatic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gdetrez/scanomatic/downloads","issues_url":"https://api.github.com/repos/gdetrez/scanomatic/issues{/number}","pulls_url":"https://api.github.com/repos/gdetrez/scanomatic/pulls{/number}","milestones_url":"https://api.github.com/repos/gdetrez/scanomatic/milestones{/number}","notifications_url":"https://api.github.com/repos/gdetrez/scanomatic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gdetrez/scanomatic/labels{/name}","releases_url":"https://api.github.com/repos/gdetrez/scanomatic/releases{/id}","deployments_url":"https://api.github.com/repos/gdetrez/scanomatic/deployments","created_at":"2017-06-02T10:59:28Z","updated_at":"2017-06-02T10:59:30Z","pushed_at":"2017-11-20T15:32:53Z","git_url":"git://github.com/gdetrez/scanomatic.git","ssh_url":"git@github.com:gdetrez/scanomatic.git","clone_url":"https://github.com/gdetrez/scanomatic.git","svn_url":"https://github.com/gdetrez/scanomatic","homepage":null,"size":40537,"stargazers_count":0,"watchers_count":0,"language":"Python","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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gdetrez/scanomatic/pulls/5"},"html":{"href":"https://github.com/gdetrez/scanomatic/pull/5"},"issue":{"href":"https://api.github.com/repos/gdetrez/scanomatic/issues/5"},"comments":{"href":"https://api.github.com/repos/gdetrez/scanomatic/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/gdetrez/scanomatic/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/gdetrez/scanomatic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gdetrez/scanomatic/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/gdetrez/scanomatic/statuses/81927bb49626dba199c5ed9851d9254eb2308d7e"}},"author_association":"OWNER"}}
{"actor":{"display_login":"stickler-ci"}}