añadido backend_theme 12.0.3 y web_responsive
This commit is contained in:
parent
66c21b9d45
commit
31d76e6e50
69 changed files with 4979 additions and 0 deletions
25
backend_theme_v12/static/src/js/sidebar-toggle.js
Normal file
25
backend_theme_v12/static/src/js/sidebar-toggle.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* Copyright 2017 Openworx.
|
||||
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
|
||||
|
||||
odoo.define('backend_theme_v12.sidebar-toggle', function (require) {
|
||||
"use strict";
|
||||
|
||||
var session = require('web.session');
|
||||
var rpc = require('web.rpc');
|
||||
var id = session.uid;
|
||||
rpc.query({
|
||||
model: 'res.users',
|
||||
method: 'read',
|
||||
args: [[id], ['sidebar_visible']],
|
||||
}).then(function(res) {
|
||||
var dbfield = res[0];
|
||||
var toggle = dbfield.sidebar_visible;
|
||||
if (toggle === true) {
|
||||
$("#app-sidebar").removeClass("toggle-sidebar");
|
||||
} else {
|
||||
$("#app-sidebar").addClass("toggle-sidebar");
|
||||
};
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue