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
67a18ec5
Commit
67a18ec5
authored
Jul 23, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #257 from MITx/bridger/js_slim
Javascript slim
parents
9d81a8be
9ebac1bd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
29 deletions
+50
-29
lms/envs/common.py
+9
-1
lms/templates/courseware.html
+37
-6
lms/templates/main.html
+0
-22
lms/templates/simplewiki/simplewiki_base.html
+4
-0
No files found.
lms/envs/common.py
View file @
67a18ec5
...
...
@@ -301,11 +301,19 @@ PIPELINE_CSS = {
PIPELINE_ALWAYS_RECOMPILE
=
[
'sass/application.scss'
,
'sass/ie.scss'
]
courseware_only_js
=
[
PROJECT_ROOT
/
'static/coffee/src/'
+
pth
+
'.coffee'
for
pth
in
[
'courseware'
,
'histogram'
,
'navigation'
,
'time'
,
]
]
courseware_only_js
+=
[
pth
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/src/modules/**/*.coffee'
)
]
PIPELINE_JS
=
{
'application'
:
{
'source_filenames'
:
[
pth
.
replace
(
PROJECT_ROOT
/
'static/'
,
''
)
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/src/**/*.coffee'
)],
# Application will contain all paths not in courseware_only_js
'source_filenames'
:
[
pth
.
replace
(
PROJECT_ROOT
/
'static/'
,
''
)
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/src/**/*.coffee'
)
if
pth
not
in
courseware_only_js
],
'output_filename'
:
'js/application.js'
},
'courseware'
:
{
'source_filenames'
:
[
pth
.
replace
(
PROJECT_ROOT
/
'static/'
,
''
)
for
pth
in
courseware_only_js
],
'output_filename'
:
'js/courseware.js'
},
'spec'
:
{
'source_filenames'
:
[
pth
.
replace
(
PROJECT_ROOT
/
'static/'
,
''
)
for
pth
in
glob2
.
glob
(
PROJECT_ROOT
/
'static/coffee/spec/**/*.coffee'
)],
'output_filename'
:
'js/spec.js'
...
...
lms/templates/courseware.html
View file @
67a18ec5
...
...
@@ -4,15 +4,46 @@
<
%
block
name=
"title"
><title>
Courseware – MITx 6.002x
</title></
%
block>
<
%
block
name=
"headextra"
>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/flot/jquery.flot.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/flot/jquery.flot.js')}"
></script>
<link
rel=
"stylesheet"
href=
"${static.url('css/vendor/jquery.treeview.css')}"
type=
"text/css"
media=
"all"
/>
## codemirror
<link
rel=
"stylesheet"
href=
"/static/css/codemirror.css"
type=
"text/css"
media=
"all"
/>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/codemirror-compressed.js')}"
></script>
## alternate codemirror
##
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/CodeMirror-2.25/lib/codemirror.js')}"
></script>
##
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/CodeMirror-2.25/mode/xml/xml.js')}"
></script>
##
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/CodeMirror-2.25/mode/python/python.js')}"
></script>
## image input: for clicking on images (see imageinput.html)
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/imageinput.js')}"
></script>
## TODO (cpennington): Remove this when we have a good way for modules to specify js to load on the page
## and in the wiki
<script
type=
"text/javascript"
src=
"${static.url('js/schematic.js')}"
></script>
% if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
<
%
static:js
group=
'courseware'
/>
% endif
% if not settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
% for jsfn in [ '/static/%s' % x.replace('.coffee','.js') for x in settings.PIPELINE_JS['courseware']['source_filenames'] ]:
<script
type=
"text/javascript"
src=
"${jsfn}"
></script>
% endfor
% endif
<
%
include
file=
"mathjax_include.html"
/>
</
%
block>
<
%
block
name=
"js_extra"
>
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
<script
type=
"text/javascript"
>
document
.
write
(
'
\
x3Cscript type="text/javascript" src="'
+
document
.
location
.
protocol
+
'//www.youtube.com/player_api">
\
x3C/script>'
);
</script>
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
<script
type=
"text/javascript"
>
document
.
write
(
'
\
x3Cscript type="text/javascript" src="'
+
document
.
location
.
protocol
+
'//www.youtube.com/player_api">
\
x3C/script>'
);
</script>
</
%
block>
<
%
include
file=
"course_navigation.html"
args=
"active_page='courseware'"
/>
...
...
lms/templates/main.html
View file @
67a18ec5
...
...
@@ -7,7 +7,6 @@
<link
rel=
"icon"
type=
"image/image/x-icon"
href=
"${static.url('images/favicon.ico')}"
/>
<link
href=
'http://fonts.googleapis.com/css?family=Open+Sans:800italic,400,800'
rel=
'stylesheet'
type=
'text/css'
>
<link
rel=
"stylesheet"
href=
"${static.url('css/vendor/jquery.treeview.css')}"
type=
"text/css"
media=
"all"
/>
% if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
<
%
static:css
group=
'application'
/>
...
...
@@ -30,10 +29,6 @@
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/jquery.qtip.min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/form.ext.js')}"
></script>
## TODO (cpennington): Remove this when we have a good way for modules to specify js to load on the page
## and in the wiki
<script
type=
"text/javascript"
src=
"${static.url('js/schematic.js')}"
></script>
% if settings.MITX_FEATURES['USE_DJANGO_PIPELINE']:
<
%
static:js
group=
'application'
/>
% endif
...
...
@@ -44,29 +39,12 @@
% endfor
% endif
## codemirror
<link
rel=
"stylesheet"
href=
"/static/css/codemirror.css"
type=
"text/css"
media=
"all"
/>
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/codemirror-compressed.js')}"
></script>
## alternate codemirror
##
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/CodeMirror-2.25/lib/codemirror.js')}"
></script>
##
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/CodeMirror-2.25/mode/xml/xml.js')}"
></script>
##
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/CodeMirror-2.25/mode/python/python.js')}"
></script>
## image input: for clicking on images (see imageinput.html)
<script
type=
"text/javascript"
src=
"${static.url('js/vendor/imageinput.js')}"
></script>
##
<script
type=
"text/javascript"
>
##
var
codemirror_set
=
{};
// track all codemirror textareas, so they can be refreshed on page changes
##
</script>
<!--[if lt IE 9]>
<script src="${static.url('js/html5shiv.js')}"></script>
<![endif]-->
<
%
block
name=
"headextra"
/>
<
%
include
file=
"mathjax_include.html"
/>
<meta
name=
"path_prefix"
content=
"${MITX_ROOT_URL}"
>
</head>
...
...
lms/templates/simplewiki/simplewiki_base.html
View file @
67a18ec5
...
...
@@ -11,6 +11,10 @@
<
%
block
name=
"headextra"
>
<script
type=
"text/javascript"
src=
"${static.url('js/simplewiki-AutoSuggest_c_2.0.js')}"
></script>
## TODO (cpennington): Remove this when we have a good way for modules to specify js to load on the page
## and in the wiki
<script
type=
"text/javascript"
src=
"${static.url('js/schematic.js')}"
></script>
<script
type=
"text/javascript"
>
function
set_related_article_id
(
s
)
{
document
.
getElementById
(
'wiki_related_input_id'
).
value
=
s
.
id
;
...
...
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