diff --git a/theme_kit/static/js/theme_kit.js b/theme_kit/static/js/theme_kit.js new file mode 100644 index 0000000000..2b0d04fc33 --- /dev/null +++ b/theme_kit/static/js/theme_kit.js @@ -0,0 +1,27 @@ +odoo.define('theme_kit.model', function (require) { + "use strict"; + + var WebClient = require("web.WebClient"); + + WebClient.include({ + init: function (parent) { + this._super.apply(this, arguments); + var self = this; + }, + }); + $(document).ready(function(e){ + $('#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a').click(function (e) { + if($('#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a') != undefined){ + $('#odooMenuBarNav > div > div.o_sub_menu_content > ul > li > a').removeClass("active"); + $("#odooMenuBarNav > div > div.o_sub_menu_content > ul > li.active").removeClass("active") + } + $(e.target).addClass("active"); + }); + $("#sidebar > li > a").click(function(e){ + if($("#sidebar > li > a") != undefined){ + $("#sidebar > li > a").removeClass("active"); + } + $(e.target).addClass("active"); + }); + }); +}); \ No newline at end of file diff --git a/theme_kit/views/templates.xml b/theme_kit/views/templates.xml index 0d53e410dc..8edf23fd03 100644 --- a/theme_kit/views/templates.xml +++ b/theme_kit/views/templates.xml @@ -16,4 +16,16 @@ +