Browse Source

[10.0][MIG]migrate web_widget_image_webcam v10

pull/649/head
smurf-U 8 years ago
parent
commit
c43ba80d4a
  1. 12
      web_widget_image_webcam/README.rst
  2. 5
      web_widget_image_webcam/__manifest__.py
  3. 8
      web_widget_image_webcam/static/src/css/web_widget_image_webcam.css
  4. 4
      web_widget_image_webcam/static/src/js/webcam_widget.js
  5. 10
      web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml

12
web_widget_image_webcam/README.rst

@ -25,17 +25,6 @@ Set the configuration parameter ``web_widget_image_webcam.flash_fallback_mode``
Its done! Now this module also work with websites without SSL / HTTPS. Its done! Now this module also work with websites without SSL / HTTPS.
Usage
=====
To use this module, you need to:
#. Go to ...
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/162/9.0
Bug Tracker Bug Tracker
=========== ===========
@ -51,6 +40,7 @@ Contributors
------------ ------------
* Siddharth Bhalgami <siddharth.bhalgami@techreceptives.com> * Siddharth Bhalgami <siddharth.bhalgami@techreceptives.com>
* Kaushal Prajapati <kbprajapati@live.com>
Maintainer Maintainer
---------- ----------

5
web_widget_image_webcam/__openerp__.py → web_widget_image_webcam/__manifest__.py

@ -4,11 +4,12 @@
{ {
"name": "Web Widget - Image WebCam", "name": "Web Widget - Image WebCam",
"summary": "Allows to take image with WebCam", "summary": "Allows to take image with WebCam",
"version": "9.0.1.0.0",
"version": "10.0.1.0.0",
"category": "web", "category": "web",
"website": "https://www.techreceptives.com", "website": "https://www.techreceptives.com",
"author": "Tech Receptives, " "author": "Tech Receptives, "
"Odoo Community Association (OCA)",
"Odoo Community Association (OCA), "
"Kaushal Prajapati",
"license": "LGPL-3", "license": "LGPL-3",
"data": [ "data": [
"views/assets.xml", "views/assets.xml",

8
web_widget_image_webcam/static/src/css/web_widget_image_webcam.css

@ -2,11 +2,13 @@
Copyright 2016 Siddharth Bhalgami <siddharth.bhalgami@techreceptives.com> Copyright 2016 Siddharth Bhalgami <siddharth.bhalgami@techreceptives.com>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
*/ */
.openerp .oe_form .oe_form_field_image .oe_form_field_image_controls
.oe_form_binary_file_web_cam {
.o_form_view.o_form_editable .o_form_field_image .o_form_image_controls
.o_form_binary_file_web_cam {
color: inherit; color: inherit;
} }
.o_form_view .o_form_field_image .o_form_image_controls > .fa{
margin:3px;
}
.live_webcam_outer_div, .webcam_result_outer_div { .live_webcam_outer_div, .webcam_result_outer_div {
padding-left: 20px; padding-left: 20px;
} }

4
web_widget_image_webcam/static/src/js/webcam_widget.js

@ -35,7 +35,7 @@ odoo.define('web_widget_image_webcam.webcam_widget', function(require) {
swfURL: '/web_widget_image_webcam/static/src/js/webcam.swf', swfURL: '/web_widget_image_webcam/static/src/js/webcam.swf',
}); });
self.$el.find('.oe_form_binary_file_clear').removeClass('col-md-offset-5');
self.$el.find('.o_form_binary_file_web_cam').removeClass('col-md-offset-5');
new Model('ir.config_parameter').call('get_param', ['web_widget_image_webcam.flash_fallback_mode', false]). new Model('ir.config_parameter').call('get_param', ['web_widget_image_webcam.flash_fallback_mode', false]).
then(function(default_flash_fallback_mode) { then(function(default_flash_fallback_mode) {
@ -50,7 +50,7 @@ odoo.define('web_widget_image_webcam.webcam_widget', function(require) {
} }
}); });
self.$el.find('.oe_form_binary_file_web_cam').off().on('click', function(){
self.$el.find('.o_form_binary_file_web_cam').off().on('click', function(){
// Init Webcam // Init Webcam
new Dialog(self, { new Dialog(self, {
size: 'large', size: 'large',

10
web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml

@ -4,8 +4,8 @@
<template id="template" xml:space="preserve"> <template id="template" xml:space="preserve">
<t t-extend="FieldBinaryImage"> <t t-extend="FieldBinaryImage">
<t t-jquery=".oe_form_binary_file_edit" t-operation="after">
<a class="fa fa-eye fa-1g col-md-4 oe_form_binary_file_web_cam" title="WebCam"></a>
<t t-jquery=".o_select_file_button" t-operation="after">
<span class="fa fa-eye o_form_binary_file_web_cam" title="WebCam"/>
</t> </t>
</t> </t>
@ -14,11 +14,11 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-5 live_webcam_outer_div"> <div class="col-md-5 live_webcam_outer_div">
<div id="live_webcam"></div>
<div id="live_webcam"/>
</div> </div>
<div class="col-md-2 mt64 direction_icon fa fa-angle-right fa-8x"></div>
<div class="col-md-2 mt64 direction_icon fa fa-angle-right fa-8x"/>
<div class="col-md-5 webcam_result_outer_div"> <div class="col-md-5 webcam_result_outer_div">
<div id="webcam_result"></div>
<div id="webcam_result"/>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save