'
+ );
});
-
- self.$el
- .find(".o_form_binary_file_web_cam")
- .off()
- .on("click", function () {
- // Init Webcam
- var dialog = new Dialog(self, {
- size: "large",
- dialogClass: "o_act_window",
- title: _t("WebCam Booth"),
- $content: WebCamDialog,
- buttons: [
- {
- text: _t("Take Snapshot"),
- classes: "btn-primary take_snap_btn",
- click: function () {
- Webcam.snap(function (data) {
- img_data = data;
- // Display Snap besides Live WebCam Preview
- WebCamDialog.find("#webcam_result").html(
- '
'
- );
- });
- });
},
});
diff --git a/web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml b/web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml
index 05116942d..7240073f5 100644
--- a/web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml
+++ b/web_widget_image_webcam/static/src/xml/web_widget_image_webcam.xml
@@ -2,11 +2,22 @@
-
-