Commit f4bede6c by Brian Jacobel

Fix library load paths (incl. jquery.scrollTo)

Simplify paths in karma_cms_squire require paths
parent e433aa4e
......@@ -38,7 +38,7 @@
"jquery.timepicker": "js/vendor/timepicker/jquery.timepicker",
"jquery.cookie": "js/vendor/jquery.cookie",
"jquery.qtip": "js/vendor/jquery.qtip.min",
"jquery.scrollTo": "js/vendor/jquery.scrollTo.min",
"jquery.scrollTo": "common/js/vendor/jquery.scrollTo",
"jquery.flot": "js/vendor/flot/jquery.flot.min",
"jquery.fileupload": "js/vendor/jQuery-File-Upload/js/jquery.fileupload",
"jquery.fileupload-process": "js/vendor/jQuery-File-Upload/js/jquery.fileupload-process",
......
......@@ -12,7 +12,7 @@ requirejs.config({
"jquery.leanModal": "xmodule_js/common_static/js/vendor/jquery.leanModal",
"jquery.ajaxQueue": "xmodule_js/common_static/js/vendor/jquery.ajaxQueue",
"jquery.smoothScroll": "xmodule_js/common_static/js/vendor/jquery.smooth-scroll.min",
"jquery.scrollTo": "xmodule_js/common_static/js/vendor/jquery.scrollTo.min",
"jquery.scrollTo": "common/js/vendor/jquery.scrollTo",
"jquery.timepicker": "xmodule_js/common_static/js/vendor/timepicker/jquery.timepicker",
"jquery.cookie": "xmodule_js/common_static/js/vendor/jquery.cookie",
"jquery.qtip": "xmodule_js/common_static/js/vendor/jquery.qtip.min",
......
......@@ -5,14 +5,14 @@ requirejs.config({
"gettext": "xmodule_js/common_static/js/test/i18n",
"mustache": "xmodule_js/common_static/js/vendor/mustache",
"codemirror": "xmodule_js/common_static/js/vendor/CodeMirror/codemirror",
"jquery": "xmodule_js/common_static/common/js/vendor/jquery",
"jquery-migrate": "xmodule_js/common_static/common/js/vendor/jquery-migrate",
"jquery": "common/js/vendor/jquery",
"jquery-migrate": "common/js/vendor/jquery-migrate",
"jquery.ui": "xmodule_js/common_static/js/vendor/jquery-ui.min",
"jquery.form": "xmodule_js/common_static/js/vendor/jquery.form",
"jquery.markitup": "xmodule_js/common_static/js/vendor/markitup/jquery.markitup",
"jquery.leanModal": "xmodule_js/common_static/js/vendor/jquery.leanModal",
"jquery.smoothScroll": "xmodule_js/common_static/js/vendor/jquery.smooth-scroll.min",
"jquery.scrollTo": "xmodule_js/common_static/js/vendor/jquery.scrollTo.min",
"jquery.scrollTo": "common/js/vendor/jquery.scrollTo",
"jquery.timepicker": "xmodule_js/common_static/js/vendor/timepicker/jquery.timepicker",
"jquery.cookie": "xmodule_js/common_static/js/vendor/jquery.cookie",
"jquery.qtip": "xmodule_js/common_static/js/vendor/jquery.qtip.min",
......
......@@ -90,16 +90,6 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce
uploadDialogTpl = readFixtures('upload-dialog.underscore');
beforeEach(function() {
window.course = new Course({
id: '5',
name: 'Course Name',
url_name: 'course_name',
org: 'course_org',
num: 'course_num',
revision: 'course_rev'
});
window.CMS.User = {isGlobalStaff: true};
TemplateHelpers.installTemplates(['certificate-editor', 'signatory-editor'], true);
window.course = new Course({
......@@ -137,11 +127,6 @@ function(_, Course, CertificateModel, SignatoryModel, CertificatesCollection, Ce
delete window.CMS.User;
});
afterEach(function() {
delete window.course;
delete window.CMS.User;
});
describe('Basic', function () {
beforeEach(function(){
appendSetFixtures(
......
......@@ -31,19 +31,6 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
var emptyMessage = 'You have not created any certificates yet.';
beforeEach(function() {
window.course = new Course({
id: '5',
name: 'Course Name',
url_name: 'course_name',
org: 'course_org',
num: 'course_num',
revision: 'course_rev'
});
window.certWebPreview = new CertificatePreview({
course_modes: ['honor', 'test'],
certificate_web_view_url: '/users/1/courses/orgX/009/2016'
});
TemplateHelpers.installTemplates(
['certificate-editor', 'list']
);
......@@ -83,10 +70,6 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
delete window.CMS.User;
});
afterEach(function() {
delete window.course;
});
describe('empty template', function () {
it('should be rendered if no certificates', function() {
expect(this.view.$(SELECTORS.noContent)).toExist();
......
......@@ -14,8 +14,8 @@ var options = {
libraryFiles: [],
libraryFilesToInclude: [
{pattern: 'xmodule_js/common_static/common/js/vendor/jquery.js', included: true},
{pattern: 'xmodule_js/common_static/common/js/vendor/jquery-migrate.js', included: true}
{pattern: 'common/js/vendor/jquery.js', included: true},
{pattern: 'common/js/vendor/jquery-migrate.js', included: true}
],
// Make sure the patterns in sourceFiles and specFiles do not match the same file.
......
......@@ -14,7 +14,7 @@
'jquery.leanModal': 'js/vendor/jquery.leanModal',
'jquery.ajaxQueue': 'js/vendor/jquery.ajaxQueue',
'jquery.smoothScroll': 'js/vendor/jquery.smooth-scroll.min',
'jquery.scrollTo': 'js/vendor/jquery.scrollTo.min',
'jquery.scrollTo': 'common/js/vendor/jquery.scrollTo',
'jquery.timepicker': 'js/vendor/timepicker/jquery.timepicker',
'jquery.cookie': 'js/vendor/jquery.cookie',
'jquery.qtip': 'js/vendor/jquery.qtip.min',
......
../../../../node_modules/jquery.scrollto/jquery.scrollTo.min.js
\ No newline at end of file
......@@ -19,7 +19,7 @@
'jquery.ajaxQueue': 'xmodule_js/common_static/js/vendor/jquery.ajaxQueue',
'jquery.ajax-retry': 'js/vendor/jquery.ajax-retry',
'jquery.smoothScroll': 'xmodule_js/common_static/js/vendor/jquery.smooth-scroll.min',
'jquery.scrollTo': 'xmodule_js/common_static/js/vendor/jquery.scrollTo.min',
'jquery.scrollTo': 'common/js/vendor/jquery.scrollTo',
'jquery.timepicker': 'xmodule_js/common_static/js/vendor/timepicker/jquery.timepicker',
'jquery.cookie': 'xmodule_js/common_static/js/vendor/jquery.cookie',
'jquery.qtip': 'xmodule_js/common_static/js/vendor/jquery.qtip.min',
......@@ -93,7 +93,7 @@
// Discussion classes loaded explicitly until they are converted to use RequireJS
'DiscussionModuleView': 'xmodule_js/common_static/coffee/src/discussion/discussion_module_view',
'js/bookmarks/collections/bookmarks': 'js/bookmarks/collections/bookmarks',
'js/bookmarks/models/bookmark': 'js/bookmarks/models/bookmark',
'js/bookmarks/views/bookmarks_list_button': 'js/bookmarks/views/bookmarks_list_button',
......
......@@ -71,6 +71,7 @@
// libraries.
"jquery": "common/js/vendor/jquery",
"jquery-migrate": "common/js/vendor/jquery-migrate",
"jquery.scrollTo": "common/js/vendor/jquery.scrollTo",
"jquery.cookie": "js/vendor/jquery.cookie",
'jquery.timeago': 'js/vendor/jquery.timeago',
"jquery.url": "js/vendor/url.min",
......
......@@ -45,7 +45,7 @@ ${static.get_page_title_breadcrumbs(course_name())}
</%block>
<%block name="js_extra">
<script type="text/javascript" src="${static.url('js/vendor/jquery.scrollTo.min.js')}"></script>
<script type="text/javascript" src="${static.url('common/js/vendor/jquery.scrollTo.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js')}"></script>
## codemirror
......
......@@ -65,7 +65,7 @@ ${static.get_page_title_breadcrumbs(course_name())}
</%block>
<%block name="js_extra">
<script type="text/javascript" src="${static.url('js/vendor/jquery.scrollTo.min.js')}"></script>
<script type="text/javascript" src="${static.url('common/js/vendor/jquery.scrollTo.js')}"></script>
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js')}"></script>
## codemirror
......
......@@ -47,6 +47,7 @@ SASS_LOAD_PATHS = [
NPM_INSTALLED_LIBRARIES = [
'jquery/dist/jquery.js',
'jquery-migrate/dist/jquery-migrate.js',
'jquery.scrollto/jquery.scrollTo.js',
'underscore/underscore.js',
'underscore.string/dist/underscore.string.js',
'picturefill/dist/picturefill.js',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment