Browse Source

[ADD] initial commit

robert 6 years ago
commit
67e83c9274
7 changed files with 49 additions and 0 deletions
  1. 1 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 12 0
      __openerp__.py
  4. BIN
      static/description/icon.png
  5. 0 0
      static/src/main.css
  6. 27 0
      static/src/main.js
  7. 9 0
      templates.xml

+ 1 - 0
__init__.py

@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-

BIN
__init__.pyc


+ 12 - 0
__openerp__.py

@@ -0,0 +1,12 @@
+# -*- coding: utf-8 -*-
+{
+    'name': "Eiru Topbar Toggler",
+    'author': "Robert Gauto",
+    'website': "http://www.eiru.com.py",
+    'category': 'Uncategorized',
+    'version': '0.1',
+    'depends': ['base'],
+    'data': [
+        'templates.xml',
+    ],
+}

BIN
static/description/icon.png


+ 0 - 0
static/src/main.css


+ 27 - 0
static/src/main.js

@@ -0,0 +1,27 @@
+openerp.eiru_topbar_toggler = function () {
+    openerp.eiru_topbar_toggler.folded = false;
+
+    openerp.eiru_topbar_toggler.hide = function () {
+        $('.navbar').hide({
+            effect: 'slide',
+            direction: 'up',
+            duration: 300,
+            complete: function() {
+                $('.openerp_webclient_container').css('height', '100%');
+                openerp.eiru_topbar_toggler.folded = true;
+            }
+        });
+    }
+
+    openerp.eiru_topbar_toggler.show = function () {
+        $('.navbar').show({
+            effect: 'slide',
+            direction: 'up',
+            duration: 300,
+            complete: function() {
+                $('.openerp_webclient_container').css('height', 'calc(100% - 45px)');
+                openerp.eiru_topbar_toggler.folded = false;
+            }
+        });
+    }
+}

+ 9 - 0
templates.xml

@@ -0,0 +1,9 @@
+<openerp>
+    <data>
+      <template id="eiru_topbar_toggler.assets" name="Eiru Topbar Toggler" inherit_id="web.assets_backend">
+            <xpath expr="." position="inside">
+                <script type="text/javascript" src="/eiru_topbar_toggler/static/src/main.js" />
+            </xpath>
+        </template>
+    </data>
+</openerp>