summaryrefslogtreecommitdiff
path: root/addons/website_forum/static/src/js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-07-05 16:14:48 +0200
committerChristophe Simonis <chs@odoo.com>2019-07-05 16:14:48 +0200
commit66bb578ac9f0cc260a5b7f859fc0bb4fcfab6e25 (patch)
tree57b147168f7118374f0f5b4ba46f4c9d75220df2 /addons/website_forum/static/src/js
parent201c5b5878f13c34cb7a9edb3c3296fc9a1944fe (diff)
parentbe5e8fdab800ff1fd9e953ec64801f96bcc3dac5 (diff)
[MERGE] forward port branch saas-12.2 up to be5e8fdab80
Diffstat (limited to 'addons/website_forum/static/src/js')
-rw-r--r--addons/website_forum/static/src/js/website_forum.js40
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 bdd1de724a4..88dd7e222a7 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 @@ 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',
@@ -214,43 +211,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');
- 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');
},