Browse Source

[FIX] js: Website Not found Issue

pull/30/merge
SHEREEF PT 8 years ago
parent
commit
fab9f6c97f
  1. 2
      snippet_video_bg/__manifest__.py
  2. 47
      snippet_video_bg/__manifest__.py~
  3. 3
      snippet_video_bg/static/src/js/bg_video.js
  4. 59
      snippet_video_bg/static/src/js/bg_video.js~

2
snippet_video_bg/__manifest__.py

@ -23,7 +23,7 @@
{
'name': "Website Video Background",
'version': '10.0.1.0.1',
'version': '10.0.1.0.2',
'summary': """Make Website Background as Video""",
'description': """
Website page background as youtube video.

47
snippet_video_bg/__manifest__.py~

@ -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
}

3
snippet_video_bg/static/src/js/bg_video.js

@ -8,6 +8,7 @@ odoo.define('snippet_video_bg.wrapwrap_bg_video', function (require) {
// var session = require('web.session');
var base = require('web_editor.base');
var contentMenu = require('website.contentMenu');
var website = require('website.website');
var qweb = core.qweb;
var _t = core._t;
@ -56,4 +57,4 @@ odoo.define('snippet_video_bg.wrapwrap_bg_video_load', function (require) {
});
});
});

59
snippet_video_bg/static/src/js/bg_video.js~

@ -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…
Cancel
Save