{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/58723767","id":58723767,"diff_hunk":"@@ -0,0 +1,221 @@\n+var define = window.define || RequireJS.define;  // jshint ignore:line\n+\n+define(\n+  [\n+    'backbone',\n+    'jquery',\n+    'underscore',\n+    'gettext',\n+    'text!templates/ccx/underscore/right-container.underscore',\n+    'text!templates/ccx/underscore/form.underscore',\n+    'js/vendor/timepicker/jquery.timepicker'\n+  ],\n+  function (\n+    Backbone,\n+    $,\n+    _,\n+    gettext,\n+    scheduleRightContainerTemplate,\n+    scheduleFormTemplate\n+  ) {\n+    'use strict';\n+    return Backbone.View.extend({\n+\n+      events: {\n+        'change select#ccx_chapter': 'onChapterSelect',\n+        'change select#ccx_sequential': 'onSubsectionSelect',\n+        'change select#ccx_vertical': 'onVerticalSelect',\n+        'change .date': 'onDateSelect',\n+        'click #add-unit-button': 'addUnitInScheduleTree',\n+        'click #add-all': 'showAllUnitsInScheduleTree',\n+        'click #save-changes': 'saveSchedule'\n+      },\n+\n+      initialize: function(options) {\n+        this.unsavedChanges = options.unsavedChanges;\n+\n+        // Hidden data will be shown into form,","path":"lms/static/js/ccx/view/schedule_right_container.js","position":37,"original_position":37,"commit_id":"e24a4fcb38c3bbaa70c643eac6c24868d1d5842b","original_commit_id":"e24a4fcb38c3bbaa70c643eac6c24868d1d5842b","user":{"login":"cahrens","id":484484,"avatar_url":"https://avatars.githubusercontent.com/u/484484?v=3","gravatar_id":"","url":"https://api.github.com/users/cahrens","html_url":"https://github.com/cahrens","followers_url":"https://api.github.com/users/cahrens/followers","following_url":"https://api.github.com/users/cahrens/following{/other_user}","gists_url":"https://api.github.com/users/cahrens/gists{/gist_id}","starred_url":"https://api.github.com/users/cahrens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cahrens/subscriptions","organizations_url":"https://api.github.com/users/cahrens/orgs","repos_url":"https://api.github.com/users/cahrens/repos","events_url":"https://api.github.com/users/cahrens/events{/privacy}","received_events_url":"https://api.github.com/users/cahrens/received_events","type":"User","site_admin":false},"body":"One needs to verify that this hidden data is truly hidden from screen readers.","created_at":"2016-04-06T15:15:43Z","updated_at":"2016-04-06T15:15:43Z","html_url":"https://github.com/edx/edx-platform/pull/11647#discussion_r58723767","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/11647","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/58723767"},"html":{"href":"https://github.com/edx/edx-platform/pull/11647#discussion_r58723767"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11647"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/11647","id":60509294,"html_url":"https://github.com/edx/edx-platform/pull/11647","diff_url":"https://github.com/edx/edx-platform/pull/11647.diff","patch_url":"https://github.com/edx/edx-platform/pull/11647.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/11647","number":11647,"state":"open","locked":false,"title":"Refactored schedule tree","user":{"login":"amir-qayyum-khan","id":10431250,"avatar_url":"https://avatars.githubusercontent.com/u/10431250?v=3","gravatar_id":"","url":"https://api.github.com/users/amir-qayyum-khan","html_url":"https://github.com/amir-qayyum-khan","followers_url":"https://api.github.com/users/amir-qayyum-khan/followers","following_url":"https://api.github.com/users/amir-qayyum-khan/following{/other_user}","gists_url":"https://api.github.com/users/amir-qayyum-khan/gists{/gist_id}","starred_url":"https://api.github.com/users/amir-qayyum-khan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amir-qayyum-khan/subscriptions","organizations_url":"https://api.github.com/users/amir-qayyum-khan/orgs","repos_url":"https://api.github.com/users/amir-qayyum-khan/repos","events_url":"https://api.github.com/users/amir-qayyum-khan/events{/privacy}","received_events_url":"https://api.github.com/users/amir-qayyum-khan/received_events","type":"User","site_admin":false},"body":"### Background\r\nfixes mitocw#146, fixes mitocw#165, fixes mitocw#54, fixes mitocw#39 \r\n[mit_pr](https://github.com/mitocw/edx-platform/pull/169)\r\n\r\n### What is done in this PR\r\n**Studio Updates:** None.\r\n**LMS Updates:** \r\n - Refactored schedule page to use full potential of backbonejs\r\n - Now schedule tree will not collapse after setting dates or removing child. \r\n\r\n##### Detail:\r\n- User can see start or due date on schedule tree.\r\n- User can remove a unit (can be chapter, subsection or vertical) from tree. By doing so we will hide this component along with children by setting ``hidden=true``` \r\n- Added validation on changing start or due date on schedule tree.\r\n- The units with ``hidden=false`` is shown to schedule tree on left size, the units with ``hidden=true``  is supplied to form at right side. From there user can change visibility of hidden units by clicking ``Adding a unit`` or ``Adding all units`` \r\n- Added validation on start and due date in form.\r\n- In this refactoring I moved possible code to template.underscore files.\r\n- Made custom view for tree, right container, set date button \r\n- ccx_schedule.js is the main view. It saves, edit, update collection and renders other view\r\n\r\n@pdpinch @giocalitri @justinabrahms \r\n\r\n![screen shot 2016-01-04 at 7 41 22 pm](https://cloud.githubusercontent.com/assets/10431250/12091844/6b2f7a76-b31b-11e5-9205-dd4eb14f17a2.png)\r\n","created_at":"2016-02-24T13:34:37Z","updated_at":"2016-04-06T15:15:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"656fee3865beb46fedff7e32673fdabccf1dc63f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/11647/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/11647/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/11647/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/e24a4fcb38c3bbaa70c643eac6c24868d1d5842b","head":{"label":"mitocw:refactor/aq/schedule.js","ref":"refactor/aq/schedule.js","sha":"e24a4fcb38c3bbaa70c643eac6c24868d1d5842b","user":{"login":"mitocw","id":3009146,"avatar_url":"https://avatars.githubusercontent.com/u/3009146?v=3","gravatar_id":"","url":"https://api.github.com/users/mitocw","html_url":"https://github.com/mitocw","followers_url":"https://api.github.com/users/mitocw/followers","following_url":"https://api.github.com/users/mitocw/following{/other_user}","gists_url":"https://api.github.com/users/mitocw/gists{/gist_id}","starred_url":"https://api.github.com/users/mitocw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitocw/subscriptions","organizations_url":"https://api.github.com/users/mitocw/orgs","repos_url":"https://api.github.com/users/mitocw/repos","events_url":"https://api.github.com/users/mitocw/events{/privacy}","received_events_url":"https://api.github.com/users/mitocw/received_events","type":"Organization","site_admin":false},"repo":{"id":17842334,"name":"edx-platform","full_name":"mitocw/edx-platform","owner":{"login":"mitocw","id":3009146,"avatar_url":"https://avatars.githubusercontent.com/u/3009146?v=3","gravatar_id":"","url":"https://api.github.com/users/mitocw","html_url":"https://github.com/mitocw","followers_url":"https://api.github.com/users/mitocw/followers","following_url":"https://api.github.com/users/mitocw/following{/other_user}","gists_url":"https://api.github.com/users/mitocw/gists{/gist_id}","starred_url":"https://api.github.com/users/mitocw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitocw/subscriptions","organizations_url":"https://api.github.com/users/mitocw/orgs","repos_url":"https://api.github.com/users/mitocw/repos","events_url":"https://api.github.com/users/mitocw/events{/privacy}","received_events_url":"https://api.github.com/users/mitocw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mitocw/edx-platform","description":"the edX learning management system (LMS) and course authoring tool, Studio","fork":true,"url":"https://api.github.com/repos/mitocw/edx-platform","forks_url":"https://api.github.com/repos/mitocw/edx-platform/forks","keys_url":"https://api.github.com/repos/mitocw/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mitocw/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mitocw/edx-platform/teams","hooks_url":"https://api.github.com/repos/mitocw/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/mitocw/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/mitocw/edx-platform/events","assignees_url":"https://api.github.com/repos/mitocw/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/mitocw/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/mitocw/edx-platform/tags","blobs_url":"https://api.github.com/repos/mitocw/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mitocw/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mitocw/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mitocw/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mitocw/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mitocw/edx-platform/languages","stargazers_url":"https://api.github.com/repos/mitocw/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/mitocw/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/mitocw/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/mitocw/edx-platform/subscription","commits_url":"https://api.github.com/repos/mitocw/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mitocw/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mitocw/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mitocw/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mitocw/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/mitocw/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mitocw/edx-platform/merges","archive_url":"https://api.github.com/repos/mitocw/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mitocw/edx-platform/downloads","issues_url":"https://api.github.com/repos/mitocw/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/mitocw/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mitocw/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mitocw/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mitocw/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/mitocw/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/mitocw/edx-platform/deployments","created_at":"2014-03-17T20:32:05Z","updated_at":"2016-01-11T19:42:28Z","pushed_at":"2016-04-06T14:46:09Z","git_url":"git://github.com/mitocw/edx-platform.git","ssh_url":"git@github.com:mitocw/edx-platform.git","clone_url":"https://github.com/mitocw/edx-platform.git","svn_url":"https://github.com/mitocw/edx-platform","homepage":"http://code.edx.org/","size":658114,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":91,"forks":2,"open_issues":91,"watchers":3,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"34cecaee77e6527198e9b232659b89bf0cf0b51f","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","deployments_url":"https://api.github.com/repos/edx/edx-platform/deployments","created_at":"2013-05-30T20:20:38Z","updated_at":"2016-04-06T10:08:43Z","pushed_at":"2016-04-06T14:57:59Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":735306,"stargazers_count":2483,"watchers_count":2483,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1511,"mirror_url":null,"open_issues_count":170,"forks":1511,"open_issues":170,"watchers":2483,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11647"},"html":{"href":"https://github.com/edx/edx-platform/pull/11647"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/11647"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/11647/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11647/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/11647/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/e24a4fcb38c3bbaa70c643eac6c24868d1d5842b"}}}}