summaryrefslogtreecommitdiff
path: root/addons/website_forum/static/src/js
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-07-15 07:07:48 +0000
committerMartin Trigaux <mat@odoo.com>2019-07-15 08:12:26 +0000
commitfd15ca19183a765e1307c4d197bf0dda30b73ab7 (patch)
tree896042073ebc752e8bcf535f21696320c69bbe13 /addons/website_forum/static/src/js
parent6b8a0beda65dce688ecd0ee34828097b67a13dab (diff)
parent1f5a4649a67908ecb6acfec37673c8149de0471f (diff)
[MERGE] Forward port of saas-12.4 to master up to 1f5a4649a67908
closes odoo/odoo#34850 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'addons/website_forum/static/src/js')
-rw-r--r--addons/website_forum/static/src/js/website_forum.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js
index e25be65ba48..9528a9b5e73 100644
--- a/addons/website_forum/static/src/js/website_forum.js
+++ b/addons/website_forum/static/src/js/website_forum.js
@@ -18,9 +18,6 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({
'click .karma_required': '_onKarmaRequiredClick',
'mouseenter .o_js_forum_tag_follow': '_onTagFollowBoxMouseEnter',
'mouseleave .o_js_forum_tag_follow': '_onTagFollowBoxMouseLeave',
- 'click .o_forum_profile_pic_edit': '_onEditProfilePicClick',
- 'change .o_forum_file_upload': '_onFileUploadChange',
- 'click .o_forum_profile_pic_clear': '_onProfilePicClearClick',
'mouseenter .o_forum_user_info': '_onUserInfoMouseEnter',
'mouseleave .o_forum_user_info': '_onUserInfoMouseLeave',
'mouseleave .o_forum_user_bio_expand': '_onUserBioExpandMouseLeave',
@@ -218,41 +215,6 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({
* @private
* @param {Event} ev
*/
- _onEditProfilePicClick: function (ev) {
- ev.preventDefault();
- $(ev.currentTarget).closest('form').find('.o_forum_file_upload').trigger('click');
- },
- /**
- * @private
- * @param {Event} ev
- */
- _onFileUploadChange: function (ev) {
- if (!ev.currentTarget.files.length) {
- return;
- }
- var $form = $(ev.currentTarget).closest('form');
- utils.getDataURLFromFile(ev.currentTarget.files[0]).then(function (result) {
- $form.find('.o_forum_avatar_img').attr('src', result);
- });
- $form.find('#forum_clear_image').remove();
- },
- /**
- * @private
- * @param {Event} ev
- */
- _onProfilePicClearClick: function (ev) {
- var $form = $(ev.currentTarget).closest('form');
- $form.find('.o_forum_avatar_img').attr('src', '/web/static/src/img/placeholder.png');
- $form.append($('<input/>', {
- name: 'clear_image',
- id: 'forum_clear_image',
- type: 'hidden',
- }));
- },
- /**
- * @private
- * @param {Event} ev
- */
_onUserInfoMouseEnter: function (ev) {
$(ev.currentTarget).parent().find('.o_forum_user_bio_expand').delay(500).toggle('fast');
},