mirror of https://github.com/OCA/social.git
Chooser -> Picker
parent
df99d41399
commit
21619a3fc9
|
@ -3,7 +3,7 @@
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
|
|
||||||
=======================================
|
=======================================
|
||||||
Email Snippets Background Color Chooser
|
Email Snippets Background Color Picker
|
||||||
=======================================
|
=======================================
|
||||||
|
|
||||||
This module extends the functionality of the website mail designer to support
|
This module extends the functionality of the website mail designer to support
|
||||||
|
@ -18,7 +18,7 @@ To use this module, you need to:
|
||||||
``mass_mailing``.
|
``mass_mailing``.
|
||||||
#. Edit an email with the website mail designer.
|
#. Edit an email with the website mail designer.
|
||||||
#. Drag & drop any snippet into the mail body.
|
#. Drag & drop any snippet into the mail body.
|
||||||
#. Choose *Customize > Choose Background Color*.
|
#. Click *Customize > Pick Background Color*.
|
||||||
#. Pick any color, or enter its HTML code in the box, or press *Clear* to
|
#. Pick any color, or enter its HTML code in the box, or press *Clear* to
|
||||||
remove it.
|
remove it.
|
||||||
#. Press OK.
|
#. Press OK.
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# © 2016 Antiun Ingeniería S.L. - Jairo Llopis
|
# © 2016 Antiun Ingeniería S.L. - Jairo Llopis
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
{
|
{
|
||||||
"name": "Email Snippets Background Color Chooser",
|
"name": "Email Snippets Background Color Picker",
|
||||||
"summary": "Set any background color for any mail editor snippet",
|
"summary": "Set any background color for any mail editor snippet",
|
||||||
"version": "8.0.1.0.0",
|
"version": "8.0.1.0.0",
|
||||||
"category": "Marketing",
|
"category": "Marketing",
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
"installable": True,
|
"installable": True,
|
||||||
"images": [
|
"images": [
|
||||||
"images/click_option.png",
|
"images/click_option.png",
|
||||||
"images/color_chooser.png",
|
"images/color_picker.png",
|
||||||
"images/color_set.png",
|
"images/color_set.png",
|
||||||
],
|
],
|
||||||
"depends": [
|
"depends": [
|
||||||
|
|
|
@ -19,5 +19,5 @@ msgstr ""
|
||||||
|
|
||||||
#. module: website_mail_snippet_bg_color
|
#. module: website_mail_snippet_bg_color
|
||||||
#: view:website:website_mail.email_designer_snippets
|
#: view:website:website_mail.email_designer_snippets
|
||||||
msgid "Choose Background Color"
|
msgid "Pick Background Color"
|
||||||
msgstr "Escoger el color de fondo"
|
msgstr "Escoger el color de fondo"
|
||||||
|
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
@ -5,16 +5,16 @@
|
||||||
(function ($) {
|
(function ($) {
|
||||||
var snippet = openerp.website.snippet;
|
var snippet = openerp.website.snippet;
|
||||||
|
|
||||||
snippet.options.bg_color_chooser = snippet.Option.extend({
|
snippet.options.bg_color_picker = snippet.Option.extend({
|
||||||
start: function () {
|
start: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
self._super();
|
self._super();
|
||||||
return self.$el.find(".js_bg_color_chooser").click(function(){
|
return self.$el.find(".js_bg_color_picker").click(function(){
|
||||||
return self.choose();
|
return self.pick();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
choose: function() {
|
pick: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
return CKEDITOR.instances.wrapwrap.getColorFromDialog(
|
return CKEDITOR.instances.wrapwrap.getColorFromDialog(
|
||||||
function(color){
|
function(color){
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<template id="assets_editor" inherit_id="website.assets_editor">
|
<template id="assets_editor" inherit_id="website.assets_editor">
|
||||||
<xpath expr=".">
|
<xpath expr=".">
|
||||||
<script type="text/javascript"
|
<script type="text/javascript"
|
||||||
src="/website_mail_snippet_bg_color/static/src/js/bg_color_chooser.js"/>
|
src="/website_mail_snippet_bg_color/static/src/js/bg_color_picker.js"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,15 @@
|
||||||
inherit_id="website_mail.email_designer_snippets">
|
inherit_id="website_mail.email_designer_snippets">
|
||||||
<xpath expr="//div[@id='snippet_options']">
|
<xpath expr="//div[@id='snippet_options']">
|
||||||
<div
|
<div
|
||||||
data-snippet-option-id='bg_color_chooser'
|
data-snippet-option-id='bg_color_picker'
|
||||||
data-selector="[data-oe-field='body_html'] > div,
|
data-selector="[data-oe-field='body_html'] > div,
|
||||||
.oe_snippet_body,
|
.oe_snippet_body,
|
||||||
.bg_color_chooser"
|
.bg_color_picker"
|
||||||
data-selector-siblings="[data-oe-field='body_html'] > *"
|
data-selector-siblings="[data-oe-field='body_html'] > *"
|
||||||
data-selector-children="[data-oe-field='body_html']">
|
data-selector-children="[data-oe-field='body_html']">
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="button js_bg_color_chooser">
|
<a href="#" class="button js_bg_color_picker">
|
||||||
Choose Background Color
|
Pick Background Color
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue