{"action":"created","comment":{"url":"https://api.github.com/repos/marmelab/ng-admin/pulls/comments/25068455","id":25068455,"diff_hunk":"@@ -0,0 +1,81 @@\n+/*global define*/\n+\n+define(function (require) {\n+    'use strict';\n+\n+    var _ = require('lodash');\n+\n+    function maField(FieldViewConfiguration) {","path":"src/javascripts/ng-admin/Crud/field/maField.js","position":8,"original_position":8,"commit_id":"7512426b0d10b341e014f9119f6fd8464aa99e2e","original_commit_id":"7512426b0d10b341e014f9119f6fd8464aa99e2e","user":{"login":"fzaninotto","id":99944,"avatar_url":"https://avatars.githubusercontent.com/u/99944?v=3","gravatar_id":"","url":"https://api.github.com/users/fzaninotto","html_url":"https://github.com/fzaninotto","followers_url":"https://api.github.com/users/fzaninotto/followers","following_url":"https://api.github.com/users/fzaninotto/following{/other_user}","gists_url":"https://api.github.com/users/fzaninotto/gists{/gist_id}","starred_url":"https://api.github.com/users/fzaninotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzaninotto/subscriptions","organizations_url":"https://api.github.com/users/fzaninotto/orgs","repos_url":"https://api.github.com/users/fzaninotto/repos","events_url":"https://api.github.com/users/fzaninotto/events{/privacy}","received_events_url":"https://api.github.com/users/fzaninotto/received_events","type":"User","site_admin":false},"body":"Replaces the `ng-include=\"edit-attributes.html\"` in edition and creation view","created_at":"2015-02-20T13:12:03Z","updated_at":"2015-02-20T13:12:03Z","html_url":"https://github.com/marmelab/ng-admin/pull/325#discussion_r25068455","pull_request_url":"https://api.github.com/repos/marmelab/ng-admin/pulls/325","_links":{"self":{"href":"https://api.github.com/repos/marmelab/ng-admin/pulls/comments/25068455"},"html":{"href":"https://github.com/marmelab/ng-admin/pull/325#discussion_r25068455"},"pull_request":{"href":"https://api.github.com/repos/marmelab/ng-admin/pulls/325"}}},"pull_request":{"url":"https://api.github.com/repos/marmelab/ng-admin/pulls/325","id":29693909,"html_url":"https://github.com/marmelab/ng-admin/pull/325","diff_url":"https://github.com/marmelab/ng-admin/pull/325.diff","patch_url":"https://github.com/marmelab/ng-admin/pull/325.patch","issue_url":"https://api.github.com/repos/marmelab/ng-admin/issues/325","number":325,"state":"open","locked":false,"title":"[WIP] Factory for field Views","user":{"login":"fzaninotto","id":99944,"avatar_url":"https://avatars.githubusercontent.com/u/99944?v=3","gravatar_id":"","url":"https://api.github.com/users/fzaninotto","html_url":"https://github.com/fzaninotto","followers_url":"https://api.github.com/users/fzaninotto/followers","following_url":"https://api.github.com/users/fzaninotto/following{/other_user}","gists_url":"https://api.github.com/users/fzaninotto/gists{/gist_id}","starred_url":"https://api.github.com/users/fzaninotto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fzaninotto/subscriptions","organizations_url":"https://api.github.com/users/fzaninotto/orgs","repos_url":"https://api.github.com/users/fzaninotto/repos","events_url":"https://api.github.com/users/fzaninotto/events{/privacy}","received_events_url":"https://api.github.com/users/fzaninotto/received_events","type":"User","site_admin":false},"body":"Following #307, and refs #294, this PR introduces the second part of the factories: widget factories.\r\n\r\nA widget factory looks like the following:\r\n\r\n```js\r\ndefine(function(require) {\r\n    \"use strict\";\r\n\r\n    function getReadWidget() {\r\n        return '<ma-string-column value=\"::entry.values[field.name()]\"></ma-string-column>';\r\n    }\r\n    function getLinkWidget() {\r\n        return '<a ng-click=\"gotoDetail()\">' + getReadWidget() + '</a>';\r\n    }\r\n    function getFilterWidget() {\r\n        return '<ma-input-field field=\"::field\" value=\"values[field.name()]\"></ma-input-field>';\r\n    }\r\n    function getWriteWidget() {\r\n        return '<ma-input-field type=\"email\" field=\"::field\" value=\"entry.values[field.name()]\"></ma-input-field>';\r\n    }\r\n    return {\r\n        getReadWidget:   getReadWidget,\r\n        getLinkWidget:   getLinkWidget,\r\n        getFilterWidget: getFilterWidget,\r\n        getWriteWidget:  getWriteWidget,\r\n    }\r\n});\r\n```\r\n\r\nI didn't make a difference between listView and showView (refs #261), this will be in another PR.\r\n\r\nTasks:\r\n- [x] Create configuration provider for widgets\r\n- [x] Use widgets from config in listView\r\n- [x] Use widgets from config in filters\r\n- [x] Use widgets from config in creationView\r\n- [x] Use widgets from config in editionView\r\n- [ ] Fix rebase\r\n- [ ] Fix e2e tests\r\n- [ ] Add doc","created_at":"2015-02-20T13:00:39Z","updated_at":"2015-02-20T13:12:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/marmelab/ng-admin/pulls/325/commits","review_comments_url":"https://api.github.com/repos/marmelab/ng-admin/pulls/325/comments","review_comment_url":"https://api.github.com/repos/marmelab/ng-admin/pulls/comments/{number}","comments_url":"https://api.github.com/repos/marmelab/ng-admin/issues/325/comments","statuses_url":"https://api.github.com/repos/marmelab/ng-admin/statuses/7512426b0d10b341e014f9119f6fd8464aa99e2e","head":{"label":"factory_2","ref":"factory_2","sha":"7512426b0d10b341e014f9119f6fd8464aa99e2e","user":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"repo":{"id":20059361,"name":"ng-admin","full_name":"marmelab/ng-admin","owner":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marmelab/ng-admin","description":"Add an AngularJS admin GUI to any RESTful API","fork":false,"url":"https://api.github.com/repos/marmelab/ng-admin","forks_url":"https://api.github.com/repos/marmelab/ng-admin/forks","keys_url":"https://api.github.com/repos/marmelab/ng-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marmelab/ng-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marmelab/ng-admin/teams","hooks_url":"https://api.github.com/repos/marmelab/ng-admin/hooks","issue_events_url":"https://api.github.com/repos/marmelab/ng-admin/issues/events{/number}","events_url":"https://api.github.com/repos/marmelab/ng-admin/events","assignees_url":"https://api.github.com/repos/marmelab/ng-admin/assignees{/user}","branches_url":"https://api.github.com/repos/marmelab/ng-admin/branches{/branch}","tags_url":"https://api.github.com/repos/marmelab/ng-admin/tags","blobs_url":"https://api.github.com/repos/marmelab/ng-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marmelab/ng-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marmelab/ng-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/marmelab/ng-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marmelab/ng-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/marmelab/ng-admin/languages","stargazers_url":"https://api.github.com/repos/marmelab/ng-admin/stargazers","contributors_url":"https://api.github.com/repos/marmelab/ng-admin/contributors","subscribers_url":"https://api.github.com/repos/marmelab/ng-admin/subscribers","subscription_url":"https://api.github.com/repos/marmelab/ng-admin/subscription","commits_url":"https://api.github.com/repos/marmelab/ng-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/marmelab/ng-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/marmelab/ng-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/marmelab/ng-admin/issues/comments/{number}","contents_url":"https://api.github.com/repos/marmelab/ng-admin/contents/{+path}","compare_url":"https://api.github.com/repos/marmelab/ng-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marmelab/ng-admin/merges","archive_url":"https://api.github.com/repos/marmelab/ng-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marmelab/ng-admin/downloads","issues_url":"https://api.github.com/repos/marmelab/ng-admin/issues{/number}","pulls_url":"https://api.github.com/repos/marmelab/ng-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/marmelab/ng-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/marmelab/ng-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marmelab/ng-admin/labels{/name}","releases_url":"https://api.github.com/repos/marmelab/ng-admin/releases{/id}","created_at":"2014-05-22T12:00:10Z","updated_at":"2015-02-20T13:10:30Z","pushed_at":"2015-02-20T12:57:01Z","git_url":"git://github.com/marmelab/ng-admin.git","ssh_url":"git@github.com:marmelab/ng-admin.git","clone_url":"https://github.com/marmelab/ng-admin.git","svn_url":"https://github.com/marmelab/ng-admin","homepage":"http://ng-admin.marmelab.com/","size":12991,"stargazers_count":1214,"watchers_count":1214,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":40,"forks":100,"open_issues":40,"watchers":1214,"default_branch":"master"}},"base":{"label":"master","ref":"master","sha":"313fe12a4e4a4359b67abf939f87ce4bb4b2fbd4","user":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"repo":{"id":20059361,"name":"ng-admin","full_name":"marmelab/ng-admin","owner":{"login":"marmelab","id":3116319,"avatar_url":"https://avatars.githubusercontent.com/u/3116319?v=3","gravatar_id":"","url":"https://api.github.com/users/marmelab","html_url":"https://github.com/marmelab","followers_url":"https://api.github.com/users/marmelab/followers","following_url":"https://api.github.com/users/marmelab/following{/other_user}","gists_url":"https://api.github.com/users/marmelab/gists{/gist_id}","starred_url":"https://api.github.com/users/marmelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marmelab/subscriptions","organizations_url":"https://api.github.com/users/marmelab/orgs","repos_url":"https://api.github.com/users/marmelab/repos","events_url":"https://api.github.com/users/marmelab/events{/privacy}","received_events_url":"https://api.github.com/users/marmelab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marmelab/ng-admin","description":"Add an AngularJS admin GUI to any RESTful API","fork":false,"url":"https://api.github.com/repos/marmelab/ng-admin","forks_url":"https://api.github.com/repos/marmelab/ng-admin/forks","keys_url":"https://api.github.com/repos/marmelab/ng-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marmelab/ng-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marmelab/ng-admin/teams","hooks_url":"https://api.github.com/repos/marmelab/ng-admin/hooks","issue_events_url":"https://api.github.com/repos/marmelab/ng-admin/issues/events{/number}","events_url":"https://api.github.com/repos/marmelab/ng-admin/events","assignees_url":"https://api.github.com/repos/marmelab/ng-admin/assignees{/user}","branches_url":"https://api.github.com/repos/marmelab/ng-admin/branches{/branch}","tags_url":"https://api.github.com/repos/marmelab/ng-admin/tags","blobs_url":"https://api.github.com/repos/marmelab/ng-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marmelab/ng-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marmelab/ng-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/marmelab/ng-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marmelab/ng-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/marmelab/ng-admin/languages","stargazers_url":"https://api.github.com/repos/marmelab/ng-admin/stargazers","contributors_url":"https://api.github.com/repos/marmelab/ng-admin/contributors","subscribers_url":"https://api.github.com/repos/marmelab/ng-admin/subscribers","subscription_url":"https://api.github.com/repos/marmelab/ng-admin/subscription","commits_url":"https://api.github.com/repos/marmelab/ng-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/marmelab/ng-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/marmelab/ng-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/marmelab/ng-admin/issues/comments/{number}","contents_url":"https://api.github.com/repos/marmelab/ng-admin/contents/{+path}","compare_url":"https://api.github.com/repos/marmelab/ng-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marmelab/ng-admin/merges","archive_url":"https://api.github.com/repos/marmelab/ng-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marmelab/ng-admin/downloads","issues_url":"https://api.github.com/repos/marmelab/ng-admin/issues{/number}","pulls_url":"https://api.github.com/repos/marmelab/ng-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/marmelab/ng-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/marmelab/ng-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marmelab/ng-admin/labels{/name}","releases_url":"https://api.github.com/repos/marmelab/ng-admin/releases{/id}","created_at":"2014-05-22T12:00:10Z","updated_at":"2015-02-20T13:10:30Z","pushed_at":"2015-02-20T12:57:01Z","git_url":"git://github.com/marmelab/ng-admin.git","ssh_url":"git@github.com:marmelab/ng-admin.git","clone_url":"https://github.com/marmelab/ng-admin.git","svn_url":"https://github.com/marmelab/ng-admin","homepage":"http://ng-admin.marmelab.com/","size":12991,"stargazers_count":1214,"watchers_count":1214,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":40,"forks":100,"open_issues":40,"watchers":1214,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marmelab/ng-admin/pulls/325"},"html":{"href":"https://github.com/marmelab/ng-admin/pull/325"},"issue":{"href":"https://api.github.com/repos/marmelab/ng-admin/issues/325"},"comments":{"href":"https://api.github.com/repos/marmelab/ng-admin/issues/325/comments"},"review_comments":{"href":"https://api.github.com/repos/marmelab/ng-admin/pulls/325/comments"},"review_comment":{"href":"https://api.github.com/repos/marmelab/ng-admin/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/marmelab/ng-admin/pulls/325/commits"},"statuses":{"href":"https://api.github.com/repos/marmelab/ng-admin/statuses/7512426b0d10b341e014f9119f6fd8464aa99e2e"}}}}