diff options
| author | Dharmraj Jhala <dja@openerp.com> | 2014-10-29 11:30:57 +0530 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2015-08-11 16:12:33 +0200 |
| commit | bc50f53d653b41fbf342489e63e9b161a751c4d0 (patch) | |
| tree | 65939ae6d262cb6b5b6a0178330f33e0ad79bb66 /addons/website_forum/static/src | |
| parent | 0a2f036d46b15661b690a0ccaf20a1310f7c33a7 (diff) | |
[IMP] website_forum: extended biography
The biography of established users (with high karma) can be seen
with an expanded tooltip. This gives to users that participate
some kind of reward and gratitude of their work.
Diffstat (limited to 'addons/website_forum/static/src')
| -rw-r--r-- | addons/website_forum/static/src/css/website_forum.css | 30 | ||||
| -rw-r--r-- | addons/website_forum/static/src/css/website_forum.sass | 31 | ||||
| -rw-r--r-- | addons/website_forum/static/src/js/website_forum.js | 17 |
3 files changed, 76 insertions, 2 deletions
diff --git a/addons/website_forum/static/src/css/website_forum.css b/addons/website_forum/static/src/css/website_forum.css index 2e1a4ebaa38..3a6deee2560 100644 --- a/addons/website_forum/static/src/css/website_forum.css +++ b/addons/website_forum/static/src/css/website_forum.css @@ -45,11 +45,15 @@ height: auto !important; } -img.img-avatar { +img.o_forum_avatar { max-height: 40px; margin-right: 10px; } +img.o_forum_avatar_big { + max-width: 75px; + margin-right: 10px; } + .oe_grey { background-color: #eeeeee; } @@ -143,3 +147,27 @@ button.btn-link.text-muted { color: #999; } +.o_forum_user_bio_expand { + position: absolute; + z-index: 200; + display: none; } + +.o_forum_tooltip_heading { + padding: 0px; + margin: 0px; + font-size: 18px; } + +.o_forum_user_bio { + color: black; + width: 318px; + min-height: 100px; + cursor: auto; + border: 1px solid darkgray; + background-color: whitesmoke; + line-height: 13px; + font-size: 11px; + word-wrap: break-word; } + .o_forum_user_bio .o_forum_tooltip_line { + min-height: 13px; } + .o_forum_user_bio .o_forum_tooltip_header { + min-height: 75px; } diff --git a/addons/website_forum/static/src/css/website_forum.sass b/addons/website_forum/static/src/css/website_forum.sass index 4cfa6e97c74..3e2fa55557f 100644 --- a/addons/website_forum/static/src/css/website_forum.sass +++ b/addons/website_forum/static/src/css/website_forum.sass @@ -36,10 +36,14 @@ max-width: 600px height: auto !important -img.img-avatar +img.o_forum_avatar max-height: 40px margin-right: 10px +img.o_forum_avatar_big + max-width: 75px + margin-right: 10px + .oe_grey background-color: #eeeeee @@ -112,3 +116,28 @@ a.no-decoration button.btn-link.text-muted color: #999 + +.o_forum_user_bio_expand + position: absolute + z-index: 200 + display: none + +.o_forum_tooltip_heading + padding: 0px + margin: 0px + font-size: 18px + +.o_forum_user_bio + color: black + width: 318px + min-height: 100px + cursor: auto + border: 1px solid darkgray + background-color: whitesmoke + line-height: 13px + font-size: 11px + word-wrap: break-word + .o_forum_tooltip_line + min-height: 13px + .o_forum_tooltip_header + min-height: 75px diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index e3cb3d38d20..a0be5e8cef9 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -28,6 +28,23 @@ if(!$('.website_forum').length) { } }); + // Extended user biography toogle + $('.o_forum_user_info').hover( + function () { + $(this).parent().find('.o_forum_user_bio_expand').delay(500).toggle('fast'); + }, + function () { + $(this).parent().find('.o_forum_user_bio_expand').clearQueue(); + } + ); + + $('.o_forum_user_bio_expand').hover( + function () {}, + function () { + $(this).fadeOut('fast'); + } + ); + $('.vote_up,.vote_down').not('.karma_required').on('click', function (ev) { ev.preventDefault(); var $link = $(ev.currentTarget); |
