edgar před 8 roky
revize
285487a7b9

+ 6 - 0
__init__.py

@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+#################################################################################
+#
+#    Copyright (c) 2015-Present Webkul Software Pvt. Ltd. (<https://webkul.com/>)
+#
+#################################################################################

binární
__init__.pyc


+ 34 - 0
__openerp__.py

@@ -0,0 +1,34 @@
+# -*- coding: utf-8 -*-
+#################################################################################
+#
+#    Copyright (c) 2015-Present Webkul Software Pvt. Ltd. (<https://webkul.com/>)
+#
+#################################################################################
+{
+    "name": "Website Scroll Back To Top",
+    "category": 'Website' ,
+    "summary": """scroll website from back to top.""",
+    "description": """
+
+====================
+**Help and Support**
+====================
+.. |icon_features| image:: website_back2top/static/src/img/icon-features.png
+.. |icon_support| image:: website_back2top/static/src/img/icon-support.png
+.. |icon_help| image:: website_back2top/static/src/img/icon-help.png
+
+|icon_help| `Help <https://webkul.com/ticket/open.php>`_ |icon_support| `Support <https://webkul.com/ticket/open.php>`_ |icon_features| `Request new Feature(s) <https://webkul.com/ticket/open.php>`_
+    """,
+    "sequence": 1,
+    'images':['static/description/banner.png'],
+    "author": "Webkul Software Pvt. Ltd.",
+    "website": "http://www.webkul.com",
+    "version": '1.0',
+    "depends": ['website'],
+    "data": [
+        'views/templates.xml',
+    ],
+    "installable": True,
+    "application": True,
+    "auto_install": False,
+}

binární
static/description/banner.png


binární
static/description/icon-features.png


binární
static/description/icon-help.png


binární
static/description/icon-support.png


binární
static/description/icon.png


+ 54 - 0
static/description/index.html

@@ -0,0 +1,54 @@
+<section class="oe_container">
+    <div class="oe_row oe_spaced"> 
+        <div class="oe_span12">
+            <h3 class="text-info text-center"><u>Introduction</u></h3>
+        </div>
+
+        <div class="oe_span12">
+            <div class="oe_row_img oe_centered">
+               <center><img class="oe_picture oe_screenshot" src="website_back2top_main_image.png" alt="website_back2top_main_image"></center>
+            </div>
+        </div>
+        <div class='oe_span12 text-center'>
+            <ul>
+                <p>This module allow to you return to top instantly, no need to scroll unnecessary.</p>
+            </ul>
+        </div>    
+    </div>
+</section>
+
+<br/>
+
+<section class="oe_container oe_dark">
+    <div class='oe_row'>
+        <div class="oe_span12">
+            <h2 class='oe_slogan'>Complimentary Support</h2>
+            <p>
+            You will get 90 days free support for any doubt, queries, and bug fixing (not including data recovery) or any type of issue related to modules.
+            </p>
+        </div>
+    </div>
+    <div class="oe_row oe_spaced">
+        <div class="oe_span12">
+            <h2 class="oe_slogan">Help and Support</h2>
+        </div>
+        <div class="oe_slogan oe_spaced">
+            <img src="icon-help.png">
+            <span ><a onMouseOver="this.style.color='#AC1EE0'"
+   onMouseOut="this.style.color='#7c7bad'" style="color:#7c7bad;" target="_blank" href="http://webkul.uvdesk.com/en/customer/create-ticket/">Help</a></span>
+            <img src="icon-support.png">
+            <span ><a onMouseOver="this.style.color='#AC1EE0'"
+   onMouseOut="this.style.color='#7c7bad'" style="color:#7c7bad;" target="_blank" href="http://webkul.uvdesk.com/en/customer/create-ticket/">Support</a></span>
+            <img src="icon-features.png">
+            <span ><a onMouseOver="this.style.color='#AC1EE0'"
+   onMouseOut="this.style.color='#7c7bad'" style="color:#7c7bad;" target="_blank" href="http://webkul.uvdesk.com/en/customer/create-ticket/">Request new Features</a></span>
+        </div>
+    </div>
+</section><section class="oe_container">
+    <div class="oe_span12">
+        <!-- Piwik Image Tracker-->
+<img src="http://odooimg.webkul.com/analytics/piwik/piwik.php?idsite=3&rec=1&action_name=WEBSITE-SCROLL-BACK-TO-TOP&url=https://apps.openerp.com/apps/modules/8.0/website_back2top&uid=website_back2top" style="border:0" alt="" />
+<!-- End Piwik -->
+    </div>
+</section>
+	

binární
static/description/up-arrow.png


binární
static/description/website_back2top_main_image.png


+ 23 - 0
static/src/css/website_scroll_back2top.css

@@ -0,0 +1,23 @@
+a.back-to-top {
+  display: none;
+  width: 40px;
+  height: 40px;
+  text-indent: -9999px;
+  position: fixed;
+  z-index: 490;
+  right: 15px;
+  bottom: 40px;
+  background: #77bbc1 url("/website_back2top/static/description/up-arrow.png") no-repeat center 43%;
+  -webkit-border-radius: 30px;
+  -moz-border-radius: 30px;
+  border-radius: 30px;
+  outline: none;
+  color: white;
+  font-weight: 700;
+  padding-top:32px;
+  text-align: center;
+  text-decoration: none;
+}
+a:hover.back-to-top {
+  background-color: #000;
+}

binární
static/src/img/icon-features.png


binární
static/src/img/icon-help.png


binární
static/src/img/icon-support.png


binární
static/src/img/icon.png


+ 27 - 0
static/src/js/website_scroll_back2top.js

@@ -0,0 +1,27 @@
+$(document).ready(function() 
+{
+    $('body').prepend('<a href="#" class="back-to-top">Back to Top</a>');
+    var amountScrolled = 300;
+
+    $(window).scroll(function() {
+        if ($(window).scrollTop() > amountScrolled) {
+            $('a.back-to-top').fadeIn('slow');
+        } else {
+            $('a.back-to-top').fadeOut('slow');
+        }
+
+        var scrollTop = $(window).scrollTop();
+        var docHeight = $(document).height();
+        var winHeight = $(window).height();
+        var scrollPercent = (scrollTop) / (docHeight - winHeight);
+        var scrollPercentRounded = Math.round(scrollPercent*100);
+        $('a.back-to-top').text(scrollPercentRounded+"%");
+    });
+
+    $('a.back-to-top').click(function() {
+        $('body,html').animate({
+            scrollTop: 0
+        }, 'fast');
+        return false;
+    });
+});

+ 12 - 0
views/templates.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+
+    <template id="assets_frontend_back2top" inherit_id="website.assets_frontend" active="True" customize_show="True" name="Back2top">
+      <xpath expr="." position="inside">
+          <link rel='stylesheet' href='/website_back2top/static/src/css/website_scroll_back2top.css'/>
+          <script type="text/javascript" src="/website_back2top/static/src/js/website_scroll_back2top.js"></script>
+      </xpath>
+    </template>
+  </data>
+</openerp>