mirror of https://github.com/OCA/web.git
[IMP] web_editor_background_color: black, isort, prettier
parent
3d49143762
commit
ebd0ba3ca3
|
@ -10,14 +10,7 @@
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"application": False,
|
"application": False,
|
||||||
"installable": True,
|
"installable": True,
|
||||||
"images": [
|
"images": ["static/description/mass_mailing_editor.png"],
|
||||||
"static/description/mass_mailing_editor.png",
|
"depends": ["web_editor"],
|
||||||
],
|
"data": ["templates/assets.xml", "templates/editor.xml"],
|
||||||
"depends": [
|
|
||||||
"web_editor",
|
|
||||||
],
|
|
||||||
"data": [
|
|
||||||
"templates/assets.xml",
|
|
||||||
"templates/editor.xml",
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
odoo.define("web_editor_background_color.colorpicker", function(require) {
|
odoo.define("web_editor_background_color.colorpicker", function(require) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var ColorpickerDialog = require('web.colorpicker');
|
var ColorpickerDialog = require("web.colorpicker");
|
||||||
var options = require("web_editor.snippets.options");
|
var options = require("web_editor.snippets.options");
|
||||||
var colorpicker = options.registry.colorpicker;
|
var colorpicker = options.registry.colorpicker;
|
||||||
|
|
||||||
|
@ -39,8 +39,7 @@ odoo.define("web_editor_background_color.colorpicker", function (require) {
|
||||||
"background-color": event.data.cssColor,
|
"background-color": event.data.cssColor,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
var $custom = this.$el.find(
|
var $custom = this.$el.find(".o_colorpicker_section[data-name=custom]");
|
||||||
".o_colorpicker_section[data-name=custom]");
|
|
||||||
$custom.append($button);
|
$custom.append($button);
|
||||||
// Emulate a hover & click on that new button
|
// Emulate a hover & click on that new button
|
||||||
$button.mouseenter().click();
|
$button.mouseenter().click();
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<!-- Copyright 2017-2019 Jairo Llopis <jairo.llopis@tecnativa.com>
|
<!-- Copyright 2017-2019 Jairo Llopis <jairo.llopis@tecnativa.com>
|
||||||
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). -->
|
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). -->
|
||||||
|
|
||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<template id="assets_editor" inherit_id="web_editor.assets_editor">
|
<template id="assets_editor" inherit_id="web_editor.assets_editor">
|
||||||
<xpath expr=".">
|
<xpath expr=".">
|
||||||
<link rel="stylesheet" href="/web_editor_background_color/static/src/css/background_color.scss"/>
|
<link
|
||||||
<script type="text/javascript" src="/web_editor_background_color/static/src/js/background_color.js"/>
|
rel="stylesheet"
|
||||||
|
href="/web_editor_background_color/static/src/css/background_color.scss"
|
||||||
|
/>
|
||||||
|
<script
|
||||||
|
type="text/javascript"
|
||||||
|
src="/web_editor_background_color/static/src/js/background_color.js"
|
||||||
|
/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|
|
@ -4,7 +4,11 @@
|
||||||
<data>
|
<data>
|
||||||
<template id="colorpicker" inherit_id="web_editor.colorpicker">
|
<template id="colorpicker" inherit_id="web_editor.colorpicker">
|
||||||
<xpath expr="//colorpicker" position="inside">
|
<xpath expr="//colorpicker" position="inside">
|
||||||
<div class="o_colorpicker_section" data-name="custom" data-display="Custom Color"/>
|
<div
|
||||||
|
class="o_colorpicker_section"
|
||||||
|
data-name="custom"
|
||||||
|
data-display="Custom Color"
|
||||||
|
/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
</data>
|
</data>
|
||||||
|
|
Loading…
Reference in New Issue