Upgrade jQuery 1.7.2 to 2.2.0
FEDX-25
This commit is contained in:
committed by
Brian Jacobel
parent
025f74c870
commit
15f148141f
@@ -27,7 +27,12 @@
|
||||
"mustache": "js/vendor/mustache",
|
||||
"codemirror": "js/vendor/codemirror-compressed",
|
||||
"codemirror/stex": "js/vendor/CodeMirror/stex",
|
||||
"jquery": "js/vendor/jquery.min",
|
||||
// The jquery-migrate library was added in upgrading from
|
||||
// jQuery 1.7.x to 2.2.x. This config allows developers
|
||||
// to depend on "jquery" which opaquely requires both
|
||||
// libraries.
|
||||
"_jquery": "js/vendor/jquery.min",
|
||||
"jquery": "js/vendor/jquery-migrate.min",
|
||||
"jquery.ui": "js/vendor/jquery-ui.min",
|
||||
"jquery.form": "js/vendor/jquery.form",
|
||||
"jquery.markitup": "js/vendor/markitup/jquery.markitup",
|
||||
@@ -37,7 +42,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-1.4.2-min",
|
||||
"jquery.scrollTo": "js/vendor/jquery.scrollTo.min",
|
||||
"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",
|
||||
@@ -112,6 +117,10 @@
|
||||
"date": {
|
||||
exports: "Date"
|
||||
},
|
||||
"jquery": {
|
||||
deps: ["_jquery"],
|
||||
exports: "jQuery"
|
||||
},
|
||||
"jquery.ui": {
|
||||
deps: ["jquery"],
|
||||
exports: "jQuery.ui"
|
||||
@@ -146,7 +155,7 @@
|
||||
},
|
||||
"jquery.scrollTo": {
|
||||
deps: ["jquery"],
|
||||
exports: "jQuery.fn.scrollTo",
|
||||
exports: "jQuery.fn.scrollTo"
|
||||
},
|
||||
"jquery.flot": {
|
||||
deps: ["jquery"],
|
||||
|
||||
@@ -4,14 +4,18 @@ 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/js/vendor/jquery.min",
|
||||
# The jquery-migrate library was added in upgrading from
|
||||
# jQuery 1.7.x to 2.2.x. This config allows developers to
|
||||
# depend on "jquery" which opaquely requires both libraries.
|
||||
"_jquery": "xmodule_js/common_static/js/vendor/jquery.min",
|
||||
"jquery": "xmodule_js/common_static/js/vendor/jquery-migrate.min",
|
||||
"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.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-1.4.2-min",
|
||||
"jquery.scrollTo": "xmodule_js/common_static/js/vendor/jquery.scrollTo.min",
|
||||
"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",
|
||||
@@ -65,6 +69,10 @@ requirejs.config({
|
||||
"date": {
|
||||
exports: "Date"
|
||||
},
|
||||
"jquery": {
|
||||
deps: ["_jquery"],
|
||||
exports: "jQuery"
|
||||
},
|
||||
"jquery.ui": {
|
||||
deps: ["jquery"],
|
||||
exports: "jQuery.ui"
|
||||
|
||||
@@ -11,7 +11,7 @@ requirejs.config({
|
||||
"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-1.4.2-min",
|
||||
"jquery.scrollTo": "xmodule_js/common_static/js/vendor/jquery.scrollTo.min",
|
||||
"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",
|
||||
|
||||
@@ -58,6 +58,20 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
|
||||
};
|
||||
|
||||
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'
|
||||
});
|
||||
window.CMS.User = {isGlobalStaff: true};
|
||||
|
||||
TemplateHelpers.installTemplates(['certificate-details', 'signatory-details', 'signatory-editor', 'signatory-actions'], true);
|
||||
|
||||
window.course = new Course({
|
||||
@@ -99,6 +113,12 @@ function(_, Course, CertificatesCollection, CertificateModel, CertificateDetails
|
||||
delete window.CMS.User;
|
||||
});
|
||||
|
||||
afterEach(function() {
|
||||
delete window.course;
|
||||
delete window.CMS.User;
|
||||
});
|
||||
|
||||
|
||||
describe('The Certificate Details view', function() {
|
||||
|
||||
it('should parse a JSON string collection into a Backbone model collection', function () {
|
||||
|
||||
@@ -90,6 +90,16 @@ 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({
|
||||
@@ -127,6 +137,11 @@ 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(
|
||||
|
||||
@@ -28,8 +28,6 @@ function(_, $, Course, CertificatePreview, TemplateHelpers, ViewHelpers, AjaxHel
|
||||
};
|
||||
|
||||
beforeEach(function() {
|
||||
appendSetFixtures('<div class="preview-certificate nav-actions"></div>');
|
||||
|
||||
window.course = new Course({
|
||||
id: '5',
|
||||
name: 'Course Name',
|
||||
@@ -40,6 +38,8 @@ function(_, $, Course, CertificatePreview, TemplateHelpers, ViewHelpers, AjaxHel
|
||||
});
|
||||
window.CMS.User = {isGlobalStaff: true};
|
||||
|
||||
TemplateHelpers.installTemplate('certificate-web-preview', true);
|
||||
appendSetFixtures('<div class="preview-certificate nav-actions"></div>');
|
||||
this.view = new CertificatePreview({
|
||||
el: $('.preview-certificate'),
|
||||
course_modes: ['test1', 'test2', 'test3'],
|
||||
|
||||
@@ -31,6 +31,19 @@ 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']
|
||||
);
|
||||
@@ -70,6 +83,10 @@ 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();
|
||||
|
||||
@@ -5,7 +5,7 @@ define([
|
||||
function ($, AjaxHelpers, ViewHelpers, ManageUsersFactory, ViewUtils) {
|
||||
"use strict";
|
||||
describe("Library Instructor Access Page", function () {
|
||||
const changeRoleUrl = "dummy_change_role_url/@@EMAIL@@";
|
||||
var changeRoleUrl = "dummy_change_role_url/@@EMAIL@@";
|
||||
var team_member_fixture = readFixtures("team-member.underscore");
|
||||
|
||||
function setRole(email, role){
|
||||
@@ -48,7 +48,7 @@ function ($, AjaxHelpers, ViewHelpers, ManageUsersFactory, ViewUtils) {
|
||||
});
|
||||
|
||||
it("can give a user permission to use the library", function () {
|
||||
const email = 'other@example.com';
|
||||
var email = 'other@example.com';
|
||||
var requests = AjaxHelpers.requests(this);
|
||||
var reloadSpy = spyOn(ViewUtils, 'reload');
|
||||
$('.create-user-button').click();
|
||||
@@ -61,7 +61,7 @@ function ($, AjaxHelpers, ViewHelpers, ManageUsersFactory, ViewUtils) {
|
||||
});
|
||||
|
||||
it("can promote user", function() {
|
||||
const email = "staff@example.com";
|
||||
var email = "staff@example.com";
|
||||
var requests = AjaxHelpers.requests(this);
|
||||
var reloadSpy = spyOn(ViewUtils, 'reload');
|
||||
setRole("staff@example.com", 'staff');
|
||||
|
||||
@@ -215,7 +215,6 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
AbstractEditor = BaseView.extend({
|
||||
tagName: 'section',
|
||||
templateName: null,
|
||||
@@ -328,6 +327,7 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
TimedExaminationPreferenceEditor = AbstractEditor.extend({
|
||||
templateName: 'timed-examination-preference-editor',
|
||||
className: 'edit-settings-timed-examination',
|
||||
@@ -496,6 +496,7 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
AccessEditor = AbstractEditor.extend({
|
||||
templateName: 'access-editor',
|
||||
className: 'edit-settings-access',
|
||||
@@ -548,13 +549,14 @@ define(['jquery', 'backbone', 'underscore', 'gettext', 'js/views/baseview',
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
GradingEditor = AbstractEditor.extend({
|
||||
templateName: 'grading-editor',
|
||||
className: 'edit-settings-grading',
|
||||
|
||||
afterRender: function () {
|
||||
AbstractEditor.prototype.afterRender.call(this);
|
||||
this.setValue(this.model.get('format'));
|
||||
this.setValue(this.model.get('format') || 'notgraded');
|
||||
},
|
||||
|
||||
setValue: function (value) {
|
||||
|
||||
@@ -89,7 +89,7 @@ function($, _, AbstractEditor, FileUpload, UploadDialog) {
|
||||
items = this.$el.find('ol').find('.list-settings-item');
|
||||
|
||||
_.each(items, function(element, index) {
|
||||
var key = $(element).find('select').val(),
|
||||
var key = $(element).find('select option:selected').val(),
|
||||
value = $(element).find('.input').val();
|
||||
|
||||
// Keys should be unique, so if our keys are duplicated and
|
||||
|
||||
@@ -39,15 +39,15 @@ class @Annotatable
|
||||
# the associated problem. The reply buttons are part of the tooltip
|
||||
# content. It's important that the tooltips be configured to render
|
||||
# as descendants of the annotation module and *not* the document.body.
|
||||
@$el.delegate @replySelector, 'click', @onClickReply
|
||||
@$el.on 'click', @replySelector, @onClickReply
|
||||
|
||||
# Initialize handler for 'return to annotation' events triggered from problems.
|
||||
# 1) There are annotationinput capa problems rendered on the page
|
||||
# 2) Each one has an embedded return link (see annotation capa problem template).
|
||||
# Since the capa problem injects HTML content via AJAX, the best we can do is
|
||||
# is let the click events bubble up to the body and handle them there.
|
||||
$('body').delegate @problemReturnSelector, 'click', @onClickReturn
|
||||
|
||||
# is let the click events bubble up to the body and handle them there.
|
||||
$(document).on 'click', @problemReturnSelector, @onClickReturn
|
||||
|
||||
initTips: () ->
|
||||
# tooltips are used to display annotations for highlighted text spans
|
||||
@$(@spanSelector).each (index, el) =>
|
||||
@@ -91,8 +91,9 @@ class @Annotatable
|
||||
|
||||
onMoveTip: (event, api, position) =>
|
||||
###
|
||||
This method handles an edge case in which a tooltip is displayed above
|
||||
a non-overlapping span like this:
|
||||
This method handles a vertical positioning bug in Firefox as
|
||||
well as an edge case in which a tooltip is displayed above a
|
||||
non-overlapping span like this:
|
||||
|
||||
(( TOOLTIP ))
|
||||
\/
|
||||
@@ -115,28 +116,33 @@ class @Annotatable
|
||||
# we want to choose the largest of the two non-overlapping spans and display
|
||||
# the tooltip above the center of it (see api.options.position settings)
|
||||
focus_rect = (if rects[0].width > rects[1].width then rects[0] else rects[1])
|
||||
rect_center = focus_rect.left + (focus_rect.width / 2)
|
||||
rect_top = focus_rect.top
|
||||
tip_width = $(tip).width()
|
||||
tip_height = $(tip).height()
|
||||
else
|
||||
# always compute the new position because Firefox doesn't
|
||||
# properly vertically position the tooltip
|
||||
focus_rect = rects[0]
|
||||
|
||||
# tooltip is positioned relative to its container, so we need to factor in offsets
|
||||
container_offset = $(container).offset()
|
||||
offset_left = -container_offset.left
|
||||
offset_top = $(document).scrollTop() - container_offset.top
|
||||
rect_center = focus_rect.left + (focus_rect.width / 2)
|
||||
rect_top = focus_rect.top
|
||||
tip_width = $(tip).width()
|
||||
tip_height = $(tip).height()
|
||||
|
||||
tip_left = offset_left + rect_center - (tip_width / 2)
|
||||
tip_top = offset_top + rect_top - tip_height + adjust_y
|
||||
# tooltip is positioned relative to its container, so we need to factor in offsets
|
||||
container_offset = $(container).offset()
|
||||
offset_left = -container_offset.left
|
||||
offset_top = $(document).scrollTop() - container_offset.top
|
||||
|
||||
# make sure the new tip position doesn't clip the edges of the screen
|
||||
win_width = $(window).width()
|
||||
if tip_left < offset_left
|
||||
tip_left = offset_left
|
||||
else if tip_left + tip_width > win_width + offset_left
|
||||
tip_left = win_width + offset_left - tip_width
|
||||
tip_left = offset_left + rect_center - (tip_width / 2)
|
||||
tip_top = offset_top + rect_top - tip_height + adjust_y
|
||||
|
||||
# final step: update the position object (used by qtip2 to show the tip after the move event)
|
||||
$.extend position, 'left': tip_left, 'top': tip_top
|
||||
# make sure the new tip position doesn't clip the edges of the screen
|
||||
win_width = $(window).width()
|
||||
if tip_left < offset_left
|
||||
tip_left = offset_left
|
||||
else if tip_left + tip_width > win_width + offset_left
|
||||
tip_left = win_width + offset_left - tip_width
|
||||
|
||||
# final step: update the position object (used by qtip2 to show the tip after the move event)
|
||||
$.extend position, 'left': tip_left, 'top': tip_top
|
||||
|
||||
getSpanForProblemReturn: (el) ->
|
||||
problem_id = $(@problemReturnSelector).index(el)
|
||||
@@ -144,7 +150,7 @@ class @Annotatable
|
||||
|
||||
getProblem: (el) ->
|
||||
problem_id = @getProblemId(el)
|
||||
$(@problemSelector).has(@problemInputSelector).eq(problem_id)
|
||||
$(@problemInputSelector).eq(problem_id)
|
||||
|
||||
getProblemId: (el) ->
|
||||
$(el).data('problem-id')
|
||||
@@ -208,7 +214,7 @@ class @Annotatable
|
||||
onAfter: @_once => after?.call this, el
|
||||
offset: offset
|
||||
}) if $(el).length > 0
|
||||
|
||||
|
||||
afterScrollToProblem: (problem_el) ->
|
||||
problem_el.effect 'highlight', {}, 500
|
||||
|
||||
|
||||
@@ -11,7 +11,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-1.4.2-min',
|
||||
'jquery.scrollTo': 'js/vendor/jquery.scrollTo.min',
|
||||
'jquery.timepicker': 'js/vendor/timepicker/jquery.timepicker',
|
||||
'jquery.cookie': 'js/vendor/jquery.cookie',
|
||||
'jquery.qtip': 'js/vendor/jquery.qtip.min',
|
||||
|
||||
1
common/static/js/vendor/jquery-migrate.min.js
vendored
Symbolic link
1
common/static/js/vendor/jquery-migrate.min.js
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../node_modules/jquery-migrate/dist/jquery-migrate.min.js
|
||||
4
common/static/js/vendor/jquery.min.js
vendored
4
common/static/js/vendor/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
1
common/static/js/vendor/jquery.min.js
vendored
Symbolic link
1
common/static/js/vendor/jquery.min.js
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../node_modules/jquery/dist/jquery.min.js
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* jQuery.ScrollTo - Easy element scrolling using jQuery.
|
||||
* Copyright (c) 2007-2009 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com
|
||||
* Dual licensed under MIT and GPL.
|
||||
* Date: 5/25/2009
|
||||
* @author Ariel Flesler
|
||||
* @version 1.4.2
|
||||
*
|
||||
* http://flesler.blogspot.com/2007/10/jqueryscrollto.html
|
||||
*/
|
||||
;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);
|
||||
1
common/static/js/vendor/jquery.scrollTo.min.js
vendored
Symbolic link
1
common/static/js/vendor/jquery.scrollTo.min.js
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../node_modules/jquery.scrollto/jquery.scrollTo.min.js
|
||||
@@ -1241,6 +1241,7 @@ proctoring_js = (
|
||||
# RequireJS and an optimizer.
|
||||
base_vendor_js = [
|
||||
'js/vendor/jquery.min.js',
|
||||
'js/vendor/jquery-migrate.min.js',
|
||||
'js/vendor/jquery.cookie.js',
|
||||
'js/vendor/url.min.js',
|
||||
'common/js/vendor/underscore.js',
|
||||
@@ -1353,6 +1354,7 @@ ccx_js = sorted(rooted_glob(PROJECT_ROOT / 'static', 'js/ccx/**/*.js'))
|
||||
|
||||
certificates_web_view_js = [
|
||||
'js/vendor/jquery.min.js',
|
||||
'js/vendor/jquery-migrate.min.js',
|
||||
'js/vendor/jquery.cookie.js',
|
||||
'js/src/logger.js',
|
||||
'js/utils/facebook.js',
|
||||
@@ -1360,6 +1362,7 @@ certificates_web_view_js = [
|
||||
|
||||
credit_web_view_js = [
|
||||
'js/vendor/jquery.min.js',
|
||||
'js/vendor/jquery-migrate.min.js',
|
||||
'js/vendor/jquery.cookie.js',
|
||||
'js/src/logger.js',
|
||||
]
|
||||
|
||||
@@ -15,8 +15,8 @@ ReportDownloads = -> window.InstructorDashboard.util.ReportDownloads
|
||||
class @DataDownload_Certificate
|
||||
constructor: (@$container) ->
|
||||
# gather elements
|
||||
@$list_issued_certificate_table_btn = @$container.find("input[name='issued-certificates-list']'")
|
||||
@$list_issued_certificate_csv_btn = @$container.find("input[name='issued-certificates-csv']'")
|
||||
@$list_issued_certificate_table_btn = @$container.find("input[name='issued-certificates-list']")
|
||||
@$list_issued_certificate_csv_btn = @$container.find("input[name='issued-certificates-csv']")
|
||||
@$certificate_display_table = @$container.find '.certificate-data-display-table'
|
||||
@$certificates_request_response_error = @$container.find '.issued-certificates-error.request-response-error'
|
||||
|
||||
@@ -72,10 +72,10 @@ class DataDownload
|
||||
new DataDownload_Certificate @$section.find '.issued_certificates'
|
||||
|
||||
# gather elements
|
||||
@$list_studs_btn = @$section.find("input[name='list-profiles']'")
|
||||
@$list_studs_csv_btn = @$section.find("input[name='list-profiles-csv']'")
|
||||
@$list_proctored_exam_results_csv_btn = @$section.find("input[name='proctored-exam-results-report']'")
|
||||
@$survey_results_csv_btn = @$section.find("input[name='survey-results-report']'")
|
||||
@$list_studs_btn = @$section.find("input[name='list-profiles']")
|
||||
@$list_studs_csv_btn = @$section.find("input[name='list-profiles-csv']")
|
||||
@$list_proctored_exam_results_csv_btn = @$section.find("input[name='proctored-exam-results-report']")
|
||||
@$survey_results_csv_btn = @$section.find("input[name='survey-results-report']")
|
||||
@$list_may_enroll_csv_btn = @$section.find("input[name='list-may-enroll-csv']")
|
||||
@$list_problem_responses_csv_input = @$section.find("input[name='problem-location']")
|
||||
@$list_problem_responses_csv_btn = @$section.find("input[name='list-problem-responses-csv']")
|
||||
|
||||
@@ -13,10 +13,10 @@ class ECommerce
|
||||
# this object to call event handlers like 'onClickTitle'
|
||||
@$section.data 'wrapper', @
|
||||
# gather elements
|
||||
@$list_sale_csv_btn = @$section.find("input[name='list-sale-csv']'")
|
||||
@$list_order_sale_csv_btn = @$section.find("input[name='list-order-sale-csv']'")
|
||||
@$download_company_name = @$section.find("input[name='download_company_name']'")
|
||||
@$active_company_name = @$section.find("input[name='active_company_name']'")
|
||||
@$list_sale_csv_btn = @$section.find("input[name='list-sale-csv']")
|
||||
@$list_order_sale_csv_btn = @$section.find("input[name='list-order-sale-csv']")
|
||||
@$download_company_name = @$section.find("input[name='download_company_name']")
|
||||
@$active_company_name = @$section.find("input[name='active_company_name']")
|
||||
@$spent_company_name = @$section.find('input[name="spent_company_name"]')
|
||||
@$download_coupon_codes = @$section.find('input[name="download-coupon-codes-csv"]')
|
||||
|
||||
@@ -89,4 +89,4 @@ class ECommerce
|
||||
_.defaults window, InstructorDashboard: {}
|
||||
_.defaults window.InstructorDashboard, sections: {}
|
||||
_.defaults window.InstructorDashboard.sections,
|
||||
ECommerce: ECommerce
|
||||
ECommerce: ECommerce
|
||||
|
||||
@@ -19,15 +19,15 @@ class SendEmail
|
||||
constructor: (@$container) ->
|
||||
# gather elements
|
||||
@$emailEditor = XBlock.initializeBlock($('.xblock-studio_view'));
|
||||
@$send_to = @$container.find("select[name='send_to']'")
|
||||
@$subject = @$container.find("input[name='subject']'")
|
||||
@$btn_send = @$container.find("input[name='send']'")
|
||||
@$send_to = @$container.find("select[name='send_to']")
|
||||
@$subject = @$container.find("input[name='subject']")
|
||||
@$btn_send = @$container.find("input[name='send']")
|
||||
@$task_response = @$container.find(".request-response")
|
||||
@$request_response_error = @$container.find(".request-response-error")
|
||||
@$content_request_response_error = @$container.find(".content-request-response-error")
|
||||
@$history_request_response_error = @$container.find(".history-request-response-error")
|
||||
@$btn_task_history_email = @$container.find("input[name='task-history-email']'")
|
||||
@$btn_task_history_email_content = @$container.find("input[name='task-history-email-content']'")
|
||||
@$btn_task_history_email = @$container.find("input[name='task-history-email']")
|
||||
@$btn_task_history_email_content = @$container.find("input[name='task-history-email-content']")
|
||||
@$table_task_history_email = @$container.find(".task-history-email-table")
|
||||
@$table_email_content_history = @$container.find(".content-history-email-table")
|
||||
@$email_content_table_inner = @$container.find(".content-history-table-inner")
|
||||
|
||||
@@ -32,7 +32,7 @@ $ ->
|
||||
# fix for ie
|
||||
if !Array::indexOf
|
||||
Array::indexOf = (obj, start = 0) ->
|
||||
for ele, i in this[start..]
|
||||
if ele is obj
|
||||
return i + start
|
||||
for ele, i in this[start..]
|
||||
if ele is obj
|
||||
return i + start
|
||||
return -1
|
||||
|
||||
@@ -8,7 +8,12 @@
|
||||
paths: {
|
||||
'gettext': 'xmodule_js/common_static/js/test/i18n',
|
||||
'codemirror': 'xmodule_js/common_static/js/vendor/CodeMirror/codemirror',
|
||||
'jquery': 'xmodule_js/common_static/js/vendor/jquery.min',
|
||||
// The jquery-migrate library was added in upgrading from
|
||||
// jQuery 1.7.x to 2.2.x. This config allows developers
|
||||
// to depend on "jquery" which opaquely requires both
|
||||
// libraries.
|
||||
'_jquery': 'xmodule_js/common_static/js/vendor/jquery.min',
|
||||
'jquery': 'xmodule_js/common_static/js/vendor/jquery-migrate.min',
|
||||
'jquery.ui': 'xmodule_js/common_static/js/vendor/jquery-ui.min',
|
||||
'jquery.eventDrag': 'xmodule_js/common_static/js/vendor/jquery.event.drag-2.2',
|
||||
'jquery.flot': 'xmodule_js/common_static/js/vendor/flot/jquery.flot.min',
|
||||
@@ -18,7 +23,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-1.4.2-min',
|
||||
'jquery.scrollTo': 'xmodule_js/common_static/js/vendor/jquery.scrollTo.min',
|
||||
'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',
|
||||
@@ -119,6 +124,10 @@
|
||||
'date': {
|
||||
exports: 'Date'
|
||||
},
|
||||
"jquery": {
|
||||
deps: ["_jquery"],
|
||||
exports: "jQuery"
|
||||
},
|
||||
'jquery.ui': {
|
||||
deps: ['jquery'],
|
||||
exports: 'jQuery.ui'
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
paths: {
|
||||
'gettext': 'empty:',
|
||||
'coffee/src/ajax_prefix': 'empty:',
|
||||
// '_jquery' is the name of the current jQuery in the
|
||||
// platform, and 'jquery' refers to jquery-migrate.
|
||||
'_jquery': 'empty:',
|
||||
'jquery': 'empty:',
|
||||
'jquery.cookie': 'empty:',
|
||||
'jquery.url': 'empty:',
|
||||
|
||||
@@ -64,7 +64,12 @@
|
||||
"backbone.paginator": "js/vendor/backbone.paginator.min",
|
||||
"underscore": "common/js/vendor/underscore",
|
||||
"underscore.string": "common/js/vendor/underscore.string",
|
||||
"jquery": "js/vendor/jquery.min",
|
||||
// The jquery-migrate library was added in upgrading from
|
||||
// jQuery 1.7.x to 2.2.x. This config allows developers
|
||||
// to depend on "jquery" which opaquely requires both
|
||||
// libraries.
|
||||
"_jquery": "js/vendor/jquery.min",
|
||||
"jquery": "js/vendor/jquery-migrate.min",
|
||||
"jquery.cookie": "js/vendor/jquery.cookie",
|
||||
'jquery.timeago': 'js/vendor/jquery.timeago',
|
||||
"jquery.url": "js/vendor/url.min",
|
||||
@@ -111,6 +116,13 @@
|
||||
"date": {
|
||||
exports: "Date"
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"jquery": {
|
||||
deps: ["_jquery"],
|
||||
exports: "jQuery"
|
||||
},
|
||||
>>>>>>> Upgrade jQuery 1.7.2 to 2.2.0
|
||||
"jquery.cookie": {
|
||||
deps: ["jquery"],
|
||||
exports: "jQuery.fn.cookie"
|
||||
|
||||
@@ -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-1.4.2-min.js')}"></script>
|
||||
<script type="text/javascript" src="${static.url('js/vendor/jquery.scrollTo.min.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-1.4.2-min.js')}"></script>
|
||||
<script type="text/javascript" src="${static.url('js/vendor/jquery.scrollTo.min.js')}"></script>
|
||||
<script type="text/javascript" src="${static.url('js/vendor/flot/jquery.flot.js')}"></script>
|
||||
|
||||
## codemirror
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
"edx-pattern-library": "~0.12.4",
|
||||
"edx-ui-toolkit": "~0.9.1",
|
||||
"requirejs": "~2.1.22",
|
||||
"jquery": "~2.2.0",
|
||||
"jquery-migrate": "1.3.0",
|
||||
"jquery.scrollto": "~2.1.2",
|
||||
"uglify-js": "2.4.24",
|
||||
"underscore": "~1.8.3",
|
||||
"underscore.string": "~3.3.4",
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
"date": "1.0",
|
||||
"domready": "2.0.1",
|
||||
"draggabilly": "1.2.4",
|
||||
"jquery": "1.7.2",
|
||||
"jquery-form": "3.18.0",
|
||||
"jquery-watch": "2.0",
|
||||
"moment": "2.10.6",
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
"domReady": "2.0.1",
|
||||
"draggabilly": "1.2.4",
|
||||
// "history": "1.8b2",
|
||||
"jquery": "1.7.2",
|
||||
// "jquery.ajaxQueue": "unknown",
|
||||
// "jquery.ajax-retry": "unknown",
|
||||
"jquery.colorhelpers": "1.1",
|
||||
|
||||
Reference in New Issue
Block a user