diff --git a/src/onegov/feriennet/assets/js/volunteer-cart.jsx b/src/onegov/feriennet/assets/js/volunteer-cart.jsx index e41a0d962e..dcd31637d0 100644 --- a/src/onegov/feriennet/assets/js/volunteer-cart.jsx +++ b/src/onegov/feriennet/assets/js/volunteer-cart.jsx @@ -1,4 +1,4 @@ -var VolunteerCart = React.createClass({ +var VolunteerCart = createReactClass({ getInitialState: function() { return {'items': []}; }, diff --git a/src/onegov/form/assets/js/format.jsx b/src/onegov/form/assets/js/format.jsx index f617f59285..fe56d1f45e 100644 --- a/src/onegov/form/assets/js/format.jsx +++ b/src/onegov/form/assets/js/format.jsx @@ -1,4 +1,4 @@ -var FormcodeFormat = React.createClass({ +var FormcodeFormat = createReactClass({ getInitialState: function() { return {fields: []}; }, @@ -28,7 +28,7 @@ var FormcodeFormat = React.createClass({ } }); -var FormcodeFormatFields = React.createClass({ +var FormcodeFormatFields = createReactClass({ render: function() { var self = this; return ( @@ -49,7 +49,7 @@ var FormcodeFormatFields = React.createClass({ } }); -var FormcodeFormatField = React.createClass({ +var FormcodeFormatField = createReactClass({ handleClick: function() { var format = '[' + this.props.field.human_id + ']'; formcodeUtils.updateTarget(this.props.target, format, null, ' '); diff --git a/src/onegov/form/assets/js/select.jsx b/src/onegov/form/assets/js/select.jsx index 619b20bd4e..64a692cd83 100644 --- a/src/onegov/form/assets/js/select.jsx +++ b/src/onegov/form/assets/js/select.jsx @@ -1,4 +1,4 @@ -var FormcodeSelect = React.createClass({ +var FormcodeSelect = createReactClass({ getInitialState: function() { var values = this.getTarget().value.split('\n').filter(function(line) { return line.trim() !== ''; @@ -119,7 +119,7 @@ var FormcodeSelect = React.createClass({ } }); -var FormcodeSelectField = React.createClass({ +var FormcodeSelectField = createReactClass({ handleChange: function() { this.props.handler(this.props.id); }, diff --git a/src/onegov/form/assets/js/snippets.jsx b/src/onegov/form/assets/js/snippets.jsx index faf12359e2..cc84494a67 100644 --- a/src/onegov/form/assets/js/snippets.jsx +++ b/src/onegov/form/assets/js/snippets.jsx @@ -4,7 +4,7 @@ */ // Renders the formsnippets given by FormApp -var FormSnippets = React.createClass({ +var FormSnippets = createReactClass({ render: function() { var self = this; @@ -36,7 +36,7 @@ var FormSnippets = React.createClass({ }); // Renders a single formsnippet and handles the insertion logic -var FormSnippet = React.createClass({ +var FormSnippet = createReactClass({ insertSnippet: function(snippet) { formcodeUtils.updateTarget(this.props.target, snippet, this.props.snippet[0]); }, diff --git a/src/onegov/form/assets/js/togglebutton.jsx b/src/onegov/form/assets/js/togglebutton.jsx index d839d7cad3..8f19741f8f 100644 --- a/src/onegov/form/assets/js/togglebutton.jsx +++ b/src/onegov/form/assets/js/togglebutton.jsx @@ -1,7 +1,7 @@ // Takes its children and wraps them in a toggleable element, which is a button // that pops up a menu when clicked. -var ToggleButton = React.createClass({ // eslint-disable-line no-unused-vars +var ToggleButton = createReactClass({ // eslint-disable-line no-unused-vars getInitialState: function() { return { visible: false diff --git a/src/onegov/form/assets/js/watcher.jsx b/src/onegov/form/assets/js/watcher.jsx index 8d96af4495..c9932bf55c 100644 --- a/src/onegov/form/assets/js/watcher.jsx +++ b/src/onegov/form/assets/js/watcher.jsx @@ -58,7 +58,7 @@ var FormcodeWatcherRegistry = function() { window.formcodeWatcherRegistry = FormcodeWatcherRegistry(); -var WatchedFields = React.createClass({ +var WatchedFields = createReactClass({ getInitialState: function() { return {fields: []}; }, diff --git a/src/onegov/org/app.py b/src/onegov/org/app.py index 47500e8845..81d19b0e94 100644 --- a/src/onegov/org/app.py +++ b/src/onegov/org/app.py @@ -735,6 +735,7 @@ def get_editor_asset() -> 'Iterator[str]': @OrgApp.webasset('timeline') def get_timeline_asset() -> 'Iterator[str]': + yield 'react-transition-group.js' yield 'timeline.jsx' @@ -805,8 +806,9 @@ def get_common_asset() -> 'Iterator[str]': yield 'foundation.topbar.js' yield 'intercooler.js' yield 'underscore.js' - yield 'react.js' - yield 'react-dom.js' + yield 'react.min.js' + yield 'react-dom.min.js' + yield 'create-react-class.min.js' yield 'form_dependencies.js' yield 'confirm.jsx' yield 'typeahead.jsx' diff --git a/src/onegov/org/assets/js/confirm.jsx b/src/onegov/org/assets/js/confirm.jsx index 9588087f9a..29548b516a 100644 --- a/src/onegov/org/assets/js/confirm.jsx +++ b/src/onegov/org/assets/js/confirm.jsx @@ -21,7 +21,7 @@ Renders the zurb foundation reveal model. Takes question, yes and no as options (those are the texts for the respective elements). */ -var Confirmation = React.createClass({ +var Confirmation = createReactClass({ render: function() { return (
{this.props.info}
@@ -58,7 +58,10 @@ var Prompt = React.createClass({ */ var showPrompt = function(options) { var el = $("