move "old_unsupported_react" to client_apps
closes: CNVS-30472 since client_apps/canvas_quizzes is the only thing that cares about our old version of react and react-router, this moves them out of canvas and into canvas_quizzes so it is the only one that can use them. This simplifies things in canvas so no one ever tries to use them going forward. test plan: * inside of client_apps/canvas_quzzes run: `script/build && grunt test` * it should pass jenkins * click around in the quiz stats and quiz log auditing apps to make sure they still load mv old_unsupported Change-Id: I56eadedfe2417f32f2afb99ec76a21870871ad7e WIP move "old_unsupported_react" to client_apps Change-Id: I673321b51db9b197a298ccb831c417e902aaae28 Reviewed-on: https://gerrit.instructure.com/85483 Tested-by: Jenkins Reviewed-by: Clay Diffrient <cdiffrient@instructure.com> QA-Review: Robin Kuss <rkuss@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
parent
ce4f03ce0c
commit
2121cf7430
|
@ -1,49 +0,0 @@
|
|||
define ['old_unsupported_dont_use_react'], (React) ->
|
||||
|
||||
reactDomIsInjected = false
|
||||
|
||||
# This moves everything from React.DOM to the window, making non-jsx react
|
||||
# code far more convenient, and even a bit haml-like
|
||||
#
|
||||
# ```coffee
|
||||
# define ['react', 'compiled/react/shared/utils/withReactDOM'], (React, withReactDOM) ->
|
||||
# React.createClass
|
||||
# render: withDOM ->
|
||||
# div {className: 'container'},
|
||||
# ul {},
|
||||
# li {className: 'foo'}, 'Foo'
|
||||
# li {className: 'bar'}, 'Bar'
|
||||
# ```
|
||||
|
||||
withReactDOM = (fn) ->
|
||||
return ->
|
||||
# to be faster, if a component above us used withReactDOM,
|
||||
# and is currently rendering, don't re-inject
|
||||
return fn.apply(this, arguments) if reactDomIsInjected
|
||||
|
||||
# inject everything from React.DOM into global scope,
|
||||
# and preserve things that were already there.
|
||||
originals = {}
|
||||
for key of React.DOM
|
||||
if key of window
|
||||
originals[key] = window[key]
|
||||
window[key] = React.DOM[key]
|
||||
reactDomIsInjected = true
|
||||
|
||||
# run provided callback
|
||||
retVal = fn.apply(this, arguments)
|
||||
|
||||
# clean up, putting the things that were on window back.
|
||||
# Because JS is single threaded, by cleaning up here,
|
||||
# we're guaranteed not to screw up some potential
|
||||
# global `i` in other code. By the time our function has returned,
|
||||
# everything will be back to how it was before.
|
||||
for key of React.DOM
|
||||
if key of originals
|
||||
window[key] = originals[key]
|
||||
else
|
||||
delete window[key]
|
||||
reactDomIsInjected = false
|
||||
|
||||
# return the result of the callback
|
||||
retVal
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var classSet = require('../util/class_set');
|
||||
var $ = require('canvas_packages/jquery');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var jQueryUIDialog = require('canvas_packages/jqueryui/dialog');
|
||||
var $ = require('canvas_packages/jquery');
|
||||
var _ = require('lodash');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var ScreenReaderContent = require('jsx!./screen_reader_content');
|
||||
var SightedUserContent = require('jsx!./sighted_user_content');
|
||||
var Icon = React.createClass({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var $ = require('canvas_packages/jquery');
|
||||
var _ = require('lodash');
|
||||
var jQuery_qTip = require('qtip');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
|
||||
/**
|
||||
* @class Components.ScreenReaderContent
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
|
||||
/**
|
||||
* @class Components.SightedUserContent
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Spinner = React.createClass({
|
||||
render: function() {
|
||||
return(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var _ = require('lodash');
|
||||
var interpolate = require('../util/i18n_interpolate');
|
||||
var convertCase = require('../util/convert_case');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
/**
|
||||
* @member Util
|
||||
*
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
require([ 'react' ], function(React) {
|
||||
require([ 'old_version_of_react_used_by_canvas_quizzes_client_apps' ], function(React) {
|
||||
window.React = React;
|
||||
|
||||
// Creates a DOM element that ReactSuite tests will use tmount the subject
|
||||
// in. Although jasmine_react does that automatically on the start of each
|
||||
// ReactSuite, we will prepare it before-hand and expose it to jasmine.fixture
|
||||
// if you need to access directly.
|
||||
require([ 'jasmine_react', 'canvas_packages/react-router', ], function(ReactSuite, ReactRouter) {
|
||||
require([ 'jasmine_react', 'old_version_of_react-router_used_by_canvas_quizzes_client_apps'], function(ReactSuite, ReactRouter) {
|
||||
var Route = ReactRouter.Route;
|
||||
|
||||
console.log("")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Subject = require('jsx!components/dialog');
|
||||
|
||||
describe('Components.Dialog', function() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Subject = require('jsx!components/text');
|
||||
|
||||
describe('Components.Text', function() {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var ReactRouter = require('canvas_packages/react-router');
|
||||
var ReactRouter = require('old_version_of_react-router_used_by_canvas_quizzes_client_apps');
|
||||
var AppRoute = require('jsx!../routes/app');
|
||||
var EventStreamRoute = require('jsx!../routes/event_stream');
|
||||
var QuestionRoute = require('jsx!../routes/question');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var classSet = require('canvas_quizzes/util/class_set');
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var _ = require('lodash');
|
||||
var config = require('../config');
|
||||
var initialize = require('../config/initializer');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
return {
|
||||
render: function() {
|
||||
return (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var AnswerMatrix = require('jsx!../views/answer_matrix');
|
||||
var Config = require('../config');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Actions = require('../actions');
|
||||
var I18n = require('i18n!quiz_log_auditing');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var EventStream = require('jsx!../views/event_stream');
|
||||
var Session = require('jsx!../views/session');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var WithSidebar = require('jsx!../mixins/with_sidebar');
|
||||
var QuestionInspector = require('jsx!../views/question_inspector');
|
||||
var QuestionListing = require('jsx!../views/question_listing');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var ReactRouter = require('canvas_packages/react-router');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var ReactRouter = require('old_version_of_react-router_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../constants');
|
||||
var I18n = require('i18n!quiz_log_auditing.table_view');
|
||||
var Legend = require('jsx!./answer_matrix/legend');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var _ = require('lodash');
|
||||
var K = require('../../constants');
|
||||
var Emblem = require('jsx!./emblem');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
|
||||
/**
|
||||
* @class Events.Views.AnswerMatrix.Emblem
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var secondsToTime = require('canvas_quizzes/util/seconds_to_time');
|
||||
var I18n = require('i18n!quiz_log_auditing.inverted_table_view');
|
||||
var Cell = require('jsx!./cell');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Emblem = require('jsx!./emblem');
|
||||
var I18n = require('i18n!quiz_log_auditing.table_view');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Option = React.createClass({
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var I18n = require('i18n!quiz_log_auditing.table_view');
|
||||
var secondsToTime = require('canvas_quizzes/util/seconds_to_time');
|
||||
var Cell = require('jsx!./cell');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var _ = require('lodash');
|
||||
var Actions = require('../actions');
|
||||
var I18n = require('i18n!quiz_log_auditing.event_stream');
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var classSet = require('canvas_quizzes/util/class_set');
|
||||
var K = require('../../constants');
|
||||
var secondsToTime = require('canvas_quizzes/util/seconds_to_time');
|
||||
var I18n = require('i18n!quiz_log_auditing.event_stream');
|
||||
var Icon = require('jsx!canvas_quizzes/components/icon');
|
||||
var SightedUserContent = require('jsx!canvas_quizzes/components/sighted_user_content');
|
||||
var Router = require('canvas_packages/react-router');
|
||||
var Router = require('old_version_of_react-router_used_by_canvas_quizzes_client_apps');
|
||||
var Link = Router.Link;
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var I18n = require('i18n!quiz_log_auditing');
|
||||
var classSet = require('canvas_quizzes/util/class_set');
|
||||
var K = require('../constants');
|
||||
var ReactRouter = require('canvas_packages/react-router');
|
||||
var ReactRouter = require('old_version_of_react-router_used_by_canvas_quizzes_client_apps');
|
||||
var Answer = require('jsx!./question_inspector/answer');
|
||||
var NoAnswer = require('jsx!./question_inspector/answers/no_answer');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../constants');
|
||||
var I18n = require('i18n!quiz_log_auditing');
|
||||
var classSet = require('canvas_quizzes/util/class_set');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../../constants');
|
||||
var Button = require('jsx!../../../components/button');
|
||||
var I18n = require('i18n!quiz_log_auditing.question_answers.essay');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../../constants');
|
||||
var NO_ANSWER = require('jsx!./no_answer');
|
||||
var keys = Object.keys;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../../constants');
|
||||
var NO_ANSWER = require('jsx!./no_answer');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../../constants');
|
||||
|
||||
var MultipleAnswers = React.createClass({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../../constants');
|
||||
|
||||
var MultipleChoice = React.createClass({
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../../constants');
|
||||
var NO_ANSWER = require('jsx!./no_answer');
|
||||
var keys = Object.keys;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var I18n = require('i18n!quiz_log_auditing');
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var ReactRouter = require('canvas_packages/react-router');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var ReactRouter = require('old_version_of_react-router_used_by_canvas_quizzes_client_apps');
|
||||
var I18n = require('i18n!quiz_log_auditing.navigation');
|
||||
var Link = ReactRouter.Link;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var ReactRouter = require('canvas_packages/react-router');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var ReactRouter = require('old_version_of_react-router_used_by_canvas_quizzes_client_apps');
|
||||
var I18n = require('i18n!quiz_log_auditing');
|
||||
var Button = require('jsx!../components/button');
|
||||
var ScreenReaderContent = require('jsx!canvas_quizzes/components/screen_reader_content');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var _ = require('lodash');
|
||||
var config = require('../config');
|
||||
var initialize = require('../config/initializer');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var ActorMixin = require('../mixins/components/actor');
|
||||
|
||||
if (!React.addons) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
|
||||
var getChartNode = function(component) {
|
||||
var ref = (component.refs || {}).chart || component;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var d3 = require('d3');
|
||||
var $ = require('canvas_packages/jquery');
|
||||
var jQuery_qTip = require('qtip');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var _ = require('lodash');
|
||||
var I18n = require('i18n!quiz_statistics');
|
||||
var Notifications = require('jsx!./notifications');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var d3 = require('d3');
|
||||
var ChartMixin = require('../../mixins/chart');
|
||||
var round = require('canvas_quizzes/util/round');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../constants');
|
||||
var I18n = require('i18n!quiz_statistics.discrimination_index');
|
||||
var classSet = require('canvas_quizzes/util/class_set');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var d3 = require('d3');
|
||||
var ChartMixin = require('../../../mixins/chart');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../../constants');
|
||||
var Text = require('jsx!canvas_quizzes/components/text');
|
||||
var I18n = require('i18n!quiz_statistics');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Actions = require('../actions');
|
||||
var I18n = require('i18n!quizzes');
|
||||
var NotificationRenderers = [];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Text = require('jsx!canvas_quizzes/components/text');
|
||||
var K = require('../../constants');
|
||||
var I18n = require('i18n!quiz_reports');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var classSet = require('canvas_quizzes/util/class_set');
|
||||
|
||||
var Question = React.createClass({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var d3 = require('d3');
|
||||
var _ = require('lodash');
|
||||
var AnswerRow = require('jsx!./answer_table/answer_row');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var _ = require('lodash');
|
||||
var I18n = require('i18n!quiz_statistics.answers_tables');
|
||||
var UserListDialog = require('jsx!./../user_list_dialog');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var I18n = require('i18n!quiz_statistics');
|
||||
var ScreenReaderContent = require('jsx!canvas_quizzes/components/screen_reader_content');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var Dialog = require('jsx!canvas_quizzes/components/dialog');
|
||||
var I18n = require('i18n!quiz_statistics');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var I18n = require('i18n!quiz_statistics.summary');
|
||||
var secondsToTime = require('canvas_quizzes/util/seconds_to_time');
|
||||
var round = require('canvas_quizzes/util/round');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var I18n = require('i18n!quiz_reports');
|
||||
var K = require('../../../constants');
|
||||
var Descriptor = require('../../../models/quiz_report_descriptor');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var ChartMixin = require('../../mixins/chart');
|
||||
var d3 = require('d3');
|
||||
var I18n = require('i18n!quiz_statistics.summary');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var quizStatistics = require('../../stores/statistics');
|
||||
var config = require('../../config');
|
||||
var I18n = require('i18n!quiz_statistics');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
define(function(require) {
|
||||
var Subject = require('jsx!views/questions/answer_table');
|
||||
var $ = require('canvas_packages/jquery');
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var d3 = require('d3');
|
||||
|
||||
describe('Views.Questions.AnswerTable', function() {
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
"lodash": "underscore",
|
||||
"d3": "vendor/d3.v3",
|
||||
"backbone": "vendor/backbone",
|
||||
"jquery/instructure_date_and_time": "jquery.instructure_date_and_time",
|
||||
"react": "old_unsupported_dont_use_react",
|
||||
"react-router": "old_unsupported_dont_use_react-router"
|
||||
"jquery/instructure_date_and_time": "jquery.instructure_date_and_time"
|
||||
}
|
|
@ -20,11 +20,12 @@ requirejs.config({
|
|||
// CQS dependencies
|
||||
'rsvp': '../../../vendor/js/rsvp.min',
|
||||
'qtip': '../../../vendor/js/jquery.qtip',
|
||||
'old_version_of_react_used_by_canvas_quizzes_client_apps': '../../../vendor/js/old_version_of_react_used_by_canvas_quizzes_client_apps',
|
||||
'old_version_of_react-router_used_by_canvas_quizzes_client_apps': '../../../vendor/js/old_version_of_react-router_used_by_canvas_quizzes_client_apps',
|
||||
// ========================================================================
|
||||
|
||||
// ========================================================================
|
||||
// Aliases to frequently-used Canvas packages
|
||||
'react': '../../../vendor/packages/react',
|
||||
'lodash': '../../../vendor/packages/lodash',
|
||||
'd3': '../../../vendor/packages/d3',
|
||||
// ========================================================================
|
||||
|
|
|
@ -10,7 +10,7 @@ requirejs.config({
|
|||
},
|
||||
|
||||
'*': {
|
||||
'old_unsupported_dont_use_react': 'canvas/old_unsupported_dont_use_react',
|
||||
'react': '../../../vendor/js/alias_to_old_version_of_react',
|
||||
'str': 'canvas/str',
|
||||
'jsx/railsFlashNotificationsHelper': 'canvas/jsx/railsFlashNotificationsHelper'
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/** @jsx React.DOM */
|
||||
define(function(require) {
|
||||
var React = require('react');
|
||||
var React = require('old_version_of_react_used_by_canvas_quizzes_client_apps');
|
||||
var K = require('../../../constants');
|
||||
var Text = require('jsx!../../../components/text');
|
||||
var I18n = require('i18n!quiz_statistics');
|
||||
|
|
|
@ -8,7 +8,7 @@ requirejs.config({
|
|||
require([ 'config/requirejs/development' ], function() {
|
||||
require([
|
||||
'canvas_packages/jquery',
|
||||
'react',
|
||||
'old_version_of_react_used_by_canvas_quizzes_client_apps',
|
||||
'canvas_quizzes/util/inflections',
|
||||
], function($, React, Inflection) {
|
||||
var parseFileName = function() {
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
"requirejs": {
|
||||
"bundledDependencies": [
|
||||
"rsvp",
|
||||
"qtip"
|
||||
"qtip",
|
||||
"old_version_of_react_used_by_canvas_quizzes_client_apps",
|
||||
"old_version_of_react-router_used_by_canvas_quizzes_client_apps"
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
define(['old_version_of_react_used_by_canvas_quizzes_client_apps'], function(react){
|
||||
return react;
|
||||
});
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +0,0 @@
|
|||
define([ 'canvas/old_unsupported_dont_use_react-router' ], function(Router) {
|
||||
return Router;
|
||||
});
|
|
@ -1,3 +0,0 @@
|
|||
define([ 'canvas/old_unsupported_dont_use_react' ], function(React) {
|
||||
return React;
|
||||
});
|
|
@ -3,7 +3,7 @@
|
|||
// file optimizations
|
||||
optimize: "none",
|
||||
|
||||
// continue to let Jammit do its thing
|
||||
// our requireJS does nothing with CSS
|
||||
optimizeCss: "none",
|
||||
|
||||
// where to place optimized javascript, relative to this file
|
||||
|
|
|
@ -13,19 +13,8 @@ clientAppPlugin.prototype.apply = function(compiler){
|
|||
nmf.plugin("before-resolve", function(result, callback) {
|
||||
let request = result.request;
|
||||
|
||||
// the client apps use an old version of react and used requirejs aliases
|
||||
// to keep it seperate from the react version the rest of canvas uses.
|
||||
// This should shim that difference into the webpack build.
|
||||
if(/client_apps\/canvas_quizzes/.test(result.context)){
|
||||
if(request == "react"){
|
||||
request = "old_unsupported_dont_use_react"
|
||||
}
|
||||
|
||||
if(request == "react-router" || request == "canvas_packages/react-router"){
|
||||
request = "old_unsupported_dont_use_react-router-webpack"
|
||||
}
|
||||
|
||||
// Likewise, they depend on requiring lodash directly, which was set to
|
||||
// The client apps depend on requiring lodash directly, which was set to
|
||||
// map to lodash.underscore prior to 37914f705ee4055224107f01f0afb772d443f90d
|
||||
// which added up-to-date normal lodash via 'lodash'
|
||||
if (request === "lodash") {
|
||||
|
|
|
@ -12,7 +12,6 @@ vendor
|
|||
/tinymce/jscripts/tiny_mce/themes
|
||||
/tinymce/jscripts/tiny_mce/tiny_mce*.js
|
||||
/tinymce/jscripts/tiny_mce/utils
|
||||
/old_unsupported_dont_use_react.js
|
||||
|
||||
# vendor package in analytics
|
||||
/plugins/analytics/react-bootstrap-table.js
|
||||
|
|
Loading…
Reference in New Issue