[MERGE] forward port branch saas-11.3 up to 5f419d4ad3
This commit is contained in:
@@ -1331,6 +1331,6 @@ class WebsiteRedirect(models.Model):
|
||||
type = fields.Selection([('301', 'Moved permanently (301)'), ('302', 'Moved temporarily (302)')], string='Redirection Type', required=True, default='301')
|
||||
url_from = fields.Char('Redirect From', required=True)
|
||||
url_to = fields.Char('Redirect To', required=True)
|
||||
website_id = fields.Many2one('website', 'Website')
|
||||
website_id = fields.Many2one('website', 'Website', ondelete='cascade')
|
||||
active = fields.Boolean(default=True)
|
||||
sequence = fields.Integer()
|
||||
|
||||
@@ -20,6 +20,7 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
|
||||
custom_events: _.extend({}, websiteNavbarData.WebsiteNavbarActionWidget.custom_events || {}, {
|
||||
content_will_be_destroyed: '_onContentWillBeDestroyed',
|
||||
content_was_recreated: '_onContentWasRecreated',
|
||||
snippet_will_be_cloned: '_onSnippetWillBeCloned',
|
||||
snippet_cloned: '_onSnippetCloned',
|
||||
snippet_dropped: '_onSnippetDropped',
|
||||
}),
|
||||
@@ -146,9 +147,22 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
|
||||
$target: ev.data.$target,
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Called when a snippet is about to be cloned in the page. Notifies the
|
||||
* WebsiteRoot that is should destroy the animations for this snippet.
|
||||
*
|
||||
* @private
|
||||
* @param {OdooEvent} ev
|
||||
*/
|
||||
_onSnippetWillBeCloned: function (ev) {
|
||||
this.trigger_up('animation_stop_demand', {
|
||||
$target: ev.data.$target,
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Called when a snippet is cloned in the page. Notifies the WebsiteRoot
|
||||
* that is should start the animations for this snippet.
|
||||
* that is should start the animations for this snippet and the snippet it
|
||||
* was cloned from.
|
||||
*
|
||||
* @private
|
||||
* @param {OdooEvent} ev
|
||||
@@ -158,6 +172,13 @@ var EditPageMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
|
||||
editableMode: true,
|
||||
$target: ev.data.$target,
|
||||
});
|
||||
// TODO: remove in saas-12.5, undefined $origin will restart #wrapwrap
|
||||
if (ev.data.$origin) {
|
||||
this.trigger_up('animation_start_demand', {
|
||||
editableMode: true,
|
||||
$target: ev.data.$origin,
|
||||
});
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Called when a snippet is dropped in the page. Notifies the WebsiteRoot
|
||||
|
||||
Reference in New Issue
Block a user