Stéphane Bidoul (ACSONE)
8 years ago
committed by
Enric Tobella
No known key found for this signature in database
GPG Key ID: 1A2546A1B7BA2451
3 changed files with
12 additions and
13 deletions
-
web_widget_color/__openerp__.py
-
web_widget_color/static/src/js/widget.js
-
web_widget_color/view/web_widget_color_view.xml
|
@ -21,6 +21,7 @@ |
|
|
'qweb': [ |
|
|
'qweb': [ |
|
|
'static/src/xml/widget.xml', |
|
|
'static/src/xml/widget.xml', |
|
|
], |
|
|
], |
|
|
|
|
|
'license': 'AGPL-3', |
|
|
'auto_install': False, |
|
|
'auto_install': False, |
|
|
'installable': True, |
|
|
'installable': True, |
|
|
'web_preload': True, |
|
|
'web_preload': True, |
|
|
|
@ -57,11 +57,11 @@ odoo.define('web.web_widget_color', function(require) { |
|
|
if (!this.get("effective_readonly")) { |
|
|
if (!this.get("effective_readonly")) { |
|
|
var $input = this.$el.find('input'); |
|
|
var $input = this.$el.find('input'); |
|
|
$input.val(show_value); |
|
|
$input.val(show_value); |
|
|
$input.css("background-color", show_value) |
|
|
|
|
|
|
|
|
$input.css("background-color", show_value); |
|
|
jscolor.init(this.$el[0]); |
|
|
jscolor.init(this.$el[0]); |
|
|
} else { |
|
|
} else { |
|
|
this.$(".oe_form_char_content").text(show_value); |
|
|
this.$(".oe_form_char_content").text(show_value); |
|
|
this.$('div').css("background-color", show_value) |
|
|
|
|
|
|
|
|
this.$('div').css("background-color", show_value); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
@ -1,12 +1,10 @@ |
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
<openerp> |
|
|
|
|
|
<data> |
|
|
|
|
|
<template id="assets_backend" name="web_widget_color assets" inherit_id="web.assets_backend"> |
|
|
|
|
|
<xpath expr="." position="inside"> |
|
|
|
|
|
<link rel="stylesheet" href="/web_widget_color/static/src/css/widget.css"/> |
|
|
|
|
|
<script type="text/javascript" src="/web_widget_color/static/lib/jscolor/jscolor.js"></script> |
|
|
|
|
|
<script type="text/javascript" src="/web_widget_color/static/src/js/widget.js"></script> |
|
|
|
|
|
</xpath> |
|
|
|
|
|
</template> |
|
|
|
|
|
</data> |
|
|
|
|
|
</openerp> |
|
|
|
|
|
|
|
|
<odoo> |
|
|
|
|
|
<template id="assets_backend" name="web_widget_color assets" inherit_id="web.assets_backend"> |
|
|
|
|
|
<xpath expr="." position="inside"> |
|
|
|
|
|
<link rel="stylesheet" href="/web_widget_color/static/src/css/widget.css"/> |
|
|
|
|
|
<script type="text/javascript" src="/web_widget_color/static/lib/jscolor/jscolor.js"></script> |
|
|
|
|
|
<script type="text/javascript" src="/web_widget_color/static/src/js/widget.js"></script> |
|
|
|
|
|
</xpath> |
|
|
|
|
|
</template> |
|
|
|
|
|
</odoo> |