mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
update odoo customize
This commit is contained in:
@@ -5,9 +5,8 @@
|
||||
Copyright 2017 Xavier Jiménez <xavier.jimenez@qubiq.es>
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
||||
|
||||
odoo.define("web_environment_ribbon.ribbon", function(require) {
|
||||
odoo.define("web_environment_ribbon.ribbon", function (require) {
|
||||
"use strict";
|
||||
|
||||
var rpc = require("web.rpc");
|
||||
var core = require("web.core");
|
||||
|
||||
@@ -33,7 +32,7 @@ odoo.define("web_environment_ribbon.ribbon", function(require) {
|
||||
return image.style.color !== "rgb(255, 255, 255)";
|
||||
}
|
||||
|
||||
core.bus.on("web_client_ready", null, function() {
|
||||
core.bus.on("web_client_ready", null, function () {
|
||||
var ribbon = $('<div class="test-ribbon hidden"/>');
|
||||
$("body").append(ribbon);
|
||||
ribbon.hide();
|
||||
@@ -41,7 +40,7 @@ odoo.define("web_environment_ribbon.ribbon", function(require) {
|
||||
rpc.query({
|
||||
model: "web.environment.ribbon.backend",
|
||||
method: "get_environment_ribbon",
|
||||
}).then(function(ribbon_data) {
|
||||
}).then(function (ribbon_data) {
|
||||
// Ribbon name
|
||||
if (ribbon_data.name && ribbon_data.name !== "False") {
|
||||
ribbon.html(ribbon_data.name);
|
||||
|
||||
@@ -26,3 +26,10 @@
|
||||
.test-ribbon b {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
header:hover ~ .test-ribbon,
|
||||
nav:hover ~ .test-ribbon {
|
||||
/* Ease out ribbon when user is using the navigation in Odoo */
|
||||
opacity: 0;
|
||||
transition: 0.2s ease;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user