{"action":"created","comment":{"url":"https://api.github.com/repos/cargomedia/cm/pulls/comments/35076023","id":35076023,"diff_hunk":"@@ -15,7 +15,7 @@ var CM_FormField_Suggest = CM_FormField_Abstract.extend({\n     var prePopulate = this._$input.data('pre-populate');\n \n     this._$input.removeClass('textinput');\n-    this._$input.select2({\n+    this._$input.select2(_.extend({","path":"library/CM/FormField/Suggest.js","position":5,"original_position":5,"commit_id":"db2a325ebd5ea3b54c8081dd9778facbf8599484","original_commit_id":"db2a325ebd5ea3b54c8081dd9778facbf8599484","user":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"body":"Is this the best/only way of doing this? Extending internals of a jquery plugin seems a bit intrusive..\r\nCan we rather plug in that transformation in other places?","created_at":"2015-07-21T07:30:05Z","updated_at":"2015-07-21T07:30:05Z","html_url":"https://github.com/cargomedia/cm/pull/1844#discussion_r35076023","pull_request_url":"https://api.github.com/repos/cargomedia/cm/pulls/1844","_links":{"self":{"href":"https://api.github.com/repos/cargomedia/cm/pulls/comments/35076023"},"html":{"href":"https://github.com/cargomedia/cm/pull/1844#discussion_r35076023"},"pull_request":{"href":"https://api.github.com/repos/cargomedia/cm/pulls/1844"}}},"pull_request":{"url":"https://api.github.com/repos/cargomedia/cm/pulls/1844","id":40372800,"html_url":"https://github.com/cargomedia/cm/pull/1844","diff_url":"https://github.com/cargomedia/cm/pull/1844.diff","patch_url":"https://github.com/cargomedia/cm/pull/1844.patch","issue_url":"https://api.github.com/repos/cargomedia/cm/issues/1844","number":1844,"state":"open","locked":false,"title":"Change serialization for location formField","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"body":"For: https://github.com/cargomedia/sk/pull/11\r\n\r\nCurrently we serialize location objects as `$level.$id` in `CM_FormField_Location`.\r\nWe should change it to `toArray()`-serialization, which is an array `{level: $level, id: $id, _class: $className}`.\r\n\r\nThe goal is to get json objects on `change` in JS:\r\n```js\r\nlocationFormField.on('change', function(value) {\r\n // value is a JSON object with \"level\" and \"id\"\r\n});\r\n```\r\n\r\n@vogdb you wanna do it? Is it possible like this?","created_at":"2015-07-20T16:50:54Z","updated_at":"2015-07-21T07:30:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78d728746b8b7a160a40422c702a4bfad6e952ca","assignee":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cargomedia/cm/pulls/1844/commits","review_comments_url":"https://api.github.com/repos/cargomedia/cm/pulls/1844/comments","review_comment_url":"https://api.github.com/repos/cargomedia/cm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cargomedia/cm/issues/1844/comments","statuses_url":"https://api.github.com/repos/cargomedia/cm/statuses/db2a325ebd5ea3b54c8081dd9778facbf8599484","head":{"label":"vogdb:issue-1844","ref":"issue-1844","sha":"db2a325ebd5ea3b54c8081dd9778facbf8599484","user":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"repo":{"id":23101151,"name":"cm","full_name":"vogdb/cm","owner":{"login":"vogdb","id":372386,"avatar_url":"https://avatars.githubusercontent.com/u/372386?v=3","gravatar_id":"","url":"https://api.github.com/users/vogdb","html_url":"https://github.com/vogdb","followers_url":"https://api.github.com/users/vogdb/followers","following_url":"https://api.github.com/users/vogdb/following{/other_user}","gists_url":"https://api.github.com/users/vogdb/gists{/gist_id}","starred_url":"https://api.github.com/users/vogdb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vogdb/subscriptions","organizations_url":"https://api.github.com/users/vogdb/orgs","repos_url":"https://api.github.com/users/vogdb/repos","events_url":"https://api.github.com/users/vogdb/events{/privacy}","received_events_url":"https://api.github.com/users/vogdb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vogdb/cm","description":"CM web application framework","fork":true,"url":"https://api.github.com/repos/vogdb/cm","forks_url":"https://api.github.com/repos/vogdb/cm/forks","keys_url":"https://api.github.com/repos/vogdb/cm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vogdb/cm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vogdb/cm/teams","hooks_url":"https://api.github.com/repos/vogdb/cm/hooks","issue_events_url":"https://api.github.com/repos/vogdb/cm/issues/events{/number}","events_url":"https://api.github.com/repos/vogdb/cm/events","assignees_url":"https://api.github.com/repos/vogdb/cm/assignees{/user}","branches_url":"https://api.github.com/repos/vogdb/cm/branches{/branch}","tags_url":"https://api.github.com/repos/vogdb/cm/tags","blobs_url":"https://api.github.com/repos/vogdb/cm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vogdb/cm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vogdb/cm/git/refs{/sha}","trees_url":"https://api.github.com/repos/vogdb/cm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vogdb/cm/statuses/{sha}","languages_url":"https://api.github.com/repos/vogdb/cm/languages","stargazers_url":"https://api.github.com/repos/vogdb/cm/stargazers","contributors_url":"https://api.github.com/repos/vogdb/cm/contributors","subscribers_url":"https://api.github.com/repos/vogdb/cm/subscribers","subscription_url":"https://api.github.com/repos/vogdb/cm/subscription","commits_url":"https://api.github.com/repos/vogdb/cm/commits{/sha}","git_commits_url":"https://api.github.com/repos/vogdb/cm/git/commits{/sha}","comments_url":"https://api.github.com/repos/vogdb/cm/comments{/number}","issue_comment_url":"https://api.github.com/repos/vogdb/cm/issues/comments{/number}","contents_url":"https://api.github.com/repos/vogdb/cm/contents/{+path}","compare_url":"https://api.github.com/repos/vogdb/cm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vogdb/cm/merges","archive_url":"https://api.github.com/repos/vogdb/cm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vogdb/cm/downloads","issues_url":"https://api.github.com/repos/vogdb/cm/issues{/number}","pulls_url":"https://api.github.com/repos/vogdb/cm/pulls{/number}","milestones_url":"https://api.github.com/repos/vogdb/cm/milestones{/number}","notifications_url":"https://api.github.com/repos/vogdb/cm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vogdb/cm/labels{/name}","releases_url":"https://api.github.com/repos/vogdb/cm/releases{/id}","created_at":"2014-08-19T07:34:20Z","updated_at":"2015-07-19T11:37:16Z","pushed_at":"2015-07-20T17:15:28Z","git_url":"git://github.com/vogdb/cm.git","ssh_url":"git@github.com:vogdb/cm.git","clone_url":"https://github.com/vogdb/cm.git","svn_url":"https://github.com/vogdb/cm","homepage":"","size":29732,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cargomedia:master","ref":"master","sha":"dcd6833378ad4ac10fed966f4e2c5080e9ff305e","user":{"login":"cargomedia","id":1699929,"avatar_url":"https://avatars.githubusercontent.com/u/1699929?v=3","gravatar_id":"","url":"https://api.github.com/users/cargomedia","html_url":"https://github.com/cargomedia","followers_url":"https://api.github.com/users/cargomedia/followers","following_url":"https://api.github.com/users/cargomedia/following{/other_user}","gists_url":"https://api.github.com/users/cargomedia/gists{/gist_id}","starred_url":"https://api.github.com/users/cargomedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cargomedia/subscriptions","organizations_url":"https://api.github.com/users/cargomedia/orgs","repos_url":"https://api.github.com/users/cargomedia/repos","events_url":"https://api.github.com/users/cargomedia/events{/privacy}","received_events_url":"https://api.github.com/users/cargomedia/received_events","type":"Organization","site_admin":false},"repo":{"id":7134007,"name":"cm","full_name":"cargomedia/cm","owner":{"login":"cargomedia","id":1699929,"avatar_url":"https://avatars.githubusercontent.com/u/1699929?v=3","gravatar_id":"","url":"https://api.github.com/users/cargomedia","html_url":"https://github.com/cargomedia","followers_url":"https://api.github.com/users/cargomedia/followers","following_url":"https://api.github.com/users/cargomedia/following{/other_user}","gists_url":"https://api.github.com/users/cargomedia/gists{/gist_id}","starred_url":"https://api.github.com/users/cargomedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cargomedia/subscriptions","organizations_url":"https://api.github.com/users/cargomedia/orgs","repos_url":"https://api.github.com/users/cargomedia/repos","events_url":"https://api.github.com/users/cargomedia/events{/privacy}","received_events_url":"https://api.github.com/users/cargomedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cargomedia/cm","description":"CM web application framework","fork":false,"url":"https://api.github.com/repos/cargomedia/cm","forks_url":"https://api.github.com/repos/cargomedia/cm/forks","keys_url":"https://api.github.com/repos/cargomedia/cm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cargomedia/cm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cargomedia/cm/teams","hooks_url":"https://api.github.com/repos/cargomedia/cm/hooks","issue_events_url":"https://api.github.com/repos/cargomedia/cm/issues/events{/number}","events_url":"https://api.github.com/repos/cargomedia/cm/events","assignees_url":"https://api.github.com/repos/cargomedia/cm/assignees{/user}","branches_url":"https://api.github.com/repos/cargomedia/cm/branches{/branch}","tags_url":"https://api.github.com/repos/cargomedia/cm/tags","blobs_url":"https://api.github.com/repos/cargomedia/cm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cargomedia/cm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cargomedia/cm/git/refs{/sha}","trees_url":"https://api.github.com/repos/cargomedia/cm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cargomedia/cm/statuses/{sha}","languages_url":"https://api.github.com/repos/cargomedia/cm/languages","stargazers_url":"https://api.github.com/repos/cargomedia/cm/stargazers","contributors_url":"https://api.github.com/repos/cargomedia/cm/contributors","subscribers_url":"https://api.github.com/repos/cargomedia/cm/subscribers","subscription_url":"https://api.github.com/repos/cargomedia/cm/subscription","commits_url":"https://api.github.com/repos/cargomedia/cm/commits{/sha}","git_commits_url":"https://api.github.com/repos/cargomedia/cm/git/commits{/sha}","comments_url":"https://api.github.com/repos/cargomedia/cm/comments{/number}","issue_comment_url":"https://api.github.com/repos/cargomedia/cm/issues/comments{/number}","contents_url":"https://api.github.com/repos/cargomedia/cm/contents/{+path}","compare_url":"https://api.github.com/repos/cargomedia/cm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cargomedia/cm/merges","archive_url":"https://api.github.com/repos/cargomedia/cm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cargomedia/cm/downloads","issues_url":"https://api.github.com/repos/cargomedia/cm/issues{/number}","pulls_url":"https://api.github.com/repos/cargomedia/cm/pulls{/number}","milestones_url":"https://api.github.com/repos/cargomedia/cm/milestones{/number}","notifications_url":"https://api.github.com/repos/cargomedia/cm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cargomedia/cm/labels{/name}","releases_url":"https://api.github.com/repos/cargomedia/cm/releases{/id}","created_at":"2012-12-12T17:00:30Z","updated_at":"2015-07-19T11:36:20Z","pushed_at":"2015-07-21T07:16:45Z","git_url":"git://github.com/cargomedia/cm.git","ssh_url":"git@github.com:cargomedia/cm.git","clone_url":"https://github.com/cargomedia/cm.git","svn_url":"https://github.com/cargomedia/cm","homepage":"","size":38058,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":32,"forks":15,"open_issues":32,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cargomedia/cm/pulls/1844"},"html":{"href":"https://github.com/cargomedia/cm/pull/1844"},"issue":{"href":"https://api.github.com/repos/cargomedia/cm/issues/1844"},"comments":{"href":"https://api.github.com/repos/cargomedia/cm/issues/1844/comments"},"review_comments":{"href":"https://api.github.com/repos/cargomedia/cm/pulls/1844/comments"},"review_comment":{"href":"https://api.github.com/repos/cargomedia/cm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cargomedia/cm/pulls/1844/commits"},"statuses":{"href":"https://api.github.com/repos/cargomedia/cm/statuses/db2a325ebd5ea3b54c8081dd9778facbf8599484"}}}}