Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
b0689a4e
Commit
b0689a4e
authored
Oct 17, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1375 from edx/db/requirejs-load-tender
Fix up Tender load order
parents
a6ad531d
76e6f8bc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
17 deletions
+23
-17
cms/static/coffee/spec/main.coffee
+4
-2
cms/static/coffee/spec/main_squire.coffee
+8
-4
cms/static/coffee/src/main.coffee
+2
-1
cms/templates/base.html
+1
-0
cms/templates/widgets/tender.html
+8
-10
No files found.
cms/static/coffee/spec/main.coffee
View file @
b0689a4e
...
...
@@ -22,10 +22,8 @@ requirejs.config({
"underscore.string"
:
"xmodule_js/common_static/js/vendor/underscore.string.min"
,
"backbone"
:
"xmodule_js/common_static/js/vendor/backbone-min"
,
"backbone.associations"
:
"xmodule_js/common_static/js/vendor/backbone-associations-min"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"tinymce"
:
"xmodule_js/common_static/js/vendor/tiny_mce/tiny_mce"
,
"jquery.tinymce"
:
"xmodule_js/common_static/js/vendor/tiny_mce/jquery.tinymce"
,
"mathjax"
:
"https://edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"
,
"xmodule"
:
"xmodule_js/src/xmodule"
,
"utility"
:
"xmodule_js/common_static/js/src/utility"
,
"sinon"
:
"xmodule_js/common_static/js/vendor/sinon-1.7.1"
,
...
...
@@ -35,6 +33,10 @@ requirejs.config({
"draggabilly"
:
"xmodule_js/common_static/js/vendor/draggabilly.pkgd"
,
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"mathjax"
:
"//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"tender"
:
"//edxedge.tenderapp.com/tender_widget"
"coffee/src/ajax_prefix"
:
"xmodule_js/common_static/coffee/src/ajax_prefix"
}
shim
:
{
...
...
cms/static/coffee/spec/main_squire.coffee
View file @
b0689a4e
requirejs
.
config
({
paths
:
{
paths
:
{
"gettext"
:
"xmodule_js/common_static/js/test/i18n"
,
"mustache"
:
"xmodule_js/common_static/js/vendor/mustache"
,
"codemirror"
:
"xmodule_js/common_static/js/vendor/CodeMirror/codemirror"
,
...
...
@@ -22,19 +22,23 @@ requirejs.config({
"underscore.string"
:
"xmodule_js/common_static/js/vendor/underscore.string.min"
,
"backbone"
:
"xmodule_js/common_static/js/vendor/backbone-min"
,
"backbone.associations"
:
"xmodule_js/common_static/js/vendor/backbone-associations-min"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"tinymce"
:
"xmodule_js/common_static/js/vendor/tiny_mce/tiny_mce"
,
"jquery.tinymce"
:
"xmodule_js/common_static/js/vendor/tiny_mce/jquery.tinymce"
,
"mathjax"
:
"https://edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"
,
"xmodule"
:
"xmodule_js/src/xmodule"
,
"utility"
:
"xmodule_js/common_static/js/src/utility"
,
"sinon"
:
"xmodule_js/common_static/js/vendor/sinon-1.7.1"
,
"squire"
:
"xmodule_js/common_static/js/vendor/Squire"
,
"jasmine-stealth"
:
"xmodule_js/common_static/js/vendor/jasmine-stealth"
,
"jasmine.async"
:
"xmodule_js/common_static/js/vendor/jasmine.async"
,
"draggabilly"
:
"xmodule_js/common_static/js/vendor/draggabilly.pkgd"
,
"domReady"
:
"xmodule_js/common_static/js/vendor/domReady"
,
"mathjax"
:
"//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"
,
"youtube"
:
"//www.youtube.com/player_api?noext"
,
"tender"
:
"//edxedge.tenderapp.com/tender_widget.js"
"coffee/src/ajax_prefix"
:
"xmodule_js/common_static/coffee/src/ajax_prefix"
}
,
}
shim
:
{
"gettext"
:
{
exports
:
"gettext"
...
...
cms/static/coffee/src/main.coffee
View file @
b0689a4e
define
[
"domReady"
,
"jquery"
,
"underscore.string"
,
"backbone"
,
"gettext"
,
"js/views/feedback_notification"
,
"jquery.cookie"
],
"js/views/feedback_notification"
,
"coffee/src/ajax_prefix"
,
"jquery.cookie"
],
(
domReady
,
$
,
str
,
Backbone
,
gettext
,
NotificationView
)
->
AjaxPrefix
.
addAjaxPrefix
jQuery
,
->
$
(
"meta[name='path_prefix']"
).
attr
(
'content'
)
...
...
cms/templates/base.html
View file @
b0689a4e
...
...
@@ -68,6 +68,7 @@ var require = {
"draggabilly"
:
"js/vendor/draggabilly.pkgd"
,
// externally hosted files
"tender"
:
"//edxedge.tenderapp.com/tender_widget"
,
"mathjax"
:
"//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"
,
// youtube URL does not end in ".js". We add "?noext" to the path so
// that require.js adds the ".js" to the query component of the URL,
...
...
cms/templates/widgets/tender.html
View file @
b0689a4e
% if user.is_authenticated():
<script
type=
"text/javascript"
>
require
([
'jquery'
],
function
(
$
)
{
window
.
Tender
=
{
hideToggle
:
true
,
title
:
''
,
body
:
''
,
hide_kb
:
'true'
,
widgetToggles
:
$
(
'.show-tender'
)
}
});
window
.
Tender
=
{
hideToggle
:
true
,
title
:
''
,
body
:
''
,
hide_kb
:
'true'
,
widgetToggles
:
document
.
getElementsByClassName
(
'show-tender'
)
}
require
([
'tender'
]);
</script>
<script
src=
"https://edxedge.tenderapp.com/tender_widget.js"
type=
"text/javascript"
></script>
% endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment