{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments/66208788","id":66208788,"diff_hunk":"@@ -0,0 +1,64 @@\n+var cdb = require('cartodb.js');\n+var _ = require('underscore');\n+var NotifierItemView = require('./notifier-item-view');\n+\n+module.exports = cdb.core.View.extend({\n+  className: 'Notifier',\n+\n+  initialize: function (opts) {\n+    if (!opts.collection) throw new Error('collection is mandatory');\n+    if (!opts.editorModel) throw new Error('editorModel is mandatory');\n+\n+    this._editorModel = opts.editorModel;\n+    this._initBinds();\n+  },\n+\n+  render: function () {\n+    this.clearSubViews();\n+    this.$el.empty();\n+    this._renderAllSubviews();\n+    return this;\n+  },\n+\n+  _initBinds: function () {\n+    this.listenTo(this.collection, 'reset', this.render);\n+    this.listenTo(this.collection, 'add', this._renderSubview);\n+    this.listenTo(this.collection, 'remove', this._removeSubview);","path":"lib/assets/javascripts/cartodb3/editor/components/notifier/notifier-view.js","position":26,"original_position":26,"commit_id":"73dd1a0c97771d34c43a19b4ca627e35d353d356","original_commit_id":"73dd1a0c97771d34c43a19b4ca627e35d353d356","user":{"login":"xavijam","id":132146,"avatar_url":"https://avatars.githubusercontent.com/u/132146?v=3","gravatar_id":"","url":"https://api.github.com/users/xavijam","html_url":"https://github.com/xavijam","followers_url":"https://api.github.com/users/xavijam/followers","following_url":"https://api.github.com/users/xavijam/following{/other_user}","gists_url":"https://api.github.com/users/xavijam/gists{/gist_id}","starred_url":"https://api.github.com/users/xavijam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavijam/subscriptions","organizations_url":"https://api.github.com/users/xavijam/orgs","repos_url":"https://api.github.com/users/xavijam/repos","events_url":"https://api.github.com/users/xavijam/events{/privacy}","received_events_url":"https://api.github.com/users/xavijam/received_events","type":"User","site_admin":false},"body":"`this.add_related_model(this.collection);`","created_at":"2016-06-08T08:03:52Z","updated_at":"2016-06-08T08:03:52Z","html_url":"https://github.com/CartoDB/cartodb/pull/7693#discussion_r66208788","pull_request_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/7693","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments/66208788"},"html":{"href":"https://github.com/CartoDB/cartodb/pull/7693#discussion_r66208788"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/7693"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/cartodb/pulls/7693","id":72754653,"html_url":"https://github.com/CartoDB/cartodb/pull/7693","diff_url":"https://github.com/CartoDB/cartodb/pull/7693.diff","patch_url":"https://github.com/CartoDB/cartodb/pull/7693.patch","issue_url":"https://api.github.com/repos/CartoDB/cartodb/issues/7693","number":7693,"state":"open","locked":false,"title":"Notifier","user":{"login":"nobuti","id":1366843,"avatar_url":"https://avatars.githubusercontent.com/u/1366843?v=3","gravatar_id":"","url":"https://api.github.com/users/nobuti","html_url":"https://github.com/nobuti","followers_url":"https://api.github.com/users/nobuti/followers","following_url":"https://api.github.com/users/nobuti/following{/other_user}","gists_url":"https://api.github.com/users/nobuti/gists{/gist_id}","starred_url":"https://api.github.com/users/nobuti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nobuti/subscriptions","organizations_url":"https://api.github.com/users/nobuti/orgs","repos_url":"https://api.github.com/users/nobuti/repos","events_url":"https://api.github.com/users/nobuti/events{/privacy}","received_events_url":"https://api.github.com/users/nobuti/received_events","type":"User","site_admin":false},"body":"This PR closes #7549.\r\n\r\n![notifier](https://cloud.githubusercontent.com/assets/1366843/15832523/dff2038a-2c22-11e6-901e-8b7a783078ea.gif)\r\n\r\nThe code that implements the interaction above is:\r\n\r\n```\r\nvar model = Notifier.addNotification({\r\n  id: 'whatever',\r\n  status: 'idle | loading | success | error',\r\n  info: 'Uploading file.zip',\r\n  closable: true | false,\r\n  button: falsy | 'Label'\r\n});\r\n\r\nNotifier.getNotification('whatever');\r\nNotifier.getNotification(model);\r\nNotifier.removeNotification('whatever');\r\nNotifier.removeNotification(model);\r\n\r\nmodel.on('notification:close', callback);\r\nmodel.on('notification:action', callback);\r\n```\r\n\r\nFor now, only 3 states for a notification have been contemplated: `loading`, `success` and `error`. Taking this in mind, the error icon is not the same as the icon we have in Invision. cc @piensaenpixel .\r\n\r\ncc @xavijam @viddo ","created_at":"2016-06-06T18:24:50Z","updated_at":"2016-06-08T08:03:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"98581270bb9efacb00132059557a2ca02203633e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/7693/commits","review_comments_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/7693/comments","review_comment_url":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/issues/7693/comments","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/73dd1a0c97771d34c43a19b4ca627e35d353d356","head":{"label":"CartoDB:7549-notifier","ref":"7549-notifier","sha":"73dd1a0c97771d34c43a19b4ca627e35d353d356","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":4909355,"name":"cartodb","full_name":"CartoDB/cartodb","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/cartodb","description":"Location Intelligence & Data Visualization tool","fork":false,"url":"https://api.github.com/repos/CartoDB/cartodb","forks_url":"https://api.github.com/repos/CartoDB/cartodb/forks","keys_url":"https://api.github.com/repos/CartoDB/cartodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/cartodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/cartodb/teams","hooks_url":"https://api.github.com/repos/CartoDB/cartodb/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/cartodb/events","assignees_url":"https://api.github.com/repos/CartoDB/cartodb/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/cartodb/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/cartodb/tags","blobs_url":"https://api.github.com/repos/CartoDB/cartodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/cartodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/cartodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/cartodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/cartodb/languages","stargazers_url":"https://api.github.com/repos/CartoDB/cartodb/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/cartodb/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/cartodb/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/cartodb/subscription","commits_url":"https://api.github.com/repos/CartoDB/cartodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/cartodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/cartodb/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/cartodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/cartodb/merges","archive_url":"https://api.github.com/repos/CartoDB/cartodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/cartodb/downloads","issues_url":"https://api.github.com/repos/CartoDB/cartodb/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/cartodb/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/cartodb/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/cartodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/cartodb/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/cartodb/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/cartodb/deployments","created_at":"2012-07-05T15:23:45Z","updated_at":"2016-06-07T07:36:38Z","pushed_at":"2016-06-08T07:36:13Z","git_url":"git://github.com/CartoDB/cartodb.git","ssh_url":"git@github.com:CartoDB/cartodb.git","clone_url":"https://github.com/CartoDB/cartodb.git","svn_url":"https://github.com/CartoDB/cartodb","homepage":"http://cartodb.com","size":388504,"stargazers_count":1148,"watchers_count":1148,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":292,"mirror_url":null,"open_issues_count":937,"forks":292,"open_issues":937,"watchers":1148,"default_branch":"master"}},"base":{"label":"CartoDB:master","ref":"master","sha":"e0d01c73f5801eb9f6ba4bb3f995cddf5600a0df","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":4909355,"name":"cartodb","full_name":"CartoDB/cartodb","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/cartodb","description":"Location Intelligence & Data Visualization tool","fork":false,"url":"https://api.github.com/repos/CartoDB/cartodb","forks_url":"https://api.github.com/repos/CartoDB/cartodb/forks","keys_url":"https://api.github.com/repos/CartoDB/cartodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/cartodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/cartodb/teams","hooks_url":"https://api.github.com/repos/CartoDB/cartodb/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/cartodb/events","assignees_url":"https://api.github.com/repos/CartoDB/cartodb/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/cartodb/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/cartodb/tags","blobs_url":"https://api.github.com/repos/CartoDB/cartodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/cartodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/cartodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/cartodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/cartodb/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/cartodb/languages","stargazers_url":"https://api.github.com/repos/CartoDB/cartodb/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/cartodb/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/cartodb/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/cartodb/subscription","commits_url":"https://api.github.com/repos/CartoDB/cartodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/cartodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/cartodb/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/cartodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/cartodb/merges","archive_url":"https://api.github.com/repos/CartoDB/cartodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/cartodb/downloads","issues_url":"https://api.github.com/repos/CartoDB/cartodb/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/cartodb/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/cartodb/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/cartodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/cartodb/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/cartodb/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/cartodb/deployments","created_at":"2012-07-05T15:23:45Z","updated_at":"2016-06-07T07:36:38Z","pushed_at":"2016-06-08T07:36:13Z","git_url":"git://github.com/CartoDB/cartodb.git","ssh_url":"git@github.com:CartoDB/cartodb.git","clone_url":"https://github.com/CartoDB/cartodb.git","svn_url":"https://github.com/CartoDB/cartodb","homepage":"http://cartodb.com","size":388504,"stargazers_count":1148,"watchers_count":1148,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":292,"mirror_url":null,"open_issues_count":937,"forks":292,"open_issues":937,"watchers":1148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/7693"},"html":{"href":"https://github.com/CartoDB/cartodb/pull/7693"},"issue":{"href":"https://api.github.com/repos/CartoDB/cartodb/issues/7693"},"comments":{"href":"https://api.github.com/repos/CartoDB/cartodb/issues/7693/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/7693/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/cartodb/pulls/7693/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/cartodb/statuses/73dd1a0c97771d34c43a19b4ca627e35d353d356"}}}}
{"actor":{"display_login":"xavijam"}}