diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-01-25 11:04:24 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-01-25 11:04:24 +0000 |
| commit | 04fcbc7b2291f8e64a0cf2b270134608f27b9e7a (patch) | |
| tree | 83be973187ec7a197272cee23651343172a29ae0 /addons/website_event/static | |
| parent | 37e0c5787a633e535d690c8e36f3081e5254667e (diff) | |
[REF] website, *: remove 'web_editor.ready'
* website_event
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
'web_editor.ready' was moved to website without being renamed.
Following https://github.com/odoo/odoo/pull/30409, this will remove
that 'web_editor.ready' module.
See upcoming improvements with https://github.com/odoo/odoo/pull/29442
closes odoo/odoo#30548
Diffstat (limited to 'addons/website_event/static')
| -rw-r--r-- | addons/website_event/static/src/js/website_event.js | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/addons/website_event/static/src/js/website_event.js b/addons/website_event/static/src/js/website_event.js index 5558dc50d4c..5ed22d17087 100644 --- a/addons/website_event/static/src/js/website_event.js +++ b/addons/website_event/static/src/js/website_event.js @@ -1,27 +1,9 @@ -odoo.define('website_event.registration_form.instance', function (require) { -'use strict'; - -require('web_editor.ready'); -var EventRegistrationForm = require('website_event.website_event'); - -var $form = $('#registration_form'); -if (!$form.length) { - return null; -} - -var instance = new EventRegistrationForm(); -return instance.appendTo($form).then(function () { - return instance; -}); -}); - -//============================================================================== - odoo.define('website_event.website_event', function (require) { var ajax = require('web.ajax'); var core = require('web.core'); var Widget = require('web.Widget'); +var sAnimations = require('website.content.snippets.animation'); var _t = core._t; @@ -74,5 +56,18 @@ var EventRegistrationForm = Widget.extend({ }, }); +sAnimations.registry.EventRegistrationFormInstance = sAnimations.Class.extend({ + selector: '#registration_form', + + /** + * @override + */ + start: function () { + var def = this._super.apply(this, arguments); + var instance = new EventRegistrationForm(this); + return $.when(def, instance.appendTo(this.$el)); + }, +}); + return EventRegistrationForm; }); |
