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
e723f6f9
Commit
e723f6f9
authored
Jul 18, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load js fragments in order, so that Subview is loaded before the classes that use it
parent
bdcec1a5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
cms/envs/common.py
+5
-4
common/lib/xmodule/xmodule/js/src/video/display/_subview.coffee
+0
-0
lms/envs/common.py
+5
-4
No files found.
cms/envs/common.py
View file @
e723f6f9
...
...
@@ -197,12 +197,13 @@ for descriptor in XModuleDescriptor.load_classes() + [RawDescriptor]:
module_js
=
descriptor
.
module_class
.
get_javascript
()
for
filetype
in
(
'coffee'
,
'js'
):
for
fragment
in
descriptor_js
.
get
(
filetype
,
[])
+
module_js
.
get
(
filetype
,
[]
):
fragments
.
add
((
filetype
,
fragment
))
for
idx
,
fragment
in
enumerate
(
descriptor_js
.
get
(
filetype
,
[])
+
module_js
.
get
(
filetype
,
[])
):
fragments
.
add
((
idx
,
filetype
,
fragment
))
module_js_sources
=
[]
for
filetype
,
fragment
in
fragments
:
path
=
os
.
path
.
join
(
js_file_dir
,
"{hash}.{type}"
.
format
(
for
idx
,
filetype
,
fragment
in
sorted
(
fragments
):
path
=
os
.
path
.
join
(
js_file_dir
,
"{idx}-{hash}.{type}"
.
format
(
idx
=
idx
,
hash
=
hashlib
.
md5
(
fragment
)
.
hexdigest
(),
type
=
filetype
))
with
open
(
path
,
'w'
)
as
js_file
:
...
...
lms/static/coffee/src
/_subview.coffee
→
common/lib/xmodule/xmodule/js/src/video/display
/_subview.coffee
View file @
e723f6f9
File moved
lms/envs/common.py
View file @
e723f6f9
...
...
@@ -346,12 +346,13 @@ fragments = set()
for
descriptor
in
XModuleDescriptor
.
load_classes
()
+
[
HiddenDescriptor
]:
module_js
=
descriptor
.
module_class
.
get_javascript
()
for
filetype
in
(
'coffee'
,
'js'
):
for
fragment
in
js
.
get
(
filetype
,
[]
):
fragments
.
add
((
filetype
,
fragment
))
for
idx
,
fragment
in
enumerate
(
module_js
.
get
(
filetype
,
[])
):
fragments
.
add
((
idx
,
filetype
,
fragment
))
module_js_sources
=
[]
for
filetype
,
fragment
in
fragments
:
path
=
os
.
path
.
join
(
js_file_dir
,
"{hash}.{type}"
.
format
(
for
idx
,
filetype
,
fragment
in
sorted
(
fragments
):
path
=
os
.
path
.
join
(
js_file_dir
,
"{idx}-{hash}.{type}"
.
format
(
idx
=
idx
,
hash
=
hashlib
.
md5
(
fragment
)
.
hexdigest
(),
type
=
filetype
))
with
open
(
path
,
'w'
)
as
js_file
:
...
...
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