Browse Source

initial commit

robert2206 7 years ago
commit
11f675c7cd
7 changed files with 439 additions and 0 deletions
  1. 1 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 16 0
      __openerp__.py
  4. 368 0
      static/src/css/tools.css
  5. 26 0
      static/src/js/tools.js
  6. 18 0
      static/src/xml/tools.xml
  7. 10 0
      templates.xml

+ 1 - 0
__init__.py

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

BIN
__init__.pyc


+ 16 - 0
__openerp__.py

@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+{
+    'name': "Eiru Tools",
+    'author': "Your Company",
+    'website': "http://www.yourcompany.com",
+    'category': 'Uncategorized',
+    'version': '0.1',
+    'depends': ['base', 'web'],
+    'data': [
+        'templates.xml',
+    ],
+    'qweb': [
+        'static/src/xml/*.xml',
+    ],
+    'application': True,
+}

+ 368 - 0
static/src/css/tools.css

@@ -0,0 +1,368 @@
+.eiru_tools_container {
+    width: 70px;
+    height: 70px;
+    position: fixed;
+    bottom: 15px;
+    right: 25px;
+    z-index: 100
+}
+
+.eiru_tools_button {
+    width: 55px;
+    height: 55px;
+    border-radius: 50%;
+    background: #3f51b5;
+    position: fixed;
+    bottom: 15px;
+    right: 25px;
+    cursor: pointer;
+    box-shadow: 0px 2px 5px #666;
+}
+
+.fa.icon {
+    position: absolute;
+    color: #fff;
+    /*left: 50%;
+    top: 50%;
+    transform: translate(-50%, -50%);
+    color: #fff;*/
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    padding: 0;
+    margin: auto;
+    display: block;
+    text-align: center;
+}
+
+.bars {
+    line-height: 55px;
+    animation: menu-out 0.3s;
+    transition: all 0.3s;
+}
+
+.cross {
+    line-height: 55px;
+    opacity: 0;
+    /*transform: rotateZ(-70deg);*/
+    transition: all 0.3s;
+    animation: cross-out 0.3s;
+}
+
+.eiru_tools_container:hover {
+    height: 400px;
+    width: 90px;
+    padding: 30px;
+}
+
+.eiru_tools_container:hover .bars {
+    animation: menu-in 0.15s linear;
+    animation-fill-mode: forwards;
+}
+
+.eiru_tools_container:hover .cross {
+    animation: cross-in 0.2;
+    animation-delay: 0.1s;
+    animation-fill-mode: forwards;
+}
+
+@keyframes menu-out {
+    from {
+        opacity: 0;
+        transform: rotateZ(180deg);
+    }
+    to {
+        opacity: 1;
+        transform: rotateZ(0deg);
+    }
+}
+
+@keyframes menu-in {
+    from {
+        opacity: 1;
+        transform: rotateZ(0deg);
+    }
+    to {
+        opacity: 0;
+        transform: rotateZ(180deg);
+    }
+}
+
+@keyframes cross-in {
+    from { opacity: 0;
+        transform: rotateZ(-70deg);
+    }
+    to {
+        opacity: 1;
+        transform: rotateZ(0deg);
+    }
+}
+
+@keyframes cross-out {
+    from {
+        opacity: 1; transform: rotateZ(0deg);
+    }
+    to {
+        opacity: 0;
+        transform: rotateZ(-70deg);
+    }
+}
+
+.eiru_tools_voice {
+    width: 40px;
+    height: 40px;
+    border-radius: 50%;
+    background: #3f51b5;
+    position: fixed;
+    bottom: 100px;
+    right: 35px;
+    cursor: pointer;
+    box-shadow: 0px 2px 5px #666;
+}
+
+.eiru_tools_search {
+    width: 40px;
+    height: 40px;
+    border-radius: 50%;
+    background: #3f51b5;
+    position: fixed;
+    bottom: 160px;
+    right: 35px;
+    cursor: pointer;
+    box-shadow: 0px 2px 5px #666;
+}
+
+
+.mini {
+    line-height: 45px;
+}
+
+/*body{
+  font-family: 'Roboto';
+  text-align: center;
+  background: #f1f1f1;
+}
+
+h3{
+  color: #555;
+}
+
+#presentation{
+  width: 480px;
+  height: 120px;
+  padding: 20px;
+  margin: auto;
+  background: #FFF;
+  margin-top: 10px;
+  box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
+  transition: all 0.3s;
+  border-radius: 3px;
+}
+
+#presentation:hover{
+  box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
+  transition: all 0.3s;
+  transform: translateZ(10px);
+}
+
+#floating-button{
+  width: 55px;
+  height: 55px;
+  border-radius: 50%;
+  background: #db4437;
+  position: fixed;
+  bottom: 30px;
+  right: 30px;
+  cursor: pointer;
+  box-shadow: 0px 2px 5px #666;
+}
+
+.plus{
+  color: white;
+  position: absolute;
+  top: 0;
+  display: block;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  text-align: center;
+  padding: 0;
+  margin: 0;
+  line-height: 55px;
+  font-size: 38px;
+  font-family: 'Roboto';
+  font-weight: 300;
+  animation: plus-out 0.3s;
+  transition: all 0.3s;
+}
+
+#container-floating{
+  position: fixed;
+  width: 70px;
+  height: 70px;
+  bottom: 30px;
+  right: 30px;
+  z-index: 50px;
+}
+
+#container-floating:hover{
+  height: 400px;
+  width: 90px;
+  padding: 30px;
+}
+
+#container-floating:hover .plus{
+  animation: plus-in 0.15s linear;
+  animation-fill-mode: forwards;
+}
+
+.edit{
+  position: absolute;
+  top: 0;
+  display: block;
+  bottom: 0;
+  left: 0;
+  display: block;
+  right: 0;
+  padding: 0;
+  opacity: 0;
+  margin: auto;
+  line-height: 65px;
+  transform: rotateZ(-70deg);
+  transition: all 0.3s;
+  animation: edit-out 0.3s;
+}*/
+
+/*#container-floating:hover .edit{
+  animation: edit-in 0.2s;
+   animation-delay: 0.1s;
+  animation-fill-mode: forwards;
+}
+
+@keyframes edit-in{
+    from {opacity: 0; transform: rotateZ(-70deg);}
+    to {opacity: 1; transform: rotateZ(0deg);}
+}
+
+@keyframes edit-out{
+    from {opacity: 1; transform: rotateZ(0deg);}
+    to {opacity: 0; transform: rotateZ(-70deg);}
+}
+
+@keyframes plus-in{
+    from {opacity: 1; transform: rotateZ(0deg);}
+    to {opacity: 0; transform: rotateZ(180deg);}
+}
+
+@keyframes plus-out{
+    from {opacity: 0; transform: rotateZ(180deg);}
+    to {opacity: 1; transform: rotateZ(0deg);}
+}
+
+.nds{
+  width: 40px;
+  height: 40px;
+  border-radius: 50%;
+  position: fixed;
+  z-index: 300;
+  transform:  scale(0);
+  cursor: pointer;
+}
+
+.nd1{
+  background: #d3a411;
+  right: 40px;
+  bottom: 120px;
+  animation-delay: 0.2s;
+    animation: bounce-out-nds 0.3s linear;
+  animation-fill-mode:  forwards;
+}
+
+.nd3{
+  background: #3c80f6;
+  right: 40px;
+  bottom: 180px;
+  animation-delay: 0.15s;
+    animation: bounce-out-nds 0.15s linear;
+  animation-fill-mode:  forwards;
+}
+
+.nd4{
+  background: #ba68c8;
+  right: 40px;
+  bottom: 240px;
+  animation-delay: 0.1s;
+    animation: bounce-out-nds 0.1s linear;
+  animation-fill-mode:  forwards;
+}
+
+.nd5{
+  background-image: url('https://lh3.googleusercontent.com/-X-aQXHatDQY/Uy86XLOyEdI/AAAAAAAAAF0/TBEZvkCnLVE/w140-h140-p/fb3a11ae-1fb4-4c31-b2b9-bf0cfa835c27');
+  background-size: 100%;
+  right: 40px;
+  bottom: 300px;
+  animation-delay: 0.08s;
+  animation: bounce-out-nds 0.1s linear;
+  animation-fill-mode:  forwards;
+}
+
+@keyframes bounce-nds{
+    from {opacity: 0;}
+    to {opacity: 1; transform: scale(1);}
+}
+
+@keyframes bounce-out-nds{
+    from {opacity: 1; transform: scale(1);}
+    to {opacity: 0; transform: scale(0);}
+}
+
+#container-floating:hover .nds{
+
+  animation: bounce-nds 0.1s linear;
+  animation-fill-mode:  forwards;
+}
+
+#container-floating:hover .nd3{
+  animation-delay: 0.08s;
+}
+#container-floating:hover .nd4{
+  animation-delay: 0.15s;
+}
+#container-floating:hover .nd5{
+  animation-delay: 0.2s;
+}
+
+.letter{
+  font-size: 23px;
+  font-family: 'Roboto';
+  color: white;
+  position: absolute;
+  left: 0;
+  right: 0;
+  margin: 0;
+  top: 0;
+  bottom: 0;
+  text-align: center;
+  line-height: 40px;
+}
+
+.reminder{
+  position: absolute;
+  left: 0;
+  right: 0;
+  margin: auto;
+  top: 0;
+  bottom: 0;
+  line-height: 40px;
+}
+
+.profile{
+  border-radius: 50%;
+  width: 40px;
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  margin: auto;
+  right: 20px;
+}*/

+ 26 - 0
static/src/js/tools.js

@@ -0,0 +1,26 @@
+(function () {
+    "use strict";
+
+    openerp.eiru_tools = {};
+
+    openerp.eiru_tools.EiruToolsWidget = openerp.Widget.extend({
+        template: 'eiru_tools.ToolsContainer',
+        init: function (parent) {
+            this._super(parent);
+            this.start();
+        },
+        start: function () {
+            console.log('started');
+        }
+    });
+
+    if (openerp.web && openerp.web.WebClient) {
+        openerp.web.WebClient.include({
+            show_application: function () {
+                var button = new openerp.eiru_tools.EiruToolsWidget(this);
+                button.appendTo(openerp.client.$el);
+                return this._super.apply(this, arguments);
+            }
+        });
+    }
+})();

+ 18 - 0
static/src/xml/tools.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<template xml:space="preserve">
+    <t t-name="eiru_tools.ToolsContainer">
+        <div class="eiru_tools_container">
+            <div class="eiru_tools_button">
+                <i class="fa fa-bars fa-lg icon bars"></i>
+                <i class="fa fa-times fa-lg icon cross"></i>
+            </div>
+            <div class="eiru_tools_search">
+                <i class="fa fa-search fa-1x icon mini"></i>
+            </div>
+            <div class="eiru_tools_voice">
+                <i class="fa fa-microphone fa-1x icon mini"></i>
+            </div>
+        </div>
+    </t>
+</template>

+ 10 - 0
templates.xml

@@ -0,0 +1,10 @@
+<openerp>
+    <data>
+        <template id="eiru_tools" inherit_id="web.assets_backend">
+            <xpath expr="." position="inside">
+                <link rel="stylesheet" href="/eiru_tools/static/src/css/tools.css" />
+                <script type="text/javascript" src="/eiru_tools/static/src/js/tools.js" />
+            </xpath>
+        </template>
+    </data>
+</openerp>