{"action":"created","issue":{"url":"https://api.github.com/repos/openscholar/openscholar/issues/7024","labels_url":"https://api.github.com/repos/openscholar/openscholar/issues/7024/labels{/name}","comments_url":"https://api.github.com/repos/openscholar/openscholar/issues/7024/comments","events_url":"https://api.github.com/repos/openscholar/openscholar/issues/7024/events","html_url":"https://github.com/openscholar/openscholar/issues/7024","id":60381274,"number":7024,"title":"Rewrite Media Browser to use AngularJS and REST endpoints","user":{"login":"mpetrovic","id":611447,"avatar_url":"https://avatars.githubusercontent.com/u/611447?v=3","gravatar_id":"","url":"https://api.github.com/users/mpetrovic","html_url":"https://github.com/mpetrovic","followers_url":"https://api.github.com/users/mpetrovic/followers","following_url":"https://api.github.com/users/mpetrovic/following{/other_user}","gists_url":"https://api.github.com/users/mpetrovic/gists{/gist_id}","starred_url":"https://api.github.com/users/mpetrovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpetrovic/subscriptions","organizations_url":"https://api.github.com/users/mpetrovic/orgs","repos_url":"https://api.github.com/users/mpetrovic/repos","events_url":"https://api.github.com/users/mpetrovic/events{/privacy}","received_events_url":"https://api.github.com/users/mpetrovic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openscholar/openscholar/labels/status:%20in%20dev","name":"status: in dev","color":"FF4500"},{"url":"https://api.github.com/repos/openscholar/openscholar/labels/status:%20needs%20qa","name":"status: needs qa","color":"02e10c"}],"state":"open","locked":false,"assignee":{"login":"mpetrovic","id":611447,"avatar_url":"https://avatars.githubusercontent.com/u/611447?v=3","gravatar_id":"","url":"https://api.github.com/users/mpetrovic","html_url":"https://github.com/mpetrovic","followers_url":"https://api.github.com/users/mpetrovic/followers","following_url":"https://api.github.com/users/mpetrovic/following{/other_user}","gists_url":"https://api.github.com/users/mpetrovic/gists{/gist_id}","starred_url":"https://api.github.com/users/mpetrovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpetrovic/subscriptions","organizations_url":"https://api.github.com/users/mpetrovic/orgs","repos_url":"https://api.github.com/users/mpetrovic/repos","events_url":"https://api.github.com/users/mpetrovic/events{/privacy}","received_events_url":"https://api.github.com/users/mpetrovic/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/openscholar/openscholar/milestones/34","html_url":"https://github.com/openscholar/openscholar/milestones/June%2029,%202015","labels_url":"https://api.github.com/repos/openscholar/openscholar/milestones/34/labels","id":1147563,"number":34,"title":"June 29, 2015","description":"","creator":{"login":"bilsi","id":11841641,"avatar_url":"https://avatars.githubusercontent.com/u/11841641?v=3","gravatar_id":"","url":"https://api.github.com/users/bilsi","html_url":"https://github.com/bilsi","followers_url":"https://api.github.com/users/bilsi/followers","following_url":"https://api.github.com/users/bilsi/following{/other_user}","gists_url":"https://api.github.com/users/bilsi/gists{/gist_id}","starred_url":"https://api.github.com/users/bilsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bilsi/subscriptions","organizations_url":"https://api.github.com/users/bilsi/orgs","repos_url":"https://api.github.com/users/bilsi/repos","events_url":"https://api.github.com/users/bilsi/events{/privacy}","received_events_url":"https://api.github.com/users/bilsi/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":0,"state":"open","created_at":"2015-06-03T15:32:21Z","updated_at":"2015-06-04T20:58:29Z","due_on":"2015-06-29T04:00:00Z","closed_at":null},"comments":51,"created_at":"2015-03-09T17:40:35Z","updated_at":"2015-06-05T15:28:27Z","closed_at":null,"body":"Port over the existing Media Browser to an entirely javascript-based solution.\r\n\r\nRelated Bugs:\r\n* [x] Replace does not work (https://github.com/openscholar/openscholar/issues/7007)\r\n* [ ] Edit/Replace on publications page should be used on all node forms, verify that this fixes (https://github.com/openscholar/openscholar/issues/7011)\r\n* [x] Files from other sites show in the MB [One of 2 related tickets](http://community.openscholar.harvard.edu/openscholar/topics/able-to-see-files-from-other-openscholar-sites)\r\n\r\nCore functionality:\r\n* [x] Change some terminology (screenshots below)\r\n* [x] When a file is uploaded that shares the exact same name as an existing file, ask the user if it would like to replace or save a new version with a different URL\r\n* [x] Show the user the URL their file will have, and allow them to choose a different URL\r\n* [x] View thumbnails of existing files (Library)\r\n* [x] Page through Library\r\n* [x] Filter Library files by filename\r\n* [x] Pager updates with filtered results\r\n* [x] Edit basic properties of files from Library\r\n* [x] Delete files from Library\r\n* [x] Upload new files\r\n* [x] Check for duplicate filenames\r\n* [x] Allow user to replace existing files with new versions\r\n* [x] Allow user to rename duplicate files on upload\r\n* [x] Enter link or block of html to be used as a file\r\n\r\nIntegration with existing forms:\r\n* [x] Standard fields\r\n* [ ] Drag n Drop Upload Field\r\n* [x] Add File from cp/content/files\r\n* [x] Wysiwyg Media Embed\r\n* [ ] ~~Wysiwyg link form~~ Uses old browser still. \r\n\r\nOther\r\n* [x] Make Edit and Delete forms psuedo-panes, so library can be excluded\r\n* [x] Allow File edit form to be invoked directly without first opening Browser\r\n\r\nIssues Remaining:\r\n* [x] Sites with private files return 302 when attempting to get list of all files\r\n* [x] Users with Site Owner or Support User cannot create new files\r\n\r\nScreenshots for Terminology:\r\n![mediabrowser-labelchanges2](https://cloud.githubusercontent.com/assets/651318/6562990/01a53f12-c674-11e4-8c6e-a020cb0ee755.png)\r\n![mediabrowser-labelchanges1](https://cloud.githubusercontent.com/assets/651318/6562992/0f7d7672-c674-11e4-8a2a-fe38958a4ddf.png)\r\n"},"comment":{"url":"https://api.github.com/repos/openscholar/openscholar/issues/comments/109328532","html_url":"https://github.com/openscholar/openscholar/issues/7024#issuecomment-109328532","issue_url":"https://api.github.com/repos/openscholar/openscholar/issues/7024","id":109328532,"user":{"login":"mpetrovic","id":611447,"avatar_url":"https://avatars.githubusercontent.com/u/611447?v=3","gravatar_id":"","url":"https://api.github.com/users/mpetrovic","html_url":"https://github.com/mpetrovic","followers_url":"https://api.github.com/users/mpetrovic/followers","following_url":"https://api.github.com/users/mpetrovic/following{/other_user}","gists_url":"https://api.github.com/users/mpetrovic/gists{/gist_id}","starred_url":"https://api.github.com/users/mpetrovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpetrovic/subscriptions","organizations_url":"https://api.github.com/users/mpetrovic/orgs","repos_url":"https://api.github.com/users/mpetrovic/repos","events_url":"https://api.github.com/users/mpetrovic/events{/privacy}","received_events_url":"https://api.github.com/users/mpetrovic/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T15:28:27Z","updated_at":"2015-06-05T15:28:27Z","body":"Master List of Everything There Is:\r\n\r\n**Locations**\r\n* [ ] The Browser properly replaces the old Media Browser in the standard file field.\r\n* [ ] The Browser properly replaces the old Media Browser in the WYSIWYG.\r\n* [ ] The Browser properly replaces the old Media Browser in Image crop fields\r\n* [ ] The Browser properly replaces the old Media Browser in the Drag and Drop file fields.\r\n\r\n**Beginning a New Upload**\r\n* [ ] A file can be dragged anywhere in the first tab to begin the upload process.\r\n* [ ] Multiple files can be dragged anywhere in the first tab to begin the upload process.\r\n* [ ] A file can be selected by clicking on the 'Add File' button to begin the upload process.\r\n* [ ] Multiple files can be selected by clicking on the 'Add File' button to begin the upload process.\r\n* [ ] Clicking on the 'Add File' button will filter the Operating System listed files by applicable types/extensions\r\n\r\n** New File Validation **\r\n* [ ] If a single file fails validation, a message will appear stating why it failed, then disappear after 5 seconds\r\n* [ ] If some files in a multiple file upload fail validation, messages will appear for each failure, stating why. These will disappear after 5 seconds.\r\n* [ ] If a duplicate file fails validation, there will be no prompt to replace/rename/cancel.\r\n\r\n** Uploading a New File**\r\n* [ ] A single non-duplicate file will upload automatically, and then switch to the edit form for that file\r\n* [ ] Multiple non-duplicate files will upload automatically in sequence, then switch to the Library.\r\n* [ ] A single duplicate file will give three options before uploading: rename, replace, cancel\r\n  * [ ] Choosing to rename a duplicate file will upload it with the new name, then go to the Edit form for that file\r\n  * [ ] Choosing to replace a duplicate file will upload it with the existing name, then go to the Edit form for that file. No new File object will be generated. \r\n  * [ ] Choosing to cancel will stop the file from uploading. No redirection happens.\r\n* [ ] Multiple duplicate files will give the above choices for each file in sequence\r\n  * [ ] Choosing to cancel one or some of the files will not prevent other files from uploading\r\n* Multiple files, some duplicates will follow this procedure:\r\n  * [ ] Non-duplicate files will upload with no delay\r\n  * [ ] Duplicate files will be presented the above 3 options, and added to the upload queue (or not) as the user makes choices\r\n\r\n** Internet Media **\r\n* [ ] Submitting a URL from an embed.ly provider will redirect to the edit form\r\n* [ ] Submitting a URL from an unknown provider will print an error message stating why it failed\r\n* [ ] Submitting an HTML block with valid remote domains will redirect to the edit form\r\n* [ ] Submitting an HTML block with invalid remote domains will print an error message stating why it failed\r\n\r\n** Edit Form **\r\n* [ ] User can edit the Label field, and see the file name change on the Library and in standard File Fields\r\n* [ ] If file is an Image, Alt and Title fields will be available.\r\n  * [ ] Values in Alt and Title fields will be presented when image is embedded anywhere.\r\n* [ ] User can edit the description field. \r\n* [ ] User can edit the Uploaded On field.\r\n* [ ] The 'Replace File?' button will change to a warning, a Replace button and a Cancel button when clicked.\r\n  * [ ] The Cancel button will remove the warning, Replace and Cancel button with the original 'Replace File?' button\r\n  * [ ] The Replace button will open the Operating System file browser, filtered by original file's extension.\r\n  * [ ] Selecting a file with the correct extension will upload it\r\n  * [ ] Selecting a file with an incorrect extension will present an error message.\r\n* [ ] The Taxonomy Widget should function exactly the same as the existing Taxonomy Widget on node forms. \r\n* [ ] The Cancel button should return the user to the Library and not make any changes.\r\n* [ ] The Save button should return the user to the Library and update the file in the Library if necessary.\r\n\r\n** Library **\r\n* [ ] Clicking a file will highlight it\r\n* [ ] Clicking the Edit button will open the Edit form for that file\r\n* [ ] Clicking the Delete button will open the Delete Confirmation form for that file\r\n* [ ] Entering text in the Filename text field should filter the files by Label or filename.\r\n  * [ ] The Clear Filters button should appear\r\n* [ ] Selecting a File Type from the select box should filter the files by file type\r\n  * [ ] The Clear filters button should appear\r\n* [ ] The Clear Filters button should remove all selections/text from the filename and file type filters\r\n* [ ] The page count should update as filters are changed\r\n* [ ] If the current page is higher than the total number of pagers after filters are applied, switch to the last page\r\n* [ ] Page up/down buttons should page up and down\r\n* [ ] Page up/down buttons should not function if on last/first page\r\n* [ ] Insert button should be unclickable if no selection has been made\r\n* [ ] Clicking Insert when possible should close the browser, and whatever action the caller does should execute.\r\n* [ ] Clicking Cancel should close the browser, and do nothing with caller.\r\n\r\n** Delete Form ** \r\n* [ ] User should see a message warning them about what they're about to do.\r\n* [ ] Clicking Delete should delete the file, remove it from the Library and return to the Library.\r\n* [ ] Clicking Cancel should return to the Library."}}