Rodney Enciso Arias 8 lat temu
commit
7a1992ecd1

+ 23 - 0
__init__.py

@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>)
+#    Copyright (C) 2011-today Synconics Technologies Pvt. Ltd. (<http://www.synconics.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

BIN
__init__.pyc


+ 40 - 0
__openerp__.py

@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#    
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2015-Today Synconics Technologies Private Ltd.
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.     
+#
+##############################################################################
+{
+    "name": "Full Screen View",
+    "version": "1.0",
+    "author": "Synconics Technologies Pvt. Ltd.",
+    "website": "www.synconics.com",
+    "version": "2.0",
+    "catagory": "Tools",
+    "complexity": "easy",
+    "summary": "Odoo Fullscreen View Using Sliding Sidebars",
+    "description": """
+    This module enables the toggle button at the edge of the sidebars horizontally, which provides user to hide in both sides as per its necessity.
+    """,
+    "depends": ["mail"],
+	"data": ["views/fullwidth_view.xml"],
+    # "qweb": ["static/src/xml/*.xml"],
+    "installable": True,
+    "auto_install": False
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

BIN
static/description/full-width-view.png


BIN
static/description/icon.png


+ 58 - 0
static/description/index.html

@@ -0,0 +1,58 @@
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span12">
+            <h2 class="oe_slogan">Full Screen View Using Sliding Sidebars</h2>
+            <h3 class="oe_slogan">This module enables the toggle button at the edge of the sidebars horizontally, which provides user to hide in both sides as per its necessity.</h3>
+        </div>
+    </div>
+</section>
+<!-- Second block -->
+<section class="oe_container oe_dark">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span12">
+            <div class="oe_row_img oe_centered">
+                <img class="oe_picture oe_screenshot" src="left-right-sidebar.png">
+            </div>
+        </div>
+    </div>
+</section>
+<!--Third block -->
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span12">
+            <div class="oe_row_img oe_centered">
+                <img class="oe_picture oe_screenshot" src="left-sidebar.png">
+            </div>
+        </div>
+    </div>
+</section>
+<!--Fourth block -->
+<section class="oe_container oe_dark">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span12">
+            <div class="oe_row_img oe_centered">
+                <img class="oe_picture oe_screenshot" src="full-width-view.png">
+            </div>
+        </div>
+    </div>
+</section>
+<!-- Fifth block -->
+<section class="oe_container">
+    <div class="oe_row oe_spaced">
+        <div class="oe_span12">
+            <h2 class="oe_slogan">Contact / Support</h2>
+            <h3 class="oe_slogan">Need help or want extra features?</h3>
+        </div>
+	<div class="oe_span6">
+            <div class="oe_picture">
+                    <a href="http://www.synconics.com"><img src="logo.png"></a>
+            </div>
+        </div>
+	<div class="oe_span6">
+            <p class="oe_mt32">
+		Need help with the configuration or want this module to have more functionalities?
+		Contact us through e-mail at <a href="mailto:contact@synconics.com">contact@synconics.com</a>
+            </p>
+        </div>
+    </div>
+</section>

BIN
static/description/left-right-sidebar.png


BIN
static/description/left-sidebar.png


BIN
static/description/logo.png


+ 64 - 0
static/src/css/style.css

@@ -0,0 +1,64 @@
+.oe_leftbar .hide-left-menu{
+    height: 100px;
+    width: 13px;
+    top:42%;
+    font-size: 24px;
+    padding: 0px;
+    margin-left: 220px;
+    z-index: 1;
+    position: absolute;
+    border-width:1px 1px 1px 0px;
+    border-color:#AEB9BD;
+    border-style:solid;
+    border-radius: 0px 10px 10px 0px;
+    background-color:  #F0EEEE;
+    
+}
+.openerp_webclient_container .oe_leftbar button:focus {
+    outline: none;
+    border-width:1px 1px 1px 0px;
+    border-color:#AEB9BD;
+    border-style:solid;
+    border-radius: 0px 10px 10px 0px;
+    background-color: #E8EBEF;
+    box-shadow: none;
+}
+.oe_leftbar .hide-left-menu .arrow-image, .oe_im .oe_im_users .hide-pane div.arrow-img{
+    height: 25px;
+    width: 13px;
+    top: 50%;
+    padding: 0px;
+    margin-left: -5px
+    border: none;
+    position:static;
+    /*background: url(/sync_leftbar/static/src/img/wantclose.png) scroll center 0% no-repeat;*/
+}
+.openerp_webclient_container .hide-left-menu:hover, .oe_im .oe_im_users .hide-pane:hover{
+    background: #CCC;
+}
+.oe_leftbar .hide-left-menu:hover div, .oe_im .oe_im_users .hide-pane:hover div{
+    background-position:center 51%;
+}
+.openerp_webclient_container .oe_leftbar{
+    height: 100%;
+    z-index: 999;
+}
+.hide-pane{
+    height: 100px;
+    width: 14px;
+    top:40%;
+    font-size: 24px;
+    padding: 0px;
+    margin-left: -14px;
+    z-index: 0;
+    position: absolute;
+    border-width:1px 0px 1px 1px;
+    border-color:#AEB9BD;
+    border-style:solid;
+    border-radius: 10px 0px 0px 10px;
+    background-color: #E8EBEF;
+}
+.oe_im .oe_im_users button.hide-pane:focus {
+    outline:0;
+}
+

BIN
static/src/img/wantclose.png


+ 48 - 0
static/src/js/fullwidth_view.js

@@ -0,0 +1,48 @@
+openerp.sync_fullwidth_view = function (instance) {
+    var QWeb = instance.web.qweb;
+    var _t = instance.web._t;
+
+	instance.web.WebClient.include({
+		start: function() {
+        	var self = this;
+			this._super.apply(this, arguments);
+			$(".hide-left-menu").click(function(){
+	            if (!$(".oe_leftbar").hasClass("Moved")){
+	            	$(".oe_leftbar").animate({
+	                	'left': '-220px'
+	               	}, 100).addClass("Moved");
+	                $(".oe_leftbar").css({'position': 'absolute'});
+	                $(this).css('top','37%');
+	                $(".arrow-image").css({'transform' : 'rotate(180deg)'});
+	            }else{
+	                $(".oe_leftbar").animate({
+	                    "left": "0px"
+	                }, 'slow').removeClass("Moved").css({'position': 'inherit'});
+	                $(this).css('top','42%');
+	                $(".arrow-image").css({'transform' : 'rotate(0deg)'});
+	            }
+	        });
+			$('button.hide-pane').click(function(){alert("clicked");});
+        }
+	});
+
+	// instance.im_chat.InstantMessaging.include({
+ //        events: {
+ //            "keydown .oe_im_searchbox": "input_change",
+ //            "keyup .oe_im_searchbox": "input_change",
+ //            "change .oe_im_searchbox": "input_change",
+ //            "click button.hide-pane": "hide_pane"
+ //        },
+ //    	hide_pane: function(){
+ //            this.switch_display();
+ //        },
+ //    	switch_display: function() {
+ //            var self = this;
+ //            this._super.apply(this, arguments);
+ //            if (this.shown)
+ //                $(".arrow-img").css({'transform' : 'rotate(180deg)'});
+ //            else
+ //                $(".arrow-img").css({'transform' : 'rotate(0deg)'});
+ //        }
+	// });
+}

+ 12 - 0
static/src/xml/hide_sidebar_view.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template xml:space="preserve">
+	 <!-- <t t-extend="im_chat.InstantMessaging">
+	 	<t t-jquery=".oe_im_users" t-operation="replace">
+			<div class="oe_im_users">
+			    <button class="hide-pane" id="hidepane" type="button"> 
+			    	<div class="arrow-img"></div>
+			     </button>
+			</div> 
+		</t>
+	</t> -->
+</template>

+ 18 - 0
views/fullwidth_view.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <template id="assets_backend" name="web_tests assets" inherit_id="web.assets_backend">
+            <xpath expr="." position="inside">
+                <link rel="stylesheet" href="/sync_fullwidth_view/static/src/css/style.css"/>
+                <script type="text/javascript" src="/sync_fullwidth_view/static/src/js/fullwidth_view.js"></script>
+            </xpath>
+        </template>
+        <template id="sync_left_bar" name="sync_left_bar_menu" inherit_id="web.webclient_bootstrap">
+           <xpath expr="//td[@class='oe_leftbar']" position="inside">
+                <button  class="hide-left-menu" type="button">
+                    <div class="arrow-image"></div>      
+                </button>
+            </xpath>
+        </template>
+    </data>
+</openerp>