{"action":"created","comment":{"url":"https://api.github.com/repos/CruGlobal/mpdx/pulls/comments/23456814","id":23456814,"diff_hunk":"@@ -365,36 +365,36 @@ $ ->\n         $('input[type=checkbox].primary', fieldset).prop('checked',false)\n         $(this).prop('checked', true)\n \n-    $(document).on 'click', 'input.address_historic', ->\n-      historicAddressDisable this\n-\n-    historicAddressDisable = (check) ->\n+    historicDisable = (check, input_selector) ->\n       fieldset = $(check).closest(\".rs\")\n       if $(check).is(\":checked\")\n-        $(\"input[type=text], textarea, .country_select\", fieldset).attr \"readonly\", true\n+        $(input_selector, fieldset).attr \"readonly\", true\n       else\n-        $(\"input[type=text], textarea, .country_select\", fieldset).removeAttr \"readonly\"\n+        $(input_selector, fieldset).removeAttr \"readonly\"\n       return\n \n     $(\"input.address_historic\").each ->\n-      historicAddressDisable this\n+      historicDisable this, \"input[type=text], textarea, .country_select\"\n       return\n \n-    $(document).on 'click', 'input.email_historic', ->\n-      historicEmailDisable this\n+    $(document).on 'click', 'input.address_historic', ->\n+      historicDisable this, \"input[type=text], textarea, .country_select\"\n \n-    historicEmailDisable = (check) ->\n-      fieldset = $(check).closest(\".rs\")\n-      if $(check).is(\":checked\")\n-        $(\"input[type=email]\", fieldset).attr \"readonly\", true\n-      else\n-        $(\"input[type=email]\", fieldset).removeAttr \"readonly\"\n+    $(\"input.email_historic\").each ->\n+      historicDisable this, \"input[type=email]\"\n       return\n \n-    $(\"input.email_historic\").each ->\n-      historicEmailDisable this\n+    $(document).on 'click', 'input.email_historic', ->\n+      historicDisable this, \"input[type=email]\"\n+\n+    $(\"input.phone_historic\").each ->\n+      historicDisable this, \"input[type=tel]\"\n       return\n \n+    $(document).on 'click', 'input.phone_historic', ->\n+      console.log('phone_historic click')","path":"app/assets/javascripts/contacts.js.coffee.erb","position":48,"original_position":48,"commit_id":"e5c3dd98e4f740153632f38288d1ab9738e893d6","original_commit_id":"e5c3dd98e4f740153632f38288d1ab9738e893d6","user":{"login":"draffensperger","id":2855507,"avatar_url":"https://avatars.githubusercontent.com/u/2855507?v=3","gravatar_id":"","url":"https://api.github.com/users/draffensperger","html_url":"https://github.com/draffensperger","followers_url":"https://api.github.com/users/draffensperger/followers","following_url":"https://api.github.com/users/draffensperger/following{/other_user}","gists_url":"https://api.github.com/users/draffensperger/gists{/gist_id}","starred_url":"https://api.github.com/users/draffensperger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draffensperger/subscriptions","organizations_url":"https://api.github.com/users/draffensperger/orgs","repos_url":"https://api.github.com/users/draffensperger/repos","events_url":"https://api.github.com/users/draffensperger/events{/privacy}","received_events_url":"https://api.github.com/users/draffensperger/received_events","type":"User","site_admin":false},"body":"Good catch, thanks, I'll get that out!","created_at":"2015-01-23T15:37:44Z","updated_at":"2015-01-23T15:37:44Z","html_url":"https://github.com/CruGlobal/mpdx/pull/249#discussion_r23456814","pull_request_url":"https://api.github.com/repos/CruGlobal/mpdx/pulls/249","_links":{"self":{"href":"https://api.github.com/repos/CruGlobal/mpdx/pulls/comments/23456814"},"html":{"href":"https://github.com/CruGlobal/mpdx/pull/249#discussion_r23456814"},"pull_request":{"href":"https://api.github.com/repos/CruGlobal/mpdx/pulls/249"}}},"pull_request":{"url":"https://api.github.com/repos/CruGlobal/mpdx/pulls/249","id":27805449,"html_url":"https://github.com/CruGlobal/mpdx/pull/249","diff_url":"https://github.com/CruGlobal/mpdx/pull/249.diff","patch_url":"https://github.com/CruGlobal/mpdx/pull/249.patch","issue_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/249","number":249,"state":"open","locked":false,"title":"Tnt preferred and valid field logic for phone/email, bug fix","user":{"login":"draffensperger","id":2855507,"avatar_url":"https://avatars.githubusercontent.com/u/2855507?v=3","gravatar_id":"","url":"https://api.github.com/users/draffensperger","html_url":"https://github.com/draffensperger","followers_url":"https://api.github.com/users/draffensperger/followers","following_url":"https://api.github.com/users/draffensperger/following{/other_user}","gists_url":"https://api.github.com/users/draffensperger/gists{/gist_id}","starred_url":"https://api.github.com/users/draffensperger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/draffensperger/subscriptions","organizations_url":"https://api.github.com/users/draffensperger/orgs","repos_url":"https://api.github.com/users/draffensperger/repos","events_url":"https://api.github.com/users/draffensperger/events{/privacy}","received_events_url":"https://api.github.com/users/draffensperger/received_events","type":"User","site_admin":false},"body":"This improves / corrects the logic of the Tnt import for preferred and valid emails and phone numbers. If the import is set to override it will also override the existing primary phone/email in MPDX and will not if not. This also fixes a bug for the case (presumably only for non-Cru orgs) where a Tnt contact import would not work if the existing corresponding donor account had a blank name.","created_at":"2015-01-21T23:33:08Z","updated_at":"2015-01-23T15:37:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a9847c7984c2b94807bde660e20a07b6f659780","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CruGlobal/mpdx/pulls/249/commits","review_comments_url":"https://api.github.com/repos/CruGlobal/mpdx/pulls/249/comments","review_comment_url":"https://api.github.com/repos/CruGlobal/mpdx/pulls/comments/{number}","comments_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/249/comments","statuses_url":"https://api.github.com/repos/CruGlobal/mpdx/statuses/e5c3dd98e4f740153632f38288d1ab9738e893d6","head":{"label":"CruGlobal:tnt-import-preferred-info","ref":"tnt-import-preferred-info","sha":"e5c3dd98e4f740153632f38288d1ab9738e893d6","user":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"repo":{"id":4625882,"name":"mpdx","full_name":"CruGlobal/mpdx","owner":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CruGlobal/mpdx","description":"Web based tool to help missionaries stay in touch with ministry partners","fork":false,"url":"https://api.github.com/repos/CruGlobal/mpdx","forks_url":"https://api.github.com/repos/CruGlobal/mpdx/forks","keys_url":"https://api.github.com/repos/CruGlobal/mpdx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CruGlobal/mpdx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CruGlobal/mpdx/teams","hooks_url":"https://api.github.com/repos/CruGlobal/mpdx/hooks","issue_events_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/events{/number}","events_url":"https://api.github.com/repos/CruGlobal/mpdx/events","assignees_url":"https://api.github.com/repos/CruGlobal/mpdx/assignees{/user}","branches_url":"https://api.github.com/repos/CruGlobal/mpdx/branches{/branch}","tags_url":"https://api.github.com/repos/CruGlobal/mpdx/tags","blobs_url":"https://api.github.com/repos/CruGlobal/mpdx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CruGlobal/mpdx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CruGlobal/mpdx/git/refs{/sha}","trees_url":"https://api.github.com/repos/CruGlobal/mpdx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CruGlobal/mpdx/statuses/{sha}","languages_url":"https://api.github.com/repos/CruGlobal/mpdx/languages","stargazers_url":"https://api.github.com/repos/CruGlobal/mpdx/stargazers","contributors_url":"https://api.github.com/repos/CruGlobal/mpdx/contributors","subscribers_url":"https://api.github.com/repos/CruGlobal/mpdx/subscribers","subscription_url":"https://api.github.com/repos/CruGlobal/mpdx/subscription","commits_url":"https://api.github.com/repos/CruGlobal/mpdx/commits{/sha}","git_commits_url":"https://api.github.com/repos/CruGlobal/mpdx/git/commits{/sha}","comments_url":"https://api.github.com/repos/CruGlobal/mpdx/comments{/number}","issue_comment_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/comments/{number}","contents_url":"https://api.github.com/repos/CruGlobal/mpdx/contents/{+path}","compare_url":"https://api.github.com/repos/CruGlobal/mpdx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CruGlobal/mpdx/merges","archive_url":"https://api.github.com/repos/CruGlobal/mpdx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CruGlobal/mpdx/downloads","issues_url":"https://api.github.com/repos/CruGlobal/mpdx/issues{/number}","pulls_url":"https://api.github.com/repos/CruGlobal/mpdx/pulls{/number}","milestones_url":"https://api.github.com/repos/CruGlobal/mpdx/milestones{/number}","notifications_url":"https://api.github.com/repos/CruGlobal/mpdx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CruGlobal/mpdx/labels{/name}","releases_url":"https://api.github.com/repos/CruGlobal/mpdx/releases{/id}","created_at":"2012-06-11T14:26:20Z","updated_at":"2015-01-21T18:17:53Z","pushed_at":"2015-01-23T15:09:49Z","git_url":"git://github.com/CruGlobal/mpdx.git","ssh_url":"git@github.com:CruGlobal/mpdx.git","clone_url":"https://github.com/CruGlobal/mpdx.git","svn_url":"https://github.com/CruGlobal/mpdx","homepage":"https://mpdx.org","size":368014,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":8,"default_branch":"master"}},"base":{"label":"CruGlobal:master","ref":"master","sha":"2c692edc2b7ec32fc70aeb45f24e8683aa2e31a5","user":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"repo":{"id":4625882,"name":"mpdx","full_name":"CruGlobal/mpdx","owner":{"login":"CruGlobal","id":1785912,"avatar_url":"https://avatars.githubusercontent.com/u/1785912?v=3","gravatar_id":"","url":"https://api.github.com/users/CruGlobal","html_url":"https://github.com/CruGlobal","followers_url":"https://api.github.com/users/CruGlobal/followers","following_url":"https://api.github.com/users/CruGlobal/following{/other_user}","gists_url":"https://api.github.com/users/CruGlobal/gists{/gist_id}","starred_url":"https://api.github.com/users/CruGlobal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CruGlobal/subscriptions","organizations_url":"https://api.github.com/users/CruGlobal/orgs","repos_url":"https://api.github.com/users/CruGlobal/repos","events_url":"https://api.github.com/users/CruGlobal/events{/privacy}","received_events_url":"https://api.github.com/users/CruGlobal/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CruGlobal/mpdx","description":"Web based tool to help missionaries stay in touch with ministry partners","fork":false,"url":"https://api.github.com/repos/CruGlobal/mpdx","forks_url":"https://api.github.com/repos/CruGlobal/mpdx/forks","keys_url":"https://api.github.com/repos/CruGlobal/mpdx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CruGlobal/mpdx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CruGlobal/mpdx/teams","hooks_url":"https://api.github.com/repos/CruGlobal/mpdx/hooks","issue_events_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/events{/number}","events_url":"https://api.github.com/repos/CruGlobal/mpdx/events","assignees_url":"https://api.github.com/repos/CruGlobal/mpdx/assignees{/user}","branches_url":"https://api.github.com/repos/CruGlobal/mpdx/branches{/branch}","tags_url":"https://api.github.com/repos/CruGlobal/mpdx/tags","blobs_url":"https://api.github.com/repos/CruGlobal/mpdx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CruGlobal/mpdx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CruGlobal/mpdx/git/refs{/sha}","trees_url":"https://api.github.com/repos/CruGlobal/mpdx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CruGlobal/mpdx/statuses/{sha}","languages_url":"https://api.github.com/repos/CruGlobal/mpdx/languages","stargazers_url":"https://api.github.com/repos/CruGlobal/mpdx/stargazers","contributors_url":"https://api.github.com/repos/CruGlobal/mpdx/contributors","subscribers_url":"https://api.github.com/repos/CruGlobal/mpdx/subscribers","subscription_url":"https://api.github.com/repos/CruGlobal/mpdx/subscription","commits_url":"https://api.github.com/repos/CruGlobal/mpdx/commits{/sha}","git_commits_url":"https://api.github.com/repos/CruGlobal/mpdx/git/commits{/sha}","comments_url":"https://api.github.com/repos/CruGlobal/mpdx/comments{/number}","issue_comment_url":"https://api.github.com/repos/CruGlobal/mpdx/issues/comments/{number}","contents_url":"https://api.github.com/repos/CruGlobal/mpdx/contents/{+path}","compare_url":"https://api.github.com/repos/CruGlobal/mpdx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CruGlobal/mpdx/merges","archive_url":"https://api.github.com/repos/CruGlobal/mpdx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CruGlobal/mpdx/downloads","issues_url":"https://api.github.com/repos/CruGlobal/mpdx/issues{/number}","pulls_url":"https://api.github.com/repos/CruGlobal/mpdx/pulls{/number}","milestones_url":"https://api.github.com/repos/CruGlobal/mpdx/milestones{/number}","notifications_url":"https://api.github.com/repos/CruGlobal/mpdx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CruGlobal/mpdx/labels{/name}","releases_url":"https://api.github.com/repos/CruGlobal/mpdx/releases{/id}","created_at":"2012-06-11T14:26:20Z","updated_at":"2015-01-21T18:17:53Z","pushed_at":"2015-01-23T15:09:49Z","git_url":"git://github.com/CruGlobal/mpdx.git","ssh_url":"git@github.com:CruGlobal/mpdx.git","clone_url":"https://github.com/CruGlobal/mpdx.git","svn_url":"https://github.com/CruGlobal/mpdx","homepage":"https://mpdx.org","size":368014,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":16,"forks":3,"open_issues":16,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CruGlobal/mpdx/pulls/249"},"html":{"href":"https://github.com/CruGlobal/mpdx/pull/249"},"issue":{"href":"https://api.github.com/repos/CruGlobal/mpdx/issues/249"},"comments":{"href":"https://api.github.com/repos/CruGlobal/mpdx/issues/249/comments"},"review_comments":{"href":"https://api.github.com/repos/CruGlobal/mpdx/pulls/249/comments"},"review_comment":{"href":"https://api.github.com/repos/CruGlobal/mpdx/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/CruGlobal/mpdx/pulls/249/commits"},"statuses":{"href":"https://api.github.com/repos/CruGlobal/mpdx/statuses/e5c3dd98e4f740153632f38288d1ab9738e893d6"}}}}