@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import controllers |
@ -0,0 +1,46 @@ |
|||
# -*- coding: utf-8 -*- |
|||
############################################################################## |
|||
# |
|||
# Cybrosys Technologies Pvt. Ltd. |
|||
# Copyright (C) 2017-TODAY Cybrosys Technologies(<https://www.cybrosys.com>). |
|||
# Author: Hilar AK(<hilar@cybrosys.in>) |
|||
# you can modify it under the terms of the GNU LESSER |
|||
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
|||
# |
|||
# It is forbidden to publish, distribute, sublicense, or sell copies |
|||
# of the Software or modified copies of the Software. |
|||
# |
|||
# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
|||
# |
|||
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
|||
# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. |
|||
# If not, see <http://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': "Website Video Background", |
|||
'version': '10.0.1.0.0', |
|||
'summary': """Make Website Background as Video""", |
|||
'description': """ |
|||
Website page background as youtube video. |
|||
""", |
|||
'author': 'Cybrosys Techno Solutions', |
|||
'company': 'Cybrosys Techno Solutions', |
|||
'website': "https://cybrosys.com/", |
|||
'category': 'Website', |
|||
'depends': ['base', 'website'], |
|||
'data': [ |
|||
'views/conf_view.xml', |
|||
'views/assets.xml', |
|||
'views/templates.xml', |
|||
], |
|||
'demo': [], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'application': False |
|||
} |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import controllers |
@ -0,0 +1,18 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from odoo import http |
|||
from odoo.http import request |
|||
|
|||
|
|||
class SnippetVideoBg(http.Controller): |
|||
|
|||
@http.route('/set_video_id', type='http', auth="user", methods=['POST'], website=True) |
|||
def index(self, **kw): |
|||
""" |
|||
Here set the system param video id. |
|||
:param kw: |
|||
:return: |
|||
""" |
|||
video_id = kw.get('id') |
|||
request.env['ir.config_parameter'].set_param( |
|||
'video_id', video_id) if video_id else '' |
|||
return request.redirect('/') |
@ -0,0 +1,30 @@ |
|||
<odoo> |
|||
<data> |
|||
<!-- --> |
|||
<!-- <record id="object0" model="snippet_video_bg.snippet_video_bg"> --> |
|||
<!-- <field name="name">Object 0</field> --> |
|||
<!-- <field name="value">0</field> --> |
|||
<!-- </record> --> |
|||
<!-- --> |
|||
<!-- <record id="object1" model="snippet_video_bg.snippet_video_bg"> --> |
|||
<!-- <field name="name">Object 1</field> --> |
|||
<!-- <field name="value">10</field> --> |
|||
<!-- </record> --> |
|||
<!-- --> |
|||
<!-- <record id="object2" model="snippet_video_bg.snippet_video_bg"> --> |
|||
<!-- <field name="name">Object 2</field> --> |
|||
<!-- <field name="value">20</field> --> |
|||
<!-- </record> --> |
|||
<!-- --> |
|||
<!-- <record id="object3" model="snippet_video_bg.snippet_video_bg"> --> |
|||
<!-- <field name="name">Object 3</field> --> |
|||
<!-- <field name="value">30</field> --> |
|||
<!-- </record> --> |
|||
<!-- --> |
|||
<!-- <record id="object4" model="snippet_video_bg.snippet_video_bg"> --> |
|||
<!-- <field name="name">Object 4</field> --> |
|||
<!-- <field name="value">40</field> --> |
|||
<!-- </record> --> |
|||
<!-- --> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,3 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
from . import models |
@ -0,0 +1,15 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# |
|||
# from odoo import models, fields |
|||
# |
|||
# |
|||
# class WebsiteMapKey(models.Model): |
|||
# _inherit = 'website' |
|||
# video_id = fields.Char("Youtube Video Id") |
|||
# |
|||
# |
|||
# class WebsiteMapConfig(models.TransientModel): |
|||
# _inherit = 'website.config.settings' |
|||
# |
|||
# video_id = fields.Char(related='website_id.video_id', string="Youtube Video Id", |
|||
# help="Paste Youtube VideoId Here") |
|
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 118 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 19 KiB |
@ -0,0 +1,161 @@ |
|||
<section class="oe_container oe_dark"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan">Website Video Background</h2> |
|||
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a></h4> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container"> |
|||
<div class="oe_row oe_spaced"> |
|||
<h2 class="oe_slogan" style="color:#875A7B;">Make youtube Video as background on website pages</h2> |
|||
<h3 class="oe_slogan"> |
|||
Get video id from youtube and add it on website. |
|||
Eg: https://www.youtube.com/watch?v=uNCr7NdOJgw here uNCr7NdOJgw is your video id. |
|||
</h3> |
|||
</div> |
|||
|
|||
<div class="oe_container oe_dark"> |
|||
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
|||
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
|||
|
|||
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
|||
<h2 class=" mt32 mb16"><b>Click on + button on website right corner (available for website editor and designer)</b></h2> |
|||
</div> |
|||
<div class="col-md-6" style="transition-delay: 500ms;"> |
|||
<div class=" oe_demo oe_picture oe_screenshot"> |
|||
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
|||
src="new.png"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="oe_container"> |
|||
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
|||
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
|||
|
|||
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
|||
<h2 class=" mt32 mb16"><b>Click on Background Video Button</b></h2> |
|||
|
|||
</div> |
|||
<div class="col-md-6" style="transition-delay: 500ms;"> |
|||
<div class=" oe_demo oe_picture oe_screenshot"> |
|||
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
|||
src="add.png"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="oe_container oe_dark"> |
|||
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
|||
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
|||
|
|||
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
|||
<h2 class=" mt32 mb16"><b>You will get a new Prompt</b></h2> |
|||
</div> |
|||
<div class="col-md-6" style="transition-delay: 500ms;"> |
|||
<div class=" oe_demo oe_picture oe_screenshot"> |
|||
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
|||
src="prompt.png"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="oe_container"> |
|||
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
|||
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
|||
|
|||
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
|||
<h2 class=" mt32 mb16"><b>Get youtube video id</b></h2> |
|||
</div> |
|||
<div class="col-md-6" style="transition-delay: 500ms;"> |
|||
<div class=" oe_demo oe_picture oe_screenshot"> |
|||
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
|||
src="youtube_id.png"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="oe_container oe_dark"> |
|||
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
|||
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
|||
|
|||
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
|||
<h2 class=" mt32 mb16"><b>Paste youtube id in prompt and continue</b></h2> |
|||
</div> |
|||
<div class="col-md-6" style="transition-delay: 500ms;"> |
|||
<div class=" oe_demo oe_picture oe_screenshot"> |
|||
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
|||
src="id_prompt.png"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="oe_container"> |
|||
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
|||
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
|||
|
|||
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
|||
<h2 class=" mt32 mb16"><b>Id get saved as system params</b></h2> |
|||
</div> |
|||
<div class="col-md-6" style="transition-delay: 500ms;"> |
|||
<div class=" oe_demo oe_picture oe_screenshot"> |
|||
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
|||
src="system param.png"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
<div class="oe_container oe_dark"> |
|||
<div class="row mt32 o_animate o_animate_in_children o_animate_offset_min" |
|||
style="animation-name: none; visibility: hidden; animation-play-state: paused;"> |
|||
|
|||
<div class="col-md-5 col-md-offset-1" style="transition-delay: 0ms;"> |
|||
<h2 class=" mt32 mb16"><b>Preview</b></h2> |
|||
</div> |
|||
<div class="col-md-6" style="transition-delay: 500ms;"> |
|||
<div class=" oe_demo oe_picture oe_screenshot"> |
|||
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
|||
src="prev1.png"> |
|||
</div> |
|||
</div> |
|||
<div class="col-md-6" style="transition-delay: 500ms;"> |
|||
<div class=" oe_demo oe_picture oe_screenshot"> |
|||
<img style="max-width: 100%;-moz-transform: scale(1.2);-webkit-transform: scale(1.2); -o-transform: scale(1.2); -ms-transform: scale(1.2); transform: scale(1.2);" |
|||
src="prev2.png"> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</div> |
|||
</section> |
|||
<section class="oe_container oe_dark"> |
|||
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2> |
|||
<div class="oe_slogan" style="margin-top:10px !important;"> |
|||
<div> |
|||
<a class="btn btn-primary btn-lg mt8" |
|||
style="color: #FFFFFF !important;border-radius: 0;" href="https://www.cybrosys.com"><i |
|||
class="fa fa-envelope"></i> Email </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/contact/"><i |
|||
class="fa fa-phone"></i> Contact Us </a> <a |
|||
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;" |
|||
href="https://www.cybrosys.com/odoo-customization-and-installation/"><i |
|||
class="fa fa-check-square"></i> Request Customization </a> |
|||
</div> |
|||
<br> |
|||
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block"> |
|||
<div> |
|||
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td> |
|||
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td> |
|||
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td> |
|||
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
|
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 588 KiB |
After Width: | Height: | Size: 623 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 310 KiB |
@ -0,0 +1,37 @@ |
|||
odoo.define('snippet_video_bg.wrapwrap_bg_video', function (require) { |
|||
'use strict'; |
|||
var Model = require('web.Model'); |
|||
var ajax = require('web.ajax'); |
|||
var core = require('web.core'); |
|||
var base = require('web_editor.base'); |
|||
var web_editor = require('web_editor.editor'); |
|||
var options = require('web_editor.snippets.options'); |
|||
var website = require('website.website'); |
|||
var contentMenu = require('website.contentMenu'); |
|||
var _t = core._t; |
|||
|
|||
contentMenu.TopBar.include({ |
|||
new_bg_video_id: function() { |
|||
website.prompt({ |
|||
id: "bg_video_id", |
|||
window_title: _t("Add a YouTube Video Id here"), |
|||
input: "Video ID", |
|||
}).then(function (id) { |
|||
website.form('/set_video_id', 'POST', { |
|||
id: id |
|||
}); |
|||
}); |
|||
}, |
|||
}); |
|||
$('document').ready(function() { |
|||
var model = new Model('ir.config_parameter'); |
|||
model.call('get_param', ['video_id']).then(function(video_id){ |
|||
var options = { |
|||
videoId: video_id || false, |
|||
start: 0, |
|||
mute: true, |
|||
}; |
|||
$('#wrapwrap').tubular(options); |
|||
}); |
|||
}); |
|||
});; |
@ -0,0 +1,8 @@ |
|||
<odoo> |
|||
<template id="assets_frontend" inherit_id="website.assets_frontend" name="AssetFor Products Quick View"> |
|||
<xpath expr="." position="inside"> |
|||
<script type="text/javascript" src="/snippet_video_bg/static/lib/jquery.tubular.1.0.js"/> |
|||
<script type="text/javascript" src="/snippet_video_bg/static/src/js/index.js"/> |
|||
</xpath> |
|||
</template> |
|||
</odoo> |
@ -0,0 +1,21 @@ |
|||
<odoo> |
|||
<data> |
|||
<!--<record id="bg_video_id" model="ir.ui.view">--> |
|||
<!--<field name="name">Website page Background Video Id</field>--> |
|||
<!--<field name="model">website.config.settings</field>--> |
|||
<!--<field name="inherit_id" ref="website.view_website_config_settings"/>--> |
|||
<!--<field name="arch" type="xml">--> |
|||
<!--<xpath expr="//group[@name='social']" position="after">--> |
|||
<!--<group name="map" string="Website page Background Video Id">--> |
|||
<!--<label for="map_url" string="Video Id"/>--> |
|||
<!--<div>--> |
|||
<!--<div id="video_id" class="oe_inline">--> |
|||
<!--<field name="video_id" placeholder="Youtube Video Id"/>--> |
|||
<!--</div>--> |
|||
<!--</div>--> |
|||
<!--</group>--> |
|||
<!--</xpath>--> |
|||
<!--</field>--> |
|||
<!--</record>--> |
|||
</data> |
|||
</odoo> |
@ -0,0 +1,11 @@ |
|||
<odoo> |
|||
<data> |
|||
<template id="content_bg_video_id" inherit_id="website.user_navbar"> |
|||
<xpath expr="//div[@id='o_website_add_page_modal']//ul" position="inside"> |
|||
<li ><a href="#" data-action="new_bg_video_id"> |
|||
<i class="fa fa-youtube" aria-hidden="true"/> |
|||
<p>Background Video</p></a></li> |
|||
</xpath> |
|||
</template> |
|||
</data> |
|||
</odoo> |