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
3e9c09e0
Commit
3e9c09e0
authored
Oct 10, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that jQuery loads before any other JS dependency
parent
cf66d0a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
cms/static/js/base.js
+3
-3
cms/templates/base.html
+8
-3
No files found.
cms/static/js/base.js
View file @
3e9c09e0
require
([
"jquery"
,
"underscore"
,
"gettext"
,
"js/views/feedback_notification"
,
"js/views/feedback_prompt"
,
require
([
"
domReady"
,
"
jquery"
,
"underscore"
,
"gettext"
,
"js/views/feedback_notification"
,
"js/views/feedback_prompt"
,
"jquery.ui"
,
"jquery.timepicker"
,
"jquery.leanModal"
,
"jquery.form"
,
"jquery.smoothScroll"
],
function
(
$
,
_
,
gettext
,
NotificationView
,
PromptView
)
{
function
(
domReady
,
$
,
_
,
gettext
,
NotificationView
,
PromptView
)
{
var
$body
;
var
$modal
;
...
...
@@ -12,7 +12,7 @@ var $newComponentTypePicker;
var
$newComponentTemplatePickers
;
var
$newComponentButton
;
$
(
document
).
r
eady
(
function
()
{
domR
eady
(
function
()
{
$body
=
$
(
'body'
);
$modal
=
$
(
'.history-modal'
);
$modalCover
=
$
(
'.modal-cover'
);
...
...
cms/templates/base.html
View file @
3e9c09e0
...
...
@@ -159,9 +159,14 @@ var require = {
deps
:
[
"coffee/src/ajax_prefix"
]
}
},
// load these automatically
deps
:
[
"jquery"
,
"js/base"
,
"coffee/src/main"
,
"coffee/src/logger"
,
"datepair"
]
// we need "datepair" because it dynamically modifies the page when it is loaded -- yuck!
// load jquery automatically
deps
:
[
"jquery"
],
callback
:
function
()
{
// load other scripts on every page, after jquery loads
require
([
"js/base"
,
"coffee/src/main"
,
"coffee/src/logger"
,
"datepair"
]);
// we need "datepair" because it dynamically modifies the page
// when it is loaded -- yuck!
}
};
</script>
<script
type=
"text/javascript"
src=
"${static.url("
js
/
vendor
/
require
.
js
")}"
></script>
...
...
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