{"action":"created","comment":{"url":"https://api.github.com/repos/tjcsl/ion/pulls/comments/65819170","id":65819170,"diff_hunk":"@@ -37,133 +38,128 @@ $(function() {\n \n         var capacitySum = 0;\n         var val = $select.val();\n-        if(val !== null) {\n+        if (val !== null) {\n             val.forEach(function(roomID) {\n                 var c = all_rooms_lookup[roomID].capacity;\n-                if (c == -1) c = Infinity;\n+                if (c === -1) {\n+                    c = Infinity;\n+                }\n                 capacitySum += c;\n             });\n         }\n \n         if (capacitySum == Infinity) capacitySum = -1;\n         var $capacityInput = $(\"input.capacity\", $select.parent().parent());\n-        var defaultActivityCapacity = $capacityInput.data(\"activity-default-capacity\");\n+        // var defaultActivityCapacity = $capacityInput.data(\"activity-default-capacity\");\n         var defaultCapacity = $capacityInput.data(\"default-capacity\");\n-        $capacityInput.attr(\"placeholder\", capacitySum == 0 ? defaultCapacity : capacitySum);\n+        $capacityInput.attr(\"placeholder\", capacitySum === 0 ? defaultCapacity : capacitySum);\n     });\n \n     window.propagate_direction = \"both\";\n     window.propagate_method = \"only_new\";\n \n     window.updatePropagateDirection = function(opt) {\n         window.propagate_direction = opt;\n-        console.info(\"New propagate direction:\", opt)\n \n         var classes = [\"fa-arrows-v\", \"fa-long-arrow-up\", \"fa-long-arrow-down\"];\n-        if(opt == \"both\") {\n+        if (opt === \"both\") {\n             $(\".propagate > i\").removeClass(classes[1]).removeClass(classes[2])\n                                .addClass(classes[0]);\n-        } else if(opt == \"up\") {\n+        } else if (opt === \"up\") {\n             $(\".propagate > i\").removeClass(classes[0]).removeClass(classes[2])\n                                .addClass(classes[1]);\n-        } else if(opt == \"down\") {\n+        } else if (opt === \"down\") {\n             $(\".propagate > i\").removeClass(classes[0]).removeClass(classes[1])\n                                .addClass(classes[2]);\n         }\n     }\n \n     window.updatePropagateMethod = function(opt) {\n-        console.info(\"New propagate method:\", opt);\n         window.propagate_method = opt;\n     }\n \n     $(\".propagate\").click(function() {\n         var field = $(this).attr(\"data-field\");\n         var input = $(this).attr(\"data-input\");\n         var el = $(\"#\" + input);\n-        console.debug(\"Propagate\", field, input, el.length > 0);\n \n         var rows = $(\".schedule-activity-grid tr.form-row\");\n-        if(window.propagate_direction && window.propagate_direction == \"down\") {\n-            var current_row = el.parent().parent();\n-            var rows = [];\n-            var row = current_row;\n-            while(row && row.length > 0) {\n+        var row;\n+        var currentRow;\n+        if (window.propagate_direction && window.propagate_direction === \"down\") {\n+            currentRow = el.parent().parent();\n+            rows = [];\n+            row = currentRow;\n+            while (row && row.length > 0) {\n                 row = row.next();\n-                if(row.hasClass(\"form-row\")) {\n+                if (row.hasClass(\"form-row\")) {\n                     rows.push(row[0]);\n                 }\n             }\n             rows = $(rows);\n         }\n \n-        if(window.propagate_direction && window.propagate_direction == \"up\") {\n-            var current_row = el.parent().parent();\n-            var rows = [];\n-            var row = current_row;\n-            while(row && row.length > 0) {\n+        if (window.propagate_direction && window.propagate_direction === \"up\") {\n+            currentRow = el.parent().parent();\n+            rows = [];\n+            row = currentRow;\n+            while (row && row.length > 0) {\n                 row = row.prev();\n-                if(row.hasClass(\"form-row\")) {\n+                if (row.hasClass(\"form-row\")) {\n                     rows.push(row[0]);\n                 }\n             }\n             rows = $(rows);\n         }\n \n-        if(window.propagate_method && window.propagate_method == \"only_new\") {\n+        if (window.propagate_method && window.propagate_method === \"only_new\") {\n             var new_rows = [];\n             for(var i=0; i<rows.length; i++) {\n                 var rw = $(rows[i]);\n-                if(!rw.hasClass(\"scheduled\")) {\n+                if (!rw.hasClass(\"scheduled\")) {\n                     new_rows.push(rows[i]);\n                 }\n             }\n-            console.log(rows);\n             rows = $(new_rows);\n-            console.log(rows);\n         }\n \n-        if(el.hasClass(\"selectized\")) {\n-            console.info(\"Selectized element\");\n+        if (el.hasClass(\"selectized\")) {\n             var sel = el[0].selectize;\n-            mod_items = sel.items;\n-            console.info(\"New value:\", mod_items);\n+            var modItems = sel.items;\n \n             rows.each(function() {\n                 var ntd = $(\"td[data-field='\" + field + \"']\", $(this));\n                 var ninp = $(\"input, select\", ntd);\n                 var nsel = ninp[0].selectize;\n                 var o_items = nsel.items;\n-                nsel.setValue(mod_items);\n-                console.debug(\"items: \", o_items, \"=>\", nsel.items);\n+                nsel.setValue(modItems);\n             });\n         } else {\n-            if(el.attr(\"type\") == \"checkbox\") {\n-                mod_val = el.prop(\"checked\");\n-                console.info(\"Checkbox new value:\", mod_val);\n+            if (el.attr(\"type\") === \"checkbox\") {\n+                var modVal = el.prop(\"checked\");\n                 rows.each(function() {\n                     var ntd = $(\"td[data-field='\" + field + \"']\", $(this));\n                     var ninp = $(\"input\", ntd);\n-                    ninp.prop(\"checked\", mod_val);\n+                    ninp.prop(\"checked\", modVal);\n                 });\n             } else {\n-                mod_val = el.val();\n-                console.info(\"New value:\", mod_val);\n+                modVal = el.val();\n+                console.info(\"New value:\", modVal);","path":"intranet/static/js/eighth/schedule.js","position":190,"original_position":190,"commit_id":"dc6bdef4e2331b5c6565c8013f3d6c54b0ad484c","original_commit_id":"dc6bdef4e2331b5c6565c8013f3d6c54b0ad484c","user":{"login":"tjhsst-ion","id":10491321,"avatar_url":"https://avatars.githubusercontent.com/u/10491321?v=3","gravatar_id":"","url":"https://api.github.com/users/tjhsst-ion","html_url":"https://github.com/tjhsst-ion","followers_url":"https://api.github.com/users/tjhsst-ion/followers","following_url":"https://api.github.com/users/tjhsst-ion/following{/other_user}","gists_url":"https://api.github.com/users/tjhsst-ion/gists{/gist_id}","starred_url":"https://api.github.com/users/tjhsst-ion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjhsst-ion/subscriptions","organizations_url":"https://api.github.com/users/tjhsst-ion/orgs","repos_url":"https://api.github.com/users/tjhsst-ion/repos","events_url":"https://api.github.com/users/tjhsst-ion/events{/privacy}","received_events_url":"https://api.github.com/users/tjhsst-ion/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: ['modVal' used out of scope.](https://www.codacy.com/app/tjcsl/ion/file/2692319204/issues/source?bid=3176160&fileBranchId=3299251#l147)","created_at":"2016-06-05T15:21:44Z","updated_at":"2016-06-05T15:21:44Z","html_url":"https://github.com/tjcsl/ion/pull/455#discussion_r65819170","pull_request_url":"https://api.github.com/repos/tjcsl/ion/pulls/455","_links":{"self":{"href":"https://api.github.com/repos/tjcsl/ion/pulls/comments/65819170"},"html":{"href":"https://github.com/tjcsl/ion/pull/455#discussion_r65819170"},"pull_request":{"href":"https://api.github.com/repos/tjcsl/ion/pulls/455"}}},"pull_request":{"url":"https://api.github.com/repos/tjcsl/ion/pulls/455","id":70137141,"html_url":"https://github.com/tjcsl/ion/pull/455","diff_url":"https://github.com/tjcsl/ion/pull/455.diff","patch_url":"https://github.com/tjcsl/ion/pull/455.patch","issue_url":"https://api.github.com/repos/tjcsl/ion/issues/455","number":455,"state":"open","locked":false,"title":"Dev","user":{"login":"jamesthoughton","id":8053163,"avatar_url":"https://avatars.githubusercontent.com/u/8053163?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesthoughton","html_url":"https://github.com/jamesthoughton","followers_url":"https://api.github.com/users/jamesthoughton/followers","following_url":"https://api.github.com/users/jamesthoughton/following{/other_user}","gists_url":"https://api.github.com/users/jamesthoughton/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesthoughton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesthoughton/subscriptions","organizations_url":"https://api.github.com/users/jamesthoughton/orgs","repos_url":"https://api.github.com/users/jamesthoughton/repos","events_url":"https://api.github.com/users/jamesthoughton/events{/privacy}","received_events_url":"https://api.github.com/users/jamesthoughton/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-15T23:30:47Z","updated_at":"2016-06-05T15:21:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cada6a4083a12c62550bcc56b5ca45865cce1a1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tjcsl/ion/pulls/455/commits","review_comments_url":"https://api.github.com/repos/tjcsl/ion/pulls/455/comments","review_comment_url":"https://api.github.com/repos/tjcsl/ion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tjcsl/ion/issues/455/comments","statuses_url":"https://api.github.com/repos/tjcsl/ion/statuses/dc6bdef4e2331b5c6565c8013f3d6c54b0ad484c","head":{"label":"tjcsl:dev","ref":"dev","sha":"dc6bdef4e2331b5c6565c8013f3d6c54b0ad484c","user":{"login":"tjcsl","id":5313020,"avatar_url":"https://avatars.githubusercontent.com/u/5313020?v=3","gravatar_id":"","url":"https://api.github.com/users/tjcsl","html_url":"https://github.com/tjcsl","followers_url":"https://api.github.com/users/tjcsl/followers","following_url":"https://api.github.com/users/tjcsl/following{/other_user}","gists_url":"https://api.github.com/users/tjcsl/gists{/gist_id}","starred_url":"https://api.github.com/users/tjcsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjcsl/subscriptions","organizations_url":"https://api.github.com/users/tjcsl/orgs","repos_url":"https://api.github.com/users/tjcsl/repos","events_url":"https://api.github.com/users/tjcsl/events{/privacy}","received_events_url":"https://api.github.com/users/tjcsl/received_events","type":"Organization","site_admin":false},"repo":{"id":22979044,"name":"ion","full_name":"tjcsl/ion","owner":{"login":"tjcsl","id":5313020,"avatar_url":"https://avatars.githubusercontent.com/u/5313020?v=3","gravatar_id":"","url":"https://api.github.com/users/tjcsl","html_url":"https://github.com/tjcsl","followers_url":"https://api.github.com/users/tjcsl/followers","following_url":"https://api.github.com/users/tjcsl/following{/other_user}","gists_url":"https://api.github.com/users/tjcsl/gists{/gist_id}","starred_url":"https://api.github.com/users/tjcsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjcsl/subscriptions","organizations_url":"https://api.github.com/users/tjcsl/orgs","repos_url":"https://api.github.com/users/tjcsl/repos","events_url":"https://api.github.com/users/tjcsl/events{/privacy}","received_events_url":"https://api.github.com/users/tjcsl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tjcsl/ion","description":"TJ Intranet 3 (Ion)","fork":false,"url":"https://api.github.com/repos/tjcsl/ion","forks_url":"https://api.github.com/repos/tjcsl/ion/forks","keys_url":"https://api.github.com/repos/tjcsl/ion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tjcsl/ion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tjcsl/ion/teams","hooks_url":"https://api.github.com/repos/tjcsl/ion/hooks","issue_events_url":"https://api.github.com/repos/tjcsl/ion/issues/events{/number}","events_url":"https://api.github.com/repos/tjcsl/ion/events","assignees_url":"https://api.github.com/repos/tjcsl/ion/assignees{/user}","branches_url":"https://api.github.com/repos/tjcsl/ion/branches{/branch}","tags_url":"https://api.github.com/repos/tjcsl/ion/tags","blobs_url":"https://api.github.com/repos/tjcsl/ion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tjcsl/ion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tjcsl/ion/git/refs{/sha}","trees_url":"https://api.github.com/repos/tjcsl/ion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tjcsl/ion/statuses/{sha}","languages_url":"https://api.github.com/repos/tjcsl/ion/languages","stargazers_url":"https://api.github.com/repos/tjcsl/ion/stargazers","contributors_url":"https://api.github.com/repos/tjcsl/ion/contributors","subscribers_url":"https://api.github.com/repos/tjcsl/ion/subscribers","subscription_url":"https://api.github.com/repos/tjcsl/ion/subscription","commits_url":"https://api.github.com/repos/tjcsl/ion/commits{/sha}","git_commits_url":"https://api.github.com/repos/tjcsl/ion/git/commits{/sha}","comments_url":"https://api.github.com/repos/tjcsl/ion/comments{/number}","issue_comment_url":"https://api.github.com/repos/tjcsl/ion/issues/comments{/number}","contents_url":"https://api.github.com/repos/tjcsl/ion/contents/{+path}","compare_url":"https://api.github.com/repos/tjcsl/ion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tjcsl/ion/merges","archive_url":"https://api.github.com/repos/tjcsl/ion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tjcsl/ion/downloads","issues_url":"https://api.github.com/repos/tjcsl/ion/issues{/number}","pulls_url":"https://api.github.com/repos/tjcsl/ion/pulls{/number}","milestones_url":"https://api.github.com/repos/tjcsl/ion/milestones{/number}","notifications_url":"https://api.github.com/repos/tjcsl/ion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tjcsl/ion/labels{/name}","releases_url":"https://api.github.com/repos/tjcsl/ion/releases{/id}","deployments_url":"https://api.github.com/repos/tjcsl/ion/deployments","created_at":"2014-08-15T04:59:41Z","updated_at":"2016-05-14T17:15:09Z","pushed_at":"2016-06-05T15:18:44Z","git_url":"git://github.com/tjcsl/ion.git","ssh_url":"git@github.com:tjcsl/ion.git","clone_url":"https://github.com/tjcsl/ion.git","svn_url":"https://github.com/tjcsl/ion","homepage":"https://ion.tjhsst.edu","size":88759,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":63,"forks":12,"open_issues":63,"watchers":24,"default_branch":"master"}},"base":{"label":"tjcsl:master","ref":"master","sha":"8339ff1ba38a940ef7e5f9423ba62a72d3d3edfb","user":{"login":"tjcsl","id":5313020,"avatar_url":"https://avatars.githubusercontent.com/u/5313020?v=3","gravatar_id":"","url":"https://api.github.com/users/tjcsl","html_url":"https://github.com/tjcsl","followers_url":"https://api.github.com/users/tjcsl/followers","following_url":"https://api.github.com/users/tjcsl/following{/other_user}","gists_url":"https://api.github.com/users/tjcsl/gists{/gist_id}","starred_url":"https://api.github.com/users/tjcsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjcsl/subscriptions","organizations_url":"https://api.github.com/users/tjcsl/orgs","repos_url":"https://api.github.com/users/tjcsl/repos","events_url":"https://api.github.com/users/tjcsl/events{/privacy}","received_events_url":"https://api.github.com/users/tjcsl/received_events","type":"Organization","site_admin":false},"repo":{"id":22979044,"name":"ion","full_name":"tjcsl/ion","owner":{"login":"tjcsl","id":5313020,"avatar_url":"https://avatars.githubusercontent.com/u/5313020?v=3","gravatar_id":"","url":"https://api.github.com/users/tjcsl","html_url":"https://github.com/tjcsl","followers_url":"https://api.github.com/users/tjcsl/followers","following_url":"https://api.github.com/users/tjcsl/following{/other_user}","gists_url":"https://api.github.com/users/tjcsl/gists{/gist_id}","starred_url":"https://api.github.com/users/tjcsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjcsl/subscriptions","organizations_url":"https://api.github.com/users/tjcsl/orgs","repos_url":"https://api.github.com/users/tjcsl/repos","events_url":"https://api.github.com/users/tjcsl/events{/privacy}","received_events_url":"https://api.github.com/users/tjcsl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tjcsl/ion","description":"TJ Intranet 3 (Ion)","fork":false,"url":"https://api.github.com/repos/tjcsl/ion","forks_url":"https://api.github.com/repos/tjcsl/ion/forks","keys_url":"https://api.github.com/repos/tjcsl/ion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tjcsl/ion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tjcsl/ion/teams","hooks_url":"https://api.github.com/repos/tjcsl/ion/hooks","issue_events_url":"https://api.github.com/repos/tjcsl/ion/issues/events{/number}","events_url":"https://api.github.com/repos/tjcsl/ion/events","assignees_url":"https://api.github.com/repos/tjcsl/ion/assignees{/user}","branches_url":"https://api.github.com/repos/tjcsl/ion/branches{/branch}","tags_url":"https://api.github.com/repos/tjcsl/ion/tags","blobs_url":"https://api.github.com/repos/tjcsl/ion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tjcsl/ion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tjcsl/ion/git/refs{/sha}","trees_url":"https://api.github.com/repos/tjcsl/ion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tjcsl/ion/statuses/{sha}","languages_url":"https://api.github.com/repos/tjcsl/ion/languages","stargazers_url":"https://api.github.com/repos/tjcsl/ion/stargazers","contributors_url":"https://api.github.com/repos/tjcsl/ion/contributors","subscribers_url":"https://api.github.com/repos/tjcsl/ion/subscribers","subscription_url":"https://api.github.com/repos/tjcsl/ion/subscription","commits_url":"https://api.github.com/repos/tjcsl/ion/commits{/sha}","git_commits_url":"https://api.github.com/repos/tjcsl/ion/git/commits{/sha}","comments_url":"https://api.github.com/repos/tjcsl/ion/comments{/number}","issue_comment_url":"https://api.github.com/repos/tjcsl/ion/issues/comments{/number}","contents_url":"https://api.github.com/repos/tjcsl/ion/contents/{+path}","compare_url":"https://api.github.com/repos/tjcsl/ion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tjcsl/ion/merges","archive_url":"https://api.github.com/repos/tjcsl/ion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tjcsl/ion/downloads","issues_url":"https://api.github.com/repos/tjcsl/ion/issues{/number}","pulls_url":"https://api.github.com/repos/tjcsl/ion/pulls{/number}","milestones_url":"https://api.github.com/repos/tjcsl/ion/milestones{/number}","notifications_url":"https://api.github.com/repos/tjcsl/ion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tjcsl/ion/labels{/name}","releases_url":"https://api.github.com/repos/tjcsl/ion/releases{/id}","deployments_url":"https://api.github.com/repos/tjcsl/ion/deployments","created_at":"2014-08-15T04:59:41Z","updated_at":"2016-05-14T17:15:09Z","pushed_at":"2016-06-05T15:18:44Z","git_url":"git://github.com/tjcsl/ion.git","ssh_url":"git@github.com:tjcsl/ion.git","clone_url":"https://github.com/tjcsl/ion.git","svn_url":"https://github.com/tjcsl/ion","homepage":"https://ion.tjhsst.edu","size":88759,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":12,"mirror_url":null,"open_issues_count":63,"forks":12,"open_issues":63,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tjcsl/ion/pulls/455"},"html":{"href":"https://github.com/tjcsl/ion/pull/455"},"issue":{"href":"https://api.github.com/repos/tjcsl/ion/issues/455"},"comments":{"href":"https://api.github.com/repos/tjcsl/ion/issues/455/comments"},"review_comments":{"href":"https://api.github.com/repos/tjcsl/ion/pulls/455/comments"},"review_comment":{"href":"https://api.github.com/repos/tjcsl/ion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tjcsl/ion/pulls/455/commits"},"statuses":{"href":"https://api.github.com/repos/tjcsl/ion/statuses/dc6bdef4e2331b5c6565c8013f3d6c54b0ad484c"}}}}
{"actor":{"display_login":"tjhsst-ion"}}