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
89f13e15
Commit
89f13e15
authored
Jun 18, 2015
by
dino-cikatic
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8548 from edx/dcikatic/SOL-994
SOL-994 fix js loading if search features disabled
parents
7c534001
af7521b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
9 deletions
+28
-9
lms/envs/common.py
+12
-3
lms/templates/courseware/courses.html
+4
-0
lms/templates/courseware/courseware.html
+9
-6
lms/templates/dashboard.html
+3
-0
No files found.
lms/envs/common.py
View file @
89f13e15
...
...
@@ -1202,10 +1202,11 @@ courseware_js = (
for
pth
in
[
'courseware'
,
'histogram'
,
'navigation'
,
'time'
]
]
+
[
'js/'
+
pth
+
'.js'
for
pth
in
[
'ajax-error'
]]
+
[
'js/search/course/main.js'
]
+
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/modules/**/*.js'
))
)
courseware_search_js
=
[
'js/search/course/main.js'
]
# Before a student accesses courseware, we do not
# need many of the JS dependencies. This includes
...
...
@@ -1235,9 +1236,9 @@ main_vendor_js = base_vendor_js + [
]
dashboard_js
=
(
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'js/dashboard/**/*.js'
))
+
[
'js/search/dashboard/main.js'
]
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'js/dashboard/**/*.js'
))
)
dashboard_search_js
=
[
'js/search/dashboard/main.js'
]
discussion_js
=
sorted
(
rooted_glob
(
COMMON_ROOT
/
'static'
,
'coffee/src/discussion/**/*.js'
))
rwd_header_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'js/utils/rwd_header.js'
))
staff_grading_js
=
sorted
(
rooted_glob
(
PROJECT_ROOT
/
'static'
,
'coffee/src/staff_grading/**/*.js'
))
...
...
@@ -1472,6 +1473,10 @@ PIPELINE_JS = {
'source_filenames'
:
courseware_js
,
'output_filename'
:
'js/lms-courseware.js'
,
},
'courseware_search'
:
{
'source_filenames'
:
courseware_search_js
,
'output_filename'
:
'js/lms-courseware-search.js'
,
},
'base_vendor'
:
{
'source_filenames'
:
base_vendor_js
,
'output_filename'
:
'js/lms-base-vendor.js'
,
...
...
@@ -1512,6 +1517,10 @@ PIPELINE_JS = {
'source_filenames'
:
dashboard_js
,
'output_filename'
:
'js/dashboard.js'
},
'dashboard_search'
:
{
'source_filenames'
:
dashboard_search_js
,
'output_filename'
:
'js/dashboard-search.js'
,
},
'rwd_header'
:
{
'source_filenames'
:
rwd_header_js
,
'output_filename'
:
'js/rwd_header.js'
...
...
lms/templates/courseware/courses.html
View file @
89f13e15
...
...
@@ -8,6 +8,7 @@
<
%
namespace
name=
'static'
file=
'../static_content.html'
/>
<
%
block
name=
"header_extras"
>
% if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'):
% for template_name in ["result_item", "filter_bar", "filter", "search_facets_list", "search_facets_section", "search_facet", "more_less_links"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
<%
static
:
include
path
=
"discovery/${template_name}.underscore"
/>
...
...
@@ -20,10 +21,13 @@
}});
}})(
define
||
RequireJS
.
define
);
</script>
% endif
</
%
block>
<
%
block
name=
"js_extra"
>
% if settings.FEATURES.get('ENABLE_COURSE_DISCOVERY'):
<
%
static:js
group=
'discovery'
/>
% endif
</
%
block>
<
%
block
name=
"pagetitle"
>
${_("Courses")}
</
%
block>
...
...
lms/templates/courseware/courseware.html
View file @
89f13e15
...
...
@@ -25,13 +25,13 @@ ${page_title_breadcrumbs(course_name())}
<%
static
:
include
path
=
"common/templates/${template_name}.underscore"
/>
</script>
% endfor
% for template_name in ["course_search_item", "course_search_results", "search_loading", "search_error"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
<%
static
:
include
path
=
"search/${template_name}.underscore"
/>
</script>
% if settings.FEATURES.get('ENABLE_COURSEWARE_SEARCH'):
% for template_name in ["course_search_item", "course_search_results", "search_loading", "search_error"]:
<script
type=
"text/template"
id=
"${template_name}-tpl"
>
<%
static
:
include
path
=
"search/${template_name}.underscore"
/>
</script>
% endfor
% endif
</
%
block>
<
%
block
name=
"headextra"
>
...
...
@@ -65,6 +65,9 @@ ${page_title_breadcrumbs(course_name())}
<
%
static:js
group=
'courseware'
/>
<
%
static:js
group=
'discussion'
/>
% if settings.FEATURES.get('ENABLE_COURSEWARE_SEARCH'):
<
%
static:js
group=
'courseware_search'
/>
% endif
<
%
include
file=
"../discussion/_js_body_dependencies.html"
/>
% if staff_access:
...
...
lms/templates/dashboard.html
View file @
89f13e15
...
...
@@ -44,6 +44,9 @@ from django.core.urlresolvers import reverse
});
});
</script>
% if settings.FEATURES.get('ENABLE_DASHBOARD_SEARCH'):
<
%
static:js
group=
'dashboard_search'
/>
% endif
</
%
block>
<div
class=
"dashboard-notifications"
tabindex=
"-1"
>
...
...
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