summaryrefslogtreecommitdiff
path: root/addons/website_forum/static
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2019-02-07 16:41:52 +0000
committerqsm-odoo <qsm@odoo.com>2019-02-26 17:09:22 +0000
commit335a505d1f9b6a978c0fe0f6ea760a45b0d0a67f (patch)
tree208507b876971e1b8a4f25077a16262e3a95dfcd /addons/website_forum/static
parent27fca749af30d7dce448f6632132422df8d8a7c1 (diff)
[REF] website, *: move and review the notion of edit mode
* portal, sale, web, website_blog, website_crm_partner_assign, website_forum, website_event_track, website_links, website_mail, website_slides, website_mail_channel, website_mass_mailing, website_sale, website_sale_comparison, website_sale_delivery, website_sale_wishlist The `editableMode` option and its related options in public widget should only be part of website, this commit moves them there. This is also the occasion to implement something that is long overdue: stop creating 'animations' / public widgets in edit mode by default. Indeed, lots of 'animations' were defined by beginning with 'if not edit mode'. Now, if a public widget should be considered in edit mode, it must be defined explicitely through a property at *definition* of the widget. Part of https://github.com/odoo/odoo/pull/29442 task-1932066
Diffstat (limited to 'addons/website_forum/static')
-rw-r--r--addons/website_forum/static/src/js/website_forum.js4
-rw-r--r--addons/website_forum/static/src/js/website_forum.share.js8
2 files changed, 6 insertions, 6 deletions
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js
index 613163a045a..d1ce5b18f5c 100644
--- a/addons/website_forum/static/src/js/website_forum.js
+++ b/addons/website_forum/static/src/js/website_forum.js
@@ -12,7 +12,7 @@ var _t = core._t;
sAnimations.registry.websiteForum = sAnimations.Class.extend({
selector: '.website_forum',
xmlDependencies: ['/website_forum/static/src/xml/website_forum_share_templates.xml'],
- read_events: {
+ events: {
'click .karma_required': '_onKarmaRequiredClick',
'mouseenter .o_js_forum_tag_follow': '_onTagFollowBoxMouseEnter',
'mouseleave .o_js_forum_tag_follow': '_onTagFollowBoxMouseLeave',
@@ -506,7 +506,7 @@ sAnimations.registry.websiteForum = sAnimations.Class.extend({
sAnimations.registry.websiteForumSpam = sAnimations.Class.extend({
selector: '.o_wforum_moderation_queue',
xmlDependencies: ['/website_forum/static/src/xml/website_forum_share_templates.xml'],
- read_events: {
+ events: {
'click .o_wforum_select_all_spam': '_onSelectallSpamClick',
'click .o_wforum_mark_spam': 'async _onMarkSpamClick',
'input #spamSearch': '_onSpamSearchInput',
diff --git a/addons/website_forum/static/src/js/website_forum.share.js b/addons/website_forum/static/src/js/website_forum.share.js
index c1d0d8a1b4a..0fea6e4ef9c 100644
--- a/addons/website_forum/static/src/js/website_forum.share.js
+++ b/addons/website_forum/static/src/js/website_forum.share.js
@@ -11,15 +11,15 @@ var ForumShare = sAnimations.registry.socialShare.extend({
selector: '',
xmlDependencies: sAnimations.registry.socialShare.prototype.xmlDependencies
.concat(['/website_forum/static/src/xml/website_forum_share_templates.xml']),
- read_events: {},
+ events: {},
/**
* @override
* @param {Object} parent
- * @param {boolean} editableMode
+ * @param {Object} options
* @param {string} targetType
*/
- init: function (parent, editableMode, targetType) {
+ init: function (parent, options, targetType) {
this._super.apply(this, arguments);
this.targetType = targetType;
},
@@ -71,7 +71,7 @@ var ForumShare = sAnimations.registry.socialShare.extend({
sAnimations.registry.websiteForumShare = sAnimations.Class.extend({
selector: '.website_forum',
- read_events: {
+ events: {
'click :not(.karma_required).oe_social_share_call': '_onShareCallClick',
},