diff options
| author | Thibault Delavallée <tde@openerp.com> | 2013-09-23 11:59:09 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2013-09-23 11:59:09 +0200 |
| commit | b34f746c36586b5f1a986e36d721513f95b88108 (patch) | |
| tree | a413050cabb83dd3a18299325934081ffed5d63f /addons/website_mail/static/src/css | |
| parent | 24854d71cbb78a1a71197d724c64ebc83673d504 (diff) | |
[ADD] website_mail: added templates, js and css to have a generic follow button.
Based on the same principle as publish, there is now a generic button to follow
or unfollow objects in openerp. This should replace all custom instance of
subscription in other addons.
bzr revid: tde@openerp.com-20130923095909-4p5aiswlwy14g32k
Diffstat (limited to 'addons/website_mail/static/src/css')
| -rw-r--r-- | addons/website_mail/static/src/css/Makefile | 2 | ||||
| -rw-r--r-- | addons/website_mail/static/src/css/website_mail.css | 40 | ||||
| -rw-r--r-- | addons/website_mail/static/src/css/website_mail.sass | 33 |
3 files changed, 75 insertions, 0 deletions
diff --git a/addons/website_mail/static/src/css/Makefile b/addons/website_mail/static/src/css/Makefile new file mode 100644 index 00000000000..d7c1ea77439 --- /dev/null +++ b/addons/website_mail/static/src/css/Makefile @@ -0,0 +1,2 @@ +sass: + sass -t expanded --unix-newlines --watch website_mail.sass:website_mail.css& diff --git a/addons/website_mail/static/src/css/website_mail.css b/addons/website_mail/static/src/css/website_mail.css new file mode 100644 index 00000000000..a93199a2ddf --- /dev/null +++ b/addons/website_mail/static/src/css/website_mail.css @@ -0,0 +1,40 @@ +/* ---- FOLLOW ---- */ +a[data-follow] { + text-decoration: none !important; + z-index: 2; +} +a[data-follow] .label { + padding: 5px 8px; +} +a[data-follow] .css_unfollow, a[data-follow] .css_follow, a[data-follow] .css_unfollowed, a[data-follow] .css_followed { + display: none; +} +a[data-follow][data-follow='off'] .css_unfollowed, a[data-follow][data-follow='off']:hover .css_follow { + display: inline; +} +a[data-follow][data-follow='off']:hover .css_unfollowed { + display: none; +} +a[data-follow][data-follow='on'] .css_followed, a[data-follow][data-follow='on']:hover .css_unfollow { + display: inline; +} +a[data-follow][data-follow='on']:hover .css_followed { + display: none; +} + +[data-follow='off']:not(a) > :not([data-follow]) { + opacity: 0.5; +} + +[data-follow]:not(a) { + position: relative; + overflow: visible; + /*&:hover > [data-follow] */ + /* display: block */ +} +[data-follow]:not(a) > [data-follow] { + position: absolute; + right: -6px; + top: -10px; + display: none; +} diff --git a/addons/website_mail/static/src/css/website_mail.sass b/addons/website_mail/static/src/css/website_mail.sass new file mode 100644 index 00000000000..b648270ec04 --- /dev/null +++ b/addons/website_mail/static/src/css/website_mail.sass @@ -0,0 +1,33 @@ + +/* ---- FOLLOW ---- */ +a[data-follow] + text-decoration: none !important + z-index: 2 + .label + padding: 5px 8px + .css_unfollow, .css_follow, .css_unfollowed, .css_followed + display: none + &[data-follow='off'] + .css_unfollowed, &:hover .css_follow + display: inline + &:hover .css_unfollowed + display: none + &[data-follow='on'] + .css_followed, &:hover .css_unfollow + display: inline + &:hover .css_followed + display: none + +[data-follow='off']:not(a) + >:not([data-follow]) + opacity: 0.5 +[data-follow]:not(a) + position: relative + overflow: visible + >[data-follow] + position: absolute + right: -6px + top: -10px + display: none + /*&:hover > [data-follow]*/ + /* display: block*/ |
