Skip to content

Commit

Permalink
Changed way to include .js and .css files
Browse files Browse the repository at this point in the history
changed way to override javascript side template
  • Loading branch information
aaltinisik committed Jan 19, 2016
1 parent ef05ae0 commit 2efec72
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
4 changes: 2 additions & 2 deletions web_hideleftmenu/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ web_hideleftmenu%0Aversion:%20

Credits
=======

Original module by Vauxoo, Migrated to V8.0 by Ahmet Altinisik

Images
------

.. image:: web_hideleftmenu/static/description/icon.png

Contributors
------------
Expand Down
3 changes: 3 additions & 0 deletions web_hideleftmenu/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# © Vauxoo <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
15 changes: 3 additions & 12 deletions web_hideleftmenu/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,7 @@
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"web",
],
"js": [
"static/src/js/lib.js",
],
"css": [
"static/src/css/lib.css",
],
"qweb": [
"static/src/xml/lib.xml",
]
"depends": ["web",],
"data": ["web_hideleftmenu_js.xml",],
"qweb": ["static/src/xml/lib.xml",],
}
8 changes: 5 additions & 3 deletions web_hideleftmenu/static/src/xml/lib.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<template>
<t t-jquery="ul.dropdown-menu li:last" t-operation="after">

<t t-extend="UserMenu">
<t t-name="web_hideleftmenu.hidemenu" t-jquery="ul.dropdown-menu li:last" t-operation="after">
<li class="oe_hidemenu">
<a href="#">Hide/Show Menu</a>
</li>
</t>

</template>
</t>
</template>
17 changes: 17 additions & 0 deletions web_hideleftmenu/web_hideleftmenu_js.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<template id="hideleft_assets_backend" name="web_hideleftmenu assets"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet"
href="/web_hideleftmenu/static/src/css/lib.css"/>
<script type="text/javascript"
src="/web_hideleftmenu/static/src/js/lib.js"></script>
</xpath>
</template>


</data>
</openerp>

0 comments on commit 2efec72

Please sign in to comment.