[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
This commit is contained in:
qsm-odoo
2019-01-25 11:04:24 +00:00
parent 37e0c5787a
commit 04fcbc7b22
4 changed files with 16 additions and 30 deletions
@@ -1,7 +0,0 @@
odoo.define('web_editor.ready', function (require) {
'use strict';
var base = require('web_editor.base');
return base.ready();
});
@@ -1,7 +1,7 @@
odoo.define('website.editor.menu.translate', function (require) {
'use strict';
require('web_editor.ready');
require('web.dom_ready');
var core = require('web.core');
var Dialog = require('web.Dialog');
var localStorage = require('web.local_storage');
@@ -18,7 +18,6 @@ var _t = core._t;
var localStorageNoDialogKey = 'website_translator_nodialog';
var TranslatorInfoDialog = Dialog.extend({
template: 'website.TranslatorInfoDialog',
xmlDependencies: Dialog.prototype.xmlDependencies.concat(
@@ -59,7 +58,7 @@ var TranslatorMenu = EditorMenu.extend({
/**
* @override
*/
start: function () {
start: function () {
if (!localStorage.getItem(localStorageNoDialogKey)) {
new TranslatorInfoDialog(this).open();
}
@@ -51,7 +51,6 @@
<script type="text/javascript" src="/website/static/src/js/utils.js"/>
<script type="text/javascript" src="/website/static/src/js/website.js"/>
<script type="text/javascript" src="/website/static/src/js/content/ready.js"/>
<script type="text/javascript" src="/website/static/src/js/content/context.js"/>
<script type="text/javascript" src="/website/static/src/js/content/compatibility.js"/>
<script type="text/javascript" src="/website/static/src/js/content/lazy_template_call.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;
});