diff options
| author | mgh-odoo <mgh@odoo.com> | 2019-06-14 08:46:31 +0000 |
|---|---|---|
| committer | mgh-odoo <mgh@odoo.com> | 2019-06-28 05:02:45 +0000 |
| commit | 798aa51a00592427e332c7638956b2406f2d7b87 (patch) | |
| tree | 884f27f0bccf8d9407acba906ba8210c1c35f9fd /addons/website_forum/static/src | |
| parent | 4a748da4b0aa0c1460804337ce6a4068808689b8 (diff) | |
[FIX] website_{profile, forum}: migrate events from forum to profile
After this commit https://github.com/odoo/odoo/commit/ff870099c588e56 some of the events are left
in website_forum, that caused some buttons to be inactive. In order to fix that
events moved to website_profile.
Note: code is moved as it is. Cleaning class / namespace will be done in master
to avoid issues due to stable version.
Related to task 2006045
closes odoo/odoo#34138
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website_forum/static/src')
| -rw-r--r-- | addons/website_forum/static/src/js/website_forum.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index 9acf9965982..900f6d9ccd0 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -17,9 +17,6 @@ sAnimations.registry.websiteForum = sAnimations.Class.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', @@ -214,43 +211,6 @@ sAnimations.registry.websiteForum = sAnimations.Class.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'); - var reader = new window.FileReader(); - reader.onload = function (ev) { - $form.find('.o_forum_avatar_img').attr('src', ev.target.result); - }; - reader.readAsDataURL(ev.currentTarget.files[0]); - $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'); }, |
