{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/69959570","id":69959570,"diff_hunk":"@@ -329,33 +344,92 @@\n \n         {# javascript below this line #}\n \n+        {% if request.use_requirejs %}\n+            <script src=\"{% static 'hqwebapp/js/lib/require.js' %}\"></script>\n+            <script type=\"text/javascript\">\n+                requirejs.config({\n+                    baseUrl: \"{% block requirejs_url %}{% endblock %}\",\n+                    paths: {\n+                        {% include \"style/includes/core_libraries.html\" %}\n+                        \"bootstrap\": \"{% static 'bootstrap/dist/js/bootstrap.min' %}\",\n+                        \"hq.helpers\": \"{% static 'style/js/hq.helpers' %}\",\n+                        \"knockout\": \"{% static 'knockout/dist/knockout.debug' %}\",\n+                        \"ko.mapping\": \"{% static 'style/lib/knockout_plugins/knockout_mapping.ko.min' %}\",\n+                        \"ko.global_handlers\": \"{% static 'style/ko/global_handlers.ko' %}\",\n+                        \"ko.knockout_bindings\": \"{% static 'style/ko/knockout_bindings.ko' %}\",\n+\n+                        {% if request.use_datatables %}\n+                        \"datatables\": \"{% static 'datatables/media/js/jquery.dataTables.min' %}\",\n+                        \"datatables.fixedColumns\": \"{% static 'datatables-fixedcolumns/js/dataTables.fixedColumns' %}\",\n+                        \"datatables.bootstrap\": \"{% static 'datatables-bootstrap3/BS3/assets/js/datatables' %}\",\n+                        {% endif %}\n+\n+                        {% if request.use_select2 %}\n+                        \"select2\": \"{% static 'select2-3.5.2-legacy/select2' %}\",\n+                        {% endif %}\n+\n+                        {% if request.use_select2_v4 %}\n+                        \"select2\": \"{% static 'select2/dist/js/select2.full.min' %}\",\n+                        {% endif %}\n+                    },\n+                    shim: {\n+                        \"bootstrap\": { deps: ['jquery'] },\n+                        \"hq.helpers\": { deps: ['jquery', 'bootstrap', 'knockout'] },\n+                        \"ko.mapping\": { deps: ['knockout'] },\n+                        \"ko.global_handlers\": { deps: ['knockout'] },\n+                        \"ko.knockout_bindings\": { deps: ['knockout'] },\n+\n+                        {% if request.use_datatables %}\n+                        \"datatables.bootstrap\": { deps: ['datatables'] },\n+                        {% endif %}\n+                    },\n+                    map: {\n+                        {% if request.use_datatables %}\n+                        \"datatables.fixedColumns\": {\n+                            \"datatables.net\": \"datatables\",","path":"corehq/apps/style/templates/style/base.html","position":107,"original_position":107,"commit_id":"a1a597a0e114324e8ccef0e49125c23c757cbcae","original_commit_id":"a1a597a0e114324e8ccef0e49125c23c757cbcae","user":{"login":"orangejenny","id":1486591,"avatar_url":"https://avatars.githubusercontent.com/u/1486591?v=3","gravatar_id":"","url":"https://api.github.com/users/orangejenny","html_url":"https://github.com/orangejenny","followers_url":"https://api.github.com/users/orangejenny/followers","following_url":"https://api.github.com/users/orangejenny/following{/other_user}","gists_url":"https://api.github.com/users/orangejenny/gists{/gist_id}","starred_url":"https://api.github.com/users/orangejenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangejenny/subscriptions","organizations_url":"https://api.github.com/users/orangejenny/orgs","repos_url":"https://api.github.com/users/orangejenny/repos","events_url":"https://api.github.com/users/orangejenny/events{/privacy}","received_events_url":"https://api.github.com/users/orangejenny/received_events","type":"User","site_admin":false},"body":"The `fixedColumns` plugin uses a hard-coded `require(\"datatables.net\")` :(","created_at":"2016-07-07T18:23:59Z","updated_at":"2016-07-07T18:23:59Z","html_url":"https://github.com/dimagi/commcare-hq/pull/12359#discussion_r69959570","pull_request_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/12359","_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/69959570"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/12359#discussion_r69959570"},"pull_request":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/12359"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/12359","id":76637653,"html_url":"https://github.com/dimagi/commcare-hq/pull/12359","diff_url":"https://github.com/dimagi/commcare-hq/pull/12359.diff","patch_url":"https://github.com/dimagi/commcare-hq/pull/12359.patch","issue_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/12359","number":12359,"state":"open","locked":false,"title":"RequireJS proof of concept","user":{"login":"orangejenny","id":1486591,"avatar_url":"https://avatars.githubusercontent.com/u/1486591?v=3","gravatar_id":"","url":"https://api.github.com/users/orangejenny","html_url":"https://github.com/orangejenny","followers_url":"https://api.github.com/users/orangejenny/followers","following_url":"https://api.github.com/users/orangejenny/following{/other_user}","gists_url":"https://api.github.com/users/orangejenny/gists{/gist_id}","starred_url":"https://api.github.com/users/orangejenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangejenny/subscriptions","organizations_url":"https://api.github.com/users/orangejenny/orgs","repos_url":"https://api.github.com/users/orangejenny/repos","events_url":"https://api.github.com/users/orangejenny/events{/privacy}","received_events_url":"https://api.github.com/users/orangejenny/received_events","type":"User","site_admin":false},"body":"Converts the fixtures pages (Data > Lookup Tables > Manage/View Tables) to use RequireJS.\r\n\r\n@millerdev what do you think? Happy to talk through over voice if that'd be easier.","created_at":"2016-07-07T17:52:11Z","updated_at":"2016-07-07T18:23:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"476ec6c6be664ec0f1d5e3e929ff44332cee5df3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/12359/commits","review_comments_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/12359/comments","review_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/12359/comments","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/a1a597a0e114324e8ccef0e49125c23c757cbcae","head":{"label":"dimagi:fixtures-require-js","ref":"fixtures-require-js","sha":"a1a597a0e114324e8ccef0e49125c23c757cbcae","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"name":"commcare-hq","full_name":"dimagi/commcare-hq","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcare-hq/deployments","created_at":"2009-07-09T17:00:07Z","updated_at":"2016-05-16T15:23:03Z","pushed_at":"2016-07-07T18:21:47Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"http://www.commcarehq.org","size":303956,"stargazers_count":72,"watchers_count":72,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":69,"mirror_url":null,"open_issues_count":43,"forks":69,"open_issues":43,"watchers":72,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"aff5328dc59e068be54f9443b0cfa9ad9661198b","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"name":"commcare-hq","full_name":"dimagi/commcare-hq","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcare-hq/deployments","created_at":"2009-07-09T17:00:07Z","updated_at":"2016-05-16T15:23:03Z","pushed_at":"2016-07-07T18:21:47Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"http://www.commcarehq.org","size":303956,"stargazers_count":72,"watchers_count":72,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":69,"mirror_url":null,"open_issues_count":43,"forks":69,"open_issues":43,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/12359"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/12359"},"issue":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/12359"},"comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/12359/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/12359/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/12359/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/commcare-hq/statuses/a1a597a0e114324e8ccef0e49125c23c757cbcae"}}}}
{"actor":{"display_login":"orangejenny"}}