Commit Graph

29 Commits

Author SHA1 Message Date
adeelehsan
c127706ee7 Fixed XSS issues in xblock.js.
PROD-1660
PROD-1662
2020-06-25 14:09:20 +05:00
Calen Pennington
db2078ed2f fixup! Load all webpack chunks into fragments as correctly-typed resources 2018-09-12 14:27:54 -04:00
Calen Pennington
07a15c681f Reapply the XBlock RequireJS -> Webpack changes
This reverts commit 105db2cf59, reversing
changes made to 447457594f.
2018-06-27 22:27:07 -04:00
Eric Fischer
e72549cdbe Revert "Merge pull request #18340 from cpennington/fix-studio-xblock-rendering"
This reverts commit 9a70ca78a5, reversing
changes made to efd5b9abbd.

Hopefully fixes EDUCATOR-3053
2018-06-15 13:18:27 -04:00
Calen Pennington
5a5b73dcfa Load xblock resources into studio *before* the corresponding xblock html 2018-06-13 10:00:11 -04:00
Calen Pennington
be3c7e05c5 Reapply "Switch container factory to webpack"
This reverts commit 18d93b00ba.
2018-06-07 15:52:05 -04:00
Calen Pennington
18d93b00ba Revert "Switch container factory to webpack" 2018-06-07 13:46:47 -04:00
Calen Pennington
0abe75a7c6 Re-apply the changes to convert XBlocks to Webpack
Reapplies edx/edx-platform#17509

This reverts commit 0f7e2373d0.
2018-06-06 12:52:12 -04:00
Calen Pennington
0f7e2373d0 Revert "Switch container factory to webpack" 2018-05-29 16:01:38 -04:00
Calen Pennington
667dbf1687 Clean up eslint failures 2018-05-29 12:28:19 -04:00
Calen Pennington
12a082cf83 Convert xblock_validation.js to webpack 2018-05-29 12:19:05 -04:00
Calen Pennington
8a2201da93 Include the error message when an XBlock fails to load javascript 2018-05-29 12:19:05 -04:00
Eric Fischer
5bc6b31e29 eslint --fix 2017-12-08 14:38:41 -05:00
Brian Jacobel
d43e915dab Run eslint autofixer on /cms 2016-08-08 15:04:06 -04:00
Brian Jacobel
a32fd27d60 Replace JSHint ignore directives with ESLint ones 2016-08-04 16:22:59 -04:00
Dmitry Viskov
209ddc700d Difficulty selectbox in Studio (based on new XBlockAside functionality). Include:
- adaptation asides to be imported from the XML
- updating SplitMongo to handle XBlockAsides (CRUD operations)
- updating Studio to handle XBlockAsides handler calls
- updating xblock/core.js to properly init XBlockAsides JavaScript
2016-03-02 03:37:13 +03:00
Braden MacDonald
cfa7cd3d87 Revert "Pass DOM element, not jQuery object to XBlock initialisation." 2016-02-26 09:06:13 -08:00
Sven Marnach
982c3e623b Pass DOM element, not jQuery object to XBlock initialisation.
The function initializeXBlock() expects a DOM element, and is passed one in most
cases.  However, when adding a new XBlock component in Studio, the function is
passed a jQuery object, which ends up being forwarded to the actual
initialisation function of the XBlock.
2016-02-10 18:54:30 +01:00
Andy Armstrong
cc24ca55e6 Support local debugging of XBlock JavaScript
It turns out that loading JavaScript with $.getScript
causes Chrome to treat the file as an XHR request
and not JS. I've switched over to using RequireJS
to load the URL which already has the ability to
dynamically load files and have the browser
recognize them.
2015-12-11 15:50:38 -05:00
cahrens
08ce09bde7 Display validation messages for any xblock on the container page.
TNL-683
2014-11-06 15:48:55 -05:00
Andy Armstrong
d451c3e91d Fix Studio to gracefully handle xblock JavaScript errors
TNL-46

I've changed Studio to catch JavaScript errors when rendering xblocks, log the error, but to then continue as normal. This means that the user is still able to interact with the xblock to delete, duplicate etc. This seems reasonable as the xblock is only rendered as a WYSIWYG representation so if it isn't fully interactive that shouldn't be a big problem.
2014-08-21 17:31:19 -04:00
Andy Armstrong
f061bbc08b Backbone version of the course outline page
STUD-1726
2014-08-07 12:16:20 -04:00
zubair-arbi
dbd9e56c6c prevent caching of GET requests for xblock student view
STUD-1691
2014-06-04 16:14:13 +05:00
Andy Armstrong
541d20ef83 Allow creation of components on container page
This commit implements STUD-1490, allowing creation of components
on the container page. It also enables the delete and duplicate
buttons now that new content can be created that would benefit.

Note that it also creates shared functionality for adding components,
and refactors the unit page to use it too.
2014-05-21 15:40:31 -04:00
Alan Boudreault
901920b0cd no need for $.when() here.. 2014-04-25 11:51:08 -04:00
Alan Boudreault
4d1d1a75ce Wait that all resources are loaded and fragments rendered before initializing the xblock 2014-04-24 15:54:23 -04:00
Andy Armstrong
7770d9d427 Implement editing from the Studio container page.
STUD-1306
2014-04-09 10:32:11 -04:00
Andy Armstrong
a37d2c1b93 Fix Studio's XBlock dependency loading issues
STUD-1465

Changed the XBlock rendering logic to use promises to track asynchronous tasks.
Each dependency is then only loaded once the previous one has completed, and the
XBlock initialization only happens once all dependencies are loaded. This gives
XBlocks the same semantics in Studio as they get when shown directly on a page.
2014-03-25 16:36:06 -04:00
Andy Armstrong
fcc0231d4d Add new container page that can display nested xblocks
This is the changes for STUD-1244, which introduces the ability for Studio to display
arbitrarily nested xblocks. In this change, a new container page is introduced which can
display nested xblocks. In particular, the xblock type of 'vertical' is special cased
to be shown inline as a collapsible section. The unit page is mostly unchanged, except
that container xblock's are shown as a link to their container page, rather than being
shown inline.
2014-02-27 14:53:05 -05:00