Browse Source

Changed way to include .js and .css files

changed way to override javascript side template
pull/294/head
Ahmet Altinisik 9 years ago
parent
commit
2efec729c4
  1. 4
      web_hideleftmenu/README.rst
  2. 3
      web_hideleftmenu/__init__.py
  3. 15
      web_hideleftmenu/__openerp__.py
  4. 8
      web_hideleftmenu/static/src/xml/lib.xml
  5. 17
      web_hideleftmenu/web_hideleftmenu_js.xml

4
web_hideleftmenu/README.rst

@ -35,11 +35,11 @@ web_hideleftmenu%0Aversion:%20
Credits Credits
======= =======
Original module by Vauxoo, Migrated to V8.0 by Ahmet Altinisik
Images Images
------ ------
.. image:: web_hideleftmenu/static/description/icon.png
Contributors Contributors
------------ ------------

3
web_hideleftmenu/__init__.py

@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
# © Vauxoo <nhomar@vauxoo.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

15
web_hideleftmenu/__openerp__.py

@ -12,16 +12,7 @@
"license": "AGPL-3", "license": "AGPL-3",
"application": False, "application": False,
"installable": True, "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
web_hideleftmenu/static/src/xml/lib.xml

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<template> <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"> <li class="oe_hidemenu">
<a href="#">Hide/Show Menu</a> <a href="#">Hide/Show Menu</a>
</li> </li>
</t> </t>
</template>
</t>
</template>

17
web_hideleftmenu/web_hideleftmenu_js.xml

@ -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>
Loading…
Cancel
Save