{"action":"created","comment":{"url":"https://api.github.com/repos/PRX/publish.prx.org/pulls/comments/78258454","id":78258454,"diff_hunk":"@@ -1,21 +1,42 @@\n import { Component, Input, ElementRef } from '@angular/core';\n+import { HalDoc } from '../cms/haldoc';\n \n @Component({\n   selector: 'image-loader',\n   styleUrls: ['image-loader.component.css'],\n   template: `\n-    <img *ngIf=\"src\" [src]=\"src\" class=\"loading\" (load)=\"onLoad()\"/>\n+    <img *ngIf=\"src\" [src]=\"src\" (load)=\"onLoad()\" (error)=\"onError()\"/>\n     `\n })\n \n export class ImageLoaderComponent {\n \n   @Input() public src: string;\n+  @Input() public imageDoc: HalDoc;\n+\n+  static PLACEHOLDER_IMAGE: string = '/assets/images/placeholder.png';\n+  static PLACEHOLDER_ERROR: string = '/assets/images/placeholder_error.png';\n \n   constructor(private element: ElementRef) {}\n \n-  onLoad() {\n-    this.element.nativeElement.style['background-image'] = `url(${this.src})`;\n+  setBackgroundImage(src) {\n+    this.element.nativeElement.style['background-image'] = `url(${src})`;\n+  }\n+\n+  onLoad = () => this.setBackgroundImage(this.src);\n+\n+  onError = () => this.setBackgroundImage(ImageLoaderComponent.PLACEHOLDER_ERROR);\n+\n+  ngOnChanges(changes:any) {","path":"src/app/shared/image/image-loader.component.ts","position":33,"original_position":33,"commit_id":"6bb729d7be5938958867820a7224f3c9539fe227","original_commit_id":"6bb729d7be5938958867820a7224f3c9539fe227","user":{"login":"cavis","id":1410587,"avatar_url":"https://avatars.githubusercontent.com/u/1410587?v=3","gravatar_id":"","url":"https://api.github.com/users/cavis","html_url":"https://github.com/cavis","followers_url":"https://api.github.com/users/cavis/followers","following_url":"https://api.github.com/users/cavis/following{/other_user}","gists_url":"https://api.github.com/users/cavis/gists{/gist_id}","starred_url":"https://api.github.com/users/cavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavis/subscriptions","organizations_url":"https://api.github.com/users/cavis/orgs","repos_url":"https://api.github.com/users/cavis/repos","events_url":"https://api.github.com/users/cavis/events{/privacy}","received_events_url":"https://api.github.com/users/cavis/received_events","type":"User","site_admin":false},"body":"Haven't used this one before.  But I'm a bit surprised it works without the `class ImageLoaderComponent implements OnChanges` in there.  I guess the angular docs have lied to me again!","created_at":"2016-09-09T22:26:57Z","updated_at":"2016-09-09T22:26:57Z","html_url":"https://github.com/PRX/publish.prx.org/pull/37#discussion_r78258454","pull_request_url":"https://api.github.com/repos/PRX/publish.prx.org/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/PRX/publish.prx.org/pulls/comments/78258454"},"html":{"href":"https://github.com/PRX/publish.prx.org/pull/37#discussion_r78258454"},"pull_request":{"href":"https://api.github.com/repos/PRX/publish.prx.org/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/PRX/publish.prx.org/pulls/37","id":84365635,"html_url":"https://github.com/PRX/publish.prx.org/pull/37","diff_url":"https://github.com/PRX/publish.prx.org/pull/37.diff","patch_url":"https://github.com/PRX/publish.prx.org/pull/37.patch","issue_url":"https://api.github.com/repos/PRX/publish.prx.org/issues/37","number":37,"state":"open","locked":false,"title":"Feat/image placeholder","user":{"login":"sandikbarr","id":2250413,"avatar_url":"https://avatars.githubusercontent.com/u/2250413?v=3","gravatar_id":"","url":"https://api.github.com/users/sandikbarr","html_url":"https://github.com/sandikbarr","followers_url":"https://api.github.com/users/sandikbarr/followers","following_url":"https://api.github.com/users/sandikbarr/following{/other_user}","gists_url":"https://api.github.com/users/sandikbarr/gists{/gist_id}","starred_url":"https://api.github.com/users/sandikbarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandikbarr/subscriptions","organizations_url":"https://api.github.com/users/sandikbarr/orgs","repos_url":"https://api.github.com/users/sandikbarr/repos","events_url":"https://api.github.com/users/sandikbarr/events{/privacy}","received_events_url":"https://api.github.com/users/sandikbarr/received_events","type":"User","site_admin":false},"body":"Implements the placeholder images for ticket #30. The placeholder images are temporary, to be replaced. I used the same no image and error placeholders for story, series, and account, basically wherever ImageLoaderComponent is used, but now I'm second guessing this decision. Did we want to use different placeholders for each of these?","created_at":"2016-09-07T20:15:08Z","updated_at":"2016-09-09T22:26:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0dc365f563dd1dd44fd31182438a7d801990b745","assignee":{"login":"cavis","id":1410587,"avatar_url":"https://avatars.githubusercontent.com/u/1410587?v=3","gravatar_id":"","url":"https://api.github.com/users/cavis","html_url":"https://github.com/cavis","followers_url":"https://api.github.com/users/cavis/followers","following_url":"https://api.github.com/users/cavis/following{/other_user}","gists_url":"https://api.github.com/users/cavis/gists{/gist_id}","starred_url":"https://api.github.com/users/cavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavis/subscriptions","organizations_url":"https://api.github.com/users/cavis/orgs","repos_url":"https://api.github.com/users/cavis/repos","events_url":"https://api.github.com/users/cavis/events{/privacy}","received_events_url":"https://api.github.com/users/cavis/received_events","type":"User","site_admin":false},"assignees":[{"login":"cavis","id":1410587,"avatar_url":"https://avatars.githubusercontent.com/u/1410587?v=3","gravatar_id":"","url":"https://api.github.com/users/cavis","html_url":"https://github.com/cavis","followers_url":"https://api.github.com/users/cavis/followers","following_url":"https://api.github.com/users/cavis/following{/other_user}","gists_url":"https://api.github.com/users/cavis/gists{/gist_id}","starred_url":"https://api.github.com/users/cavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavis/subscriptions","organizations_url":"https://api.github.com/users/cavis/orgs","repos_url":"https://api.github.com/users/cavis/repos","events_url":"https://api.github.com/users/cavis/events{/privacy}","received_events_url":"https://api.github.com/users/cavis/received_events","type":"User","site_admin":false},{"login":"sandikbarr","id":2250413,"avatar_url":"https://avatars.githubusercontent.com/u/2250413?v=3","gravatar_id":"","url":"https://api.github.com/users/sandikbarr","html_url":"https://github.com/sandikbarr","followers_url":"https://api.github.com/users/sandikbarr/followers","following_url":"https://api.github.com/users/sandikbarr/following{/other_user}","gists_url":"https://api.github.com/users/sandikbarr/gists{/gist_id}","starred_url":"https://api.github.com/users/sandikbarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandikbarr/subscriptions","organizations_url":"https://api.github.com/users/sandikbarr/orgs","repos_url":"https://api.github.com/users/sandikbarr/repos","events_url":"https://api.github.com/users/sandikbarr/events{/privacy}","received_events_url":"https://api.github.com/users/sandikbarr/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/PRX/publish.prx.org/pulls/37/commits","review_comments_url":"https://api.github.com/repos/PRX/publish.prx.org/pulls/37/comments","review_comment_url":"https://api.github.com/repos/PRX/publish.prx.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PRX/publish.prx.org/issues/37/comments","statuses_url":"https://api.github.com/repos/PRX/publish.prx.org/statuses/6bb729d7be5938958867820a7224f3c9539fe227","head":{"label":"PRX:feat/image-placeholder","ref":"feat/image-placeholder","sha":"6bb729d7be5938958867820a7224f3c9539fe227","user":{"login":"PRX","id":160453,"avatar_url":"https://avatars.githubusercontent.com/u/160453?v=3","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"repo":{"id":53075022,"name":"publish.prx.org","full_name":"PRX/publish.prx.org","owner":{"login":"PRX","id":160453,"avatar_url":"https://avatars.githubusercontent.com/u/160453?v=3","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PRX/publish.prx.org","description":"Publishing app","fork":false,"url":"https://api.github.com/repos/PRX/publish.prx.org","forks_url":"https://api.github.com/repos/PRX/publish.prx.org/forks","keys_url":"https://api.github.com/repos/PRX/publish.prx.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PRX/publish.prx.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PRX/publish.prx.org/teams","hooks_url":"https://api.github.com/repos/PRX/publish.prx.org/hooks","issue_events_url":"https://api.github.com/repos/PRX/publish.prx.org/issues/events{/number}","events_url":"https://api.github.com/repos/PRX/publish.prx.org/events","assignees_url":"https://api.github.com/repos/PRX/publish.prx.org/assignees{/user}","branches_url":"https://api.github.com/repos/PRX/publish.prx.org/branches{/branch}","tags_url":"https://api.github.com/repos/PRX/publish.prx.org/tags","blobs_url":"https://api.github.com/repos/PRX/publish.prx.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PRX/publish.prx.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PRX/publish.prx.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/PRX/publish.prx.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PRX/publish.prx.org/statuses/{sha}","languages_url":"https://api.github.com/repos/PRX/publish.prx.org/languages","stargazers_url":"https://api.github.com/repos/PRX/publish.prx.org/stargazers","contributors_url":"https://api.github.com/repos/PRX/publish.prx.org/contributors","subscribers_url":"https://api.github.com/repos/PRX/publish.prx.org/subscribers","subscription_url":"https://api.github.com/repos/PRX/publish.prx.org/subscription","commits_url":"https://api.github.com/repos/PRX/publish.prx.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/PRX/publish.prx.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/PRX/publish.prx.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/PRX/publish.prx.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/PRX/publish.prx.org/contents/{+path}","compare_url":"https://api.github.com/repos/PRX/publish.prx.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PRX/publish.prx.org/merges","archive_url":"https://api.github.com/repos/PRX/publish.prx.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PRX/publish.prx.org/downloads","issues_url":"https://api.github.com/repos/PRX/publish.prx.org/issues{/number}","pulls_url":"https://api.github.com/repos/PRX/publish.prx.org/pulls{/number}","milestones_url":"https://api.github.com/repos/PRX/publish.prx.org/milestones{/number}","notifications_url":"https://api.github.com/repos/PRX/publish.prx.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PRX/publish.prx.org/labels{/name}","releases_url":"https://api.github.com/repos/PRX/publish.prx.org/releases{/id}","deployments_url":"https://api.github.com/repos/PRX/publish.prx.org/deployments","created_at":"2016-03-03T18:55:16Z","updated_at":"2016-03-31T16:34:56Z","pushed_at":"2016-09-09T20:52:56Z","git_url":"git://github.com/PRX/publish.prx.org.git","ssh_url":"git@github.com:PRX/publish.prx.org.git","clone_url":"https://github.com/PRX/publish.prx.org.git","svn_url":"https://github.com/PRX/publish.prx.org","homepage":null,"size":9561,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":0,"default_branch":"master"}},"base":{"label":"PRX:master","ref":"master","sha":"bd553c4e41b0562dadcc82bc003fe7249442b866","user":{"login":"PRX","id":160453,"avatar_url":"https://avatars.githubusercontent.com/u/160453?v=3","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"repo":{"id":53075022,"name":"publish.prx.org","full_name":"PRX/publish.prx.org","owner":{"login":"PRX","id":160453,"avatar_url":"https://avatars.githubusercontent.com/u/160453?v=3","gravatar_id":"","url":"https://api.github.com/users/PRX","html_url":"https://github.com/PRX","followers_url":"https://api.github.com/users/PRX/followers","following_url":"https://api.github.com/users/PRX/following{/other_user}","gists_url":"https://api.github.com/users/PRX/gists{/gist_id}","starred_url":"https://api.github.com/users/PRX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PRX/subscriptions","organizations_url":"https://api.github.com/users/PRX/orgs","repos_url":"https://api.github.com/users/PRX/repos","events_url":"https://api.github.com/users/PRX/events{/privacy}","received_events_url":"https://api.github.com/users/PRX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PRX/publish.prx.org","description":"Publishing app","fork":false,"url":"https://api.github.com/repos/PRX/publish.prx.org","forks_url":"https://api.github.com/repos/PRX/publish.prx.org/forks","keys_url":"https://api.github.com/repos/PRX/publish.prx.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PRX/publish.prx.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PRX/publish.prx.org/teams","hooks_url":"https://api.github.com/repos/PRX/publish.prx.org/hooks","issue_events_url":"https://api.github.com/repos/PRX/publish.prx.org/issues/events{/number}","events_url":"https://api.github.com/repos/PRX/publish.prx.org/events","assignees_url":"https://api.github.com/repos/PRX/publish.prx.org/assignees{/user}","branches_url":"https://api.github.com/repos/PRX/publish.prx.org/branches{/branch}","tags_url":"https://api.github.com/repos/PRX/publish.prx.org/tags","blobs_url":"https://api.github.com/repos/PRX/publish.prx.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PRX/publish.prx.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PRX/publish.prx.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/PRX/publish.prx.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PRX/publish.prx.org/statuses/{sha}","languages_url":"https://api.github.com/repos/PRX/publish.prx.org/languages","stargazers_url":"https://api.github.com/repos/PRX/publish.prx.org/stargazers","contributors_url":"https://api.github.com/repos/PRX/publish.prx.org/contributors","subscribers_url":"https://api.github.com/repos/PRX/publish.prx.org/subscribers","subscription_url":"https://api.github.com/repos/PRX/publish.prx.org/subscription","commits_url":"https://api.github.com/repos/PRX/publish.prx.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/PRX/publish.prx.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/PRX/publish.prx.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/PRX/publish.prx.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/PRX/publish.prx.org/contents/{+path}","compare_url":"https://api.github.com/repos/PRX/publish.prx.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PRX/publish.prx.org/merges","archive_url":"https://api.github.com/repos/PRX/publish.prx.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PRX/publish.prx.org/downloads","issues_url":"https://api.github.com/repos/PRX/publish.prx.org/issues{/number}","pulls_url":"https://api.github.com/repos/PRX/publish.prx.org/pulls{/number}","milestones_url":"https://api.github.com/repos/PRX/publish.prx.org/milestones{/number}","notifications_url":"https://api.github.com/repos/PRX/publish.prx.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PRX/publish.prx.org/labels{/name}","releases_url":"https://api.github.com/repos/PRX/publish.prx.org/releases{/id}","deployments_url":"https://api.github.com/repos/PRX/publish.prx.org/deployments","created_at":"2016-03-03T18:55:16Z","updated_at":"2016-03-31T16:34:56Z","pushed_at":"2016-09-09T20:52:56Z","git_url":"git://github.com/PRX/publish.prx.org.git","ssh_url":"git@github.com:PRX/publish.prx.org.git","clone_url":"https://github.com/PRX/publish.prx.org.git","svn_url":"https://github.com/PRX/publish.prx.org","homepage":null,"size":9561,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PRX/publish.prx.org/pulls/37"},"html":{"href":"https://github.com/PRX/publish.prx.org/pull/37"},"issue":{"href":"https://api.github.com/repos/PRX/publish.prx.org/issues/37"},"comments":{"href":"https://api.github.com/repos/PRX/publish.prx.org/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/PRX/publish.prx.org/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/PRX/publish.prx.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PRX/publish.prx.org/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/PRX/publish.prx.org/statuses/6bb729d7be5938958867820a7224f3c9539fe227"}}}}
{"actor":{"display_login":"cavis"}}