From 7d1d135c1638d752ad5a79db2a1fa4a2ba9ed32e Mon Sep 17 00:00:00 2001 From: Victor Shnayder Date: Tue, 13 Nov 2012 18:46:38 -0500 Subject: [PATCH] Wire in some initial js. --- lms/envs/common.py | 15 +++++++++++++-- .../coffee/src/staff_grading/staff_grading.coffee | 5 +++++ lms/templates/instructor/staff_grading.html | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 lms/static/coffee/src/staff_grading/staff_grading.coffee diff --git a/lms/envs/common.py b/lms/envs/common.py index dd9013bcb3..008de7ac84 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -406,6 +406,9 @@ main_vendor_js = [ discussion_js = sorted(glob2.glob(PROJECT_ROOT / 'static/coffee/src/discussion/**/*.coffee')) +staff_grading_js = sorted(glob2.glob(PROJECT_ROOT / 'static/coffee/src/staff_grading/**/*.coffee')) + + # Load javascript from all of the available xmodules, and # prep it for use in pipeline js from xmodule.x_module import XModuleDescriptor @@ -468,7 +471,8 @@ with open(module_styles_path, 'w') as module_styles: PIPELINE_JS = { 'application': { - # Application will contain all paths not in courseware_only_js + # Application will contain all paths not in courseware_only_js or + # discussion_js or staff_grading_js 'source_filenames': [ pth.replace(COMMON_ROOT / 'static/', '') for pth @@ -476,7 +480,9 @@ PIPELINE_JS = { ] + [ pth.replace(PROJECT_ROOT / 'static/', '') for pth in sorted(glob2.glob(PROJECT_ROOT / 'static/coffee/src/**/*.coffee'))\ - if pth not in courseware_only_js and pth not in discussion_js + if (pth not in courseware_only_js and + pth not in discussion_js and + pth not in staff_grading_js) ] + [ 'js/form.ext.js', 'js/my_courses_dropdown.js', @@ -505,7 +511,12 @@ PIPELINE_JS = { 'discussion' : { 'source_filenames': [pth.replace(PROJECT_ROOT / 'static/', '') for pth in discussion_js], 'output_filename': 'js/discussion.js' + }, + 'staff_grading' : { + 'source_filenames': [pth.replace(PROJECT_ROOT / 'static/', '') for pth in staff_grading_js], + 'output_filename': 'js/staff_grading.js' } + } PIPELINE_DISABLE_WRAPPER = True diff --git a/lms/static/coffee/src/staff_grading/staff_grading.coffee b/lms/static/coffee/src/staff_grading/staff_grading.coffee new file mode 100644 index 0000000000..06c84a3867 --- /dev/null +++ b/lms/static/coffee/src/staff_grading/staff_grading.coffee @@ -0,0 +1,5 @@ +class @StaffGrading + constructor: -> + alert('hi!') + + \ No newline at end of file diff --git a/lms/templates/instructor/staff_grading.html b/lms/templates/instructor/staff_grading.html index b00fd935aa..d9d183c161 100644 --- a/lms/templates/instructor/staff_grading.html +++ b/lms/templates/instructor/staff_grading.html @@ -11,6 +11,7 @@ <%include file="/courseware/course_navigation.html" args="active_page='staff_grading'" /> <%block name="js_extra"> + <%static:js group='staff_grading'/>