edx/edx-platform — pull request #4823 by lduarte1991 (2014-08-13 21:41:00+00:00)
Title: Annotation Tools: Adding Annotator to CMS

**Background:** The newest update to Studio exposed a bug and made it a codebreaker. The bug consisted of Annotator not being loaded into the CMS. This PR adds the appropriate items to requirejs to be loaded in the CMS.

**Studio Update:** I added the appropriate CSS files to the pipeline. I added the files to requirejs in base.html. I made sure that tinymce is loaded via the STATIC_URL variable since it's different between CMS and LMS. Finally I added an if condition. If Annotator is not already loaded (i.e. undefined), it means that it is being called upon by Studio in which case it will run the require on the appropriate configuration script (i.e. ova.js or osda.js) and load all the dependencies. Unless I misunderstood how requirejs works, this should stop it from being loaded on every page, but rather only on the pages that load "ova" and "osda."

**LMS Update:** None.

**Testing:** Here's the [tarball](https://www.dropbox.com/s/r684ber7z4ddqtc/2014_T4.DPRfFs.tar.gz). Now in Studio if you go into any of the units you should be able to see the component instead of just "Loading..." and Annotator should exist which means you should be able to view the video, read the text, and view the image from Studio now.