diff --git a/website_mail_snippet_responsive/README.rst b/website_mail_snippet_responsive/README.rst index 9f4c9194..f2832df7 100644 --- a/website_mail_snippet_responsive/README.rst +++ b/website_mail_snippet_responsive/README.rst @@ -22,6 +22,16 @@ This module is prepared to be compatible with module ``website_mail_bg_color``. If you install it, you will be able to change snippets' background colors, but it is not required. +Configuration +============= + +To change the default background color for buttons: + +* Go to *Settings > Configuration > Website Settings > Mail > + Mail button color*. +* Input `any valid CSS2 color value + `_. + Usage ===== @@ -51,6 +61,17 @@ Known issues / Roadmap will insert a ``
`` in Firefox, that will make it seem like its height is at least like a caret, even if you set a lower value. Do not worry, it goes away when you press *Save*. +* Some elements do not render with the proper width in MS Outlook. This should + be added inside each snippet to make them work:: + + + + But right now the view parser eats comments, and if you avoid that then + CKEditor will eat them, so there's not an easy solution for now. Bug Tracker =========== diff --git a/website_mail_snippet_responsive/__init__.py b/website_mail_snippet_responsive/__init__.py index e69de29b..0650744f 100644 --- a/website_mail_snippet_responsive/__init__.py +++ b/website_mail_snippet_responsive/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/website_mail_snippet_responsive/__openerp__.py b/website_mail_snippet_responsive/__openerp__.py index 8435d9db..46c2fc69 100644 --- a/website_mail_snippet_responsive/__openerp__.py +++ b/website_mail_snippet_responsive/__openerp__.py @@ -4,7 +4,7 @@ { "name": "Responsive Layout Snippets for Writing Emails", "summary": "Well... pseudo-responsive (see description)", - "version": "8.0.1.0.0", + "version": "8.0.1.1.0", "category": "Marketing", "website": "http://www.antiun.com", "author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)", @@ -19,10 +19,12 @@ ], "data": [ "views/assets.xml", + "views/res_config_view.xml", "views/templates.xml", "views/snippet_1_col.xml", "views/snippet_2_cols.xml", "views/snippet_3_cols.xml", + "views/snippet_event_date.xml", "views/snippet_hr.xml", "views/snippet_img_text.xml", "views/snippet_text_img.xml", diff --git a/website_mail_snippet_responsive/models/__init__.py b/website_mail_snippet_responsive/models/__init__.py new file mode 100644 index 00000000..1e58f775 --- /dev/null +++ b/website_mail_snippet_responsive/models/__init__.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel +# (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0. + +from . import res_config +from . import website diff --git a/website_mail_snippet_responsive/models/res_config.py b/website_mail_snippet_responsive/models/res_config.py new file mode 100644 index 00000000..ce78411c --- /dev/null +++ b/website_mail_snippet_responsive/models/res_config.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# © 2016 Incaser Informatica S.L. - Sergio Teruel +# © 2016 Incaser Informatica S.L. - Carlos Dauden +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from openerp import models, fields + + +class WebsiteMailSippetResponsive(models.TransientModel): + _name = 'website.config.settings' + _inherit = ['website.config.settings'] + + mail_button_color = fields.Char(related='website_id.mail_button_color') diff --git a/website_mail_snippet_responsive/models/website.py b/website_mail_snippet_responsive/models/website.py new file mode 100644 index 00000000..86944c40 --- /dev/null +++ b/website_mail_snippet_responsive/models/website.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# (c) 2015 Antiun Ingeniería S.L. - Sergio Teruel +# (c) 2015 Antiun Ingeniería S.L. - Carlos Dauden +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0. + +from openerp import models, fields + + +class Website(models.Model): + _inherit = 'website' + + mail_button_color = fields.Char(default='#00B518') diff --git a/website_mail_snippet_responsive/static/src/img/snippet_1_col.png b/website_mail_snippet_responsive/static/src/img/snippet_1_col.png index 6f39c4d1..e258e330 100644 Binary files a/website_mail_snippet_responsive/static/src/img/snippet_1_col.png and b/website_mail_snippet_responsive/static/src/img/snippet_1_col.png differ diff --git a/website_mail_snippet_responsive/static/src/img/snippet_2_cols.png b/website_mail_snippet_responsive/static/src/img/snippet_2_cols.png index c9e18815..47ad23d3 100644 Binary files a/website_mail_snippet_responsive/static/src/img/snippet_2_cols.png and b/website_mail_snippet_responsive/static/src/img/snippet_2_cols.png differ diff --git a/website_mail_snippet_responsive/static/src/img/snippet_3_cols.png b/website_mail_snippet_responsive/static/src/img/snippet_3_cols.png index 4afd7cfd..8a6e801c 100644 Binary files a/website_mail_snippet_responsive/static/src/img/snippet_3_cols.png and b/website_mail_snippet_responsive/static/src/img/snippet_3_cols.png differ diff --git a/website_mail_snippet_responsive/static/src/img/snippet_event_date.png b/website_mail_snippet_responsive/static/src/img/snippet_event_date.png new file mode 100644 index 00000000..596bae4e Binary files /dev/null and b/website_mail_snippet_responsive/static/src/img/snippet_event_date.png differ diff --git a/website_mail_snippet_responsive/static/src/img/snippet_hr.png b/website_mail_snippet_responsive/static/src/img/snippet_hr.png index 1c5e0fe1..8f067149 100644 Binary files a/website_mail_snippet_responsive/static/src/img/snippet_hr.png and b/website_mail_snippet_responsive/static/src/img/snippet_hr.png differ diff --git a/website_mail_snippet_responsive/static/src/img/snippet_img_text.png b/website_mail_snippet_responsive/static/src/img/snippet_img_text.png index 01fe19ce..ce001051 100644 Binary files a/website_mail_snippet_responsive/static/src/img/snippet_img_text.png and b/website_mail_snippet_responsive/static/src/img/snippet_img_text.png differ diff --git a/website_mail_snippet_responsive/static/src/img/snippet_text_img.png b/website_mail_snippet_responsive/static/src/img/snippet_text_img.png index 815dd29b..11a2b348 100644 Binary files a/website_mail_snippet_responsive/static/src/img/snippet_text_img.png and b/website_mail_snippet_responsive/static/src/img/snippet_text_img.png differ diff --git a/website_mail_snippet_responsive/views/res_config_view.xml b/website_mail_snippet_responsive/views/res_config_view.xml new file mode 100644 index 00000000..ec22513f --- /dev/null +++ b/website_mail_snippet_responsive/views/res_config_view.xml @@ -0,0 +1,24 @@ + + + + + + Email Application + website.config.settings + + + + + + + + + + + \ No newline at end of file diff --git a/website_mail_snippet_responsive/views/snippet_1_col.xml b/website_mail_snippet_responsive/views/snippet_1_col.xml index 7fed6a93..f417f178 100644 --- a/website_mail_snippet_responsive/views/snippet_1_col.xml +++ b/website_mail_snippet_responsive/views/snippet_1_col.xml @@ -12,9 +12,6 @@ Big image + Text + Button (1 column) - - - @@ -41,7 +38,7 @@ - +
Learn moreLearn more
diff --git a/website_mail_snippet_responsive/views/snippet_2_cols.xml b/website_mail_snippet_responsive/views/snippet_2_cols.xml index 5b2ba139..c0c025c0 100644 --- a/website_mail_snippet_responsive/views/snippet_2_cols.xml +++ b/website_mail_snippet_responsive/views/snippet_2_cols.xml @@ -12,110 +12,107 @@ Image + Text + Button (2 columns) - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - -
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
-
- - - - - - -
- - - - - - -
Learn more
-
-
-
+ + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + +
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
+
+ + + + + + +
+ + + + + + +
Learn more
+
+
+
- - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - -
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
-
- - - - - - -
- - - - - - -
Learn more
-
-
-
+ + + + + + +
+ + + + + + + + + + + + +
+ + + + + + + + + +
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
+
+ + + + + + +
+ + + + + + +
Learn more
+
+
+
diff --git a/website_mail_snippet_responsive/views/snippet_3_cols.xml b/website_mail_snippet_responsive/views/snippet_3_cols.xml index 90cbf4bb..8b276d80 100644 --- a/website_mail_snippet_responsive/views/snippet_3_cols.xml +++ b/website_mail_snippet_responsive/views/snippet_3_cols.xml @@ -11,162 +11,160 @@ Image + Text + Button (3 columns) - - - - + + - - - - - + + +
- - - - - - - - - - + + +
- - - - - - - - - -
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
-
- +
+ + + + + +
+ + + + + + + + + + - - -
+ + + + + + + + + +
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
+
+ + + + - - -
+ - +
- - - - - - -
Learn more
-
Learn more
-
-
+
+
+
- - - - - + + +
- - - - - - - - - - + + +
- - - - - - - - - -
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
-
- + + +
+ + + + + +
+ + + + + + + + + + - - -
+ + + + + + + + + +
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
+
+ + + + - - -
+ - +
- - - - - - -
Learn more
-
Learn more
-
-
+
+
+
- + - - - - + + +
- - - - - - - - - - + + +
- - - - - - - - - -
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
-
- +
+ + + + + +
+ + + + + + + + + + - - -
+ + + + + + + + + +
Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum.
+
+ + + + - - -
+ - +
- - - - - - -
Learn more
-
Learn more
-
-
+
+
+
diff --git a/website_mail_snippet_responsive/views/snippet_event_date.xml b/website_mail_snippet_responsive/views/snippet_event_date.xml new file mode 100644 index 00000000..08563ce7 --- /dev/null +++ b/website_mail_snippet_responsive/views/snippet_event_date.xml @@ -0,0 +1,113 @@ + + + + + + + + + + diff --git a/website_mail_snippet_responsive/views/snippet_hr.xml b/website_mail_snippet_responsive/views/snippet_hr.xml index f5cffafe..3765d3fe 100644 --- a/website_mail_snippet_responsive/views/snippet_hr.xml +++ b/website_mail_snippet_responsive/views/snippet_hr.xml @@ -25,10 +25,7 @@ Horizontal Separator - - - - diff --git a/website_mail_snippet_responsive/views/snippet_img_text.xml b/website_mail_snippet_responsive/views/snippet_img_text.xml index 5f90495e..973dc85d 100644 --- a/website_mail_snippet_responsive/views/snippet_img_text.xml +++ b/website_mail_snippet_responsive/views/snippet_img_text.xml @@ -12,9 +12,6 @@ Left Image, Right Text + Button - - - @@ -56,7 +53,7 @@ - +
Learn moreLearn more
diff --git a/website_mail_snippet_responsive/views/snippet_text_img.xml b/website_mail_snippet_responsive/views/snippet_text_img.xml index f67121ed..5084adb7 100644 --- a/website_mail_snippet_responsive/views/snippet_text_img.xml +++ b/website_mail_snippet_responsive/views/snippet_text_img.xml @@ -12,9 +12,6 @@ Left Text and Button, Right Image - - - @@ -39,7 +36,7 @@ - +
Learn moreLearn more