4 changed files with 109 additions and 2 deletions
@ -0,0 +1,47 @@ |
|||
# -*- 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 <https://www.gnu.org/licenses/>. |
|||
# |
|||
############################################################################## |
|||
|
|||
{ |
|||
'name': "Website Video Background", |
|||
'version': '10.0.1.0.1', |
|||
'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/views.xml', |
|||
'views/conf_view.xml', |
|||
'views/templates.xml', |
|||
], |
|||
'demo': [ |
|||
], |
|||
'images': ['static/description/banner.jpg'], |
|||
'license': 'LGPL-3', |
|||
'installable': True, |
|||
'application': False |
|||
} |
@ -0,0 +1,59 @@ |
|||
odoo.define('snippet_video_bg.wrapwrap_bg_video', function (require) { |
|||
'use strict'; |
|||
|
|||
var ajax = require('web.ajax'); |
|||
var Dialog = require("web.Dialog"); |
|||
var core = require('web.core'); |
|||
var Widget = require('web.Widget'); |
|||
// var session = require('web.session');
|
|||
var base = require('web_editor.base'); |
|||
var contentMenu = require('website.contentMenu'); |
|||
|
|||
var qweb = core.qweb; |
|||
var _t = core._t; |
|||
base.url_translations = '/website/translations'; |
|||
|
|||
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 |
|||
}); |
|||
}); |
|||
}, |
|||
}); |
|||
}); |
|||
|
|||
odoo.define('snippet_video_bg.wrapwrap_bg_video_load', function (require) { |
|||
'use strict'; |
|||
var ajax = require('web.ajax'); |
|||
var Dialog = require("web.Dialog"); |
|||
var core = require('web.core'); |
|||
var Widget = require('web.Widget'); |
|||
var session = require('web.session'); |
|||
var base = require('web_editor.base'); |
|||
var Model = require('web.Model'); |
|||
|
|||
var qweb = core.qweb; |
|||
var _t = core._t; |
|||
base.url_translations = '/website/translations'; |
|||
|
|||
$('document').ready(function() { |
|||
|
|||
session.rpc("/get_video_id", {}) |
|||
.done(function(res) { |
|||
var options = { |
|||
videoId: res.video_id || false, |
|||
start: 0, |
|||
mute: true, |
|||
}; |
|||
$('#wrapwrap').tubular(options); |
|||
}); |
|||
|
|||
}); |
|||
|
|||
}); |
Loading…
Reference in new issue