Skip to content
Permalink
Browse files

[IMP]website, web_editor: improvement in code

  • Loading branch information...
var-odoo committed Apr 5, 2019
1 parent cbded11 commit ef7dd4d2367b956937e6a14b21e26406139e481b
@@ -845,7 +845,7 @@ var VideoWidget = MediaWidget.extend({
this.$('input#o_video_loop').prop('checked', src.indexOf('loop=1') >= 0);
this.$('input#o_video_hide_fullscreen').prop('checked', src.indexOf('fs=0') >= 0);
this.$('input#o_video_hide_yt_logo').prop('checked', src.indexOf('modestbranding=1') >= 0);
this.$('input#o_video_muted').prop('checked', src.indexOf('mute=1') >=0);
this.$('input#o_video_muted').prop('checked', src.indexOf('mute=1') >= 0);
this.$('input#o_video_hide_dm_logo').prop('checked', src.indexOf('ui-logo=0') >= 0);
this.$('input#o_video_hide_dm_share').prop('checked', src.indexOf('sharing-enable=0') >= 0);

@@ -798,7 +798,6 @@ registry.colorpicker = SnippetOption.extend({
/**
* Handles the edition of snippet's background image.
*/

registry.background = SnippetOption.extend({
/**
* @override
@@ -519,4 +519,4 @@ img.o_we_custom_image.mx-auto {
margin: 0;
padding: 0;
border: 0;
}
}
@@ -279,34 +279,30 @@
<div class="o_dm_option">
<label class="o_switch mb0"><input id="o_video_hide_dm_share" type="checkbox"/><span/>Hide sharing button</label>
</div>
<div class="row o_yt_option o_dm_option o_vim_option">
<div class="row o_yt_option o_dm_option o_vim_option mt-2">
<label class="col-md-4 pre_label">Video background</label>
<label class="col-md-7">
<label class="col-md-8">
<select name="background" id="o_video_background" class="form-control background">
<option value="js-transparent">Transparent</option>
<option value="js-animated-bg">Animated colors</option>
<option value="js-static-black">Static Black</option>
</select>
</label>
</div>
<div class="o_yt_option o_dm_option o_vim_option" style="overflow:hidden">
<label class="col-md-4 pre_label col-form-label" style="padding-left:0px">Opacity</label>
<label class="col-md-7">
<input name="opacity" id="o_video_opacity" type="range" step="0.1" min="0" max="1" value="1" placeholder="1"/>
<div class="row o_yt_option o_dm_option o_vim_option" style="overflow:hidden">
<label class="col-md-4 pre_label col-form-label">Opacity</label>
<label class="col-md-8">
<input class="my-2" name="opacity" id="o_video_opacity" type="range" step="0.1" min="0" max="1" value="1" placeholder="1"/>
</label>
</div>
<div class="o_yt_option o_dm_option o_vim_option">
<div class="o_yt_option o_dm_option o_vim_option custom-control custom-radio col-md-6">
<input type="radio" id="fitCont" name="iframefit" class="custom-control-input" value="fitCont" checked="checked"/>
<label for="fitCont" class="custom-control-label">
<small>Fill container with video</small>
</label>
<label for="fitCont" class="small custom-control-label">Fill container with video</label>
</div>
<div class="o_yt_option o_dm_option o_vim_option custom-control custom-radio col-md-6">
<input type="radio" id="fitIframe" name="iframefit" class="custom-control-input" value="fitIframe"/>
<label for="fitIframe" class="custom-control-label">
<small>Put video in container</small>
</label>
<label for="fitIframe" class="small custom-control-label">Put video in container</label>
</div>
</div>
</div>
@@ -3675,7 +3675,7 @@ QUnit.test('Video', function (assert) {
content: '<p><br></p><div class="media_iframe_video pull-left" data-oe-expression="about:blank" data-opacity="1" data-background="js-transparent" data-container="fitCont"><div class="css_editable_mode_display">&nbsp;</div><div class="media_iframe_video_size">&nbsp;</div><iframe src="about:blank" frameborder="0"></iframe></div><p><br></p>',
check: async function () {
await testUtils.dom.triggerEvents($('.note-image-popover .note-float .note-icon-align-center'), ['mousedown', 'click']);
await testUtils.dom.triggerEvents($('.note-image-popover .note-float .note-icon-align-left'), ['mousedown', 'click']);
await testUtils.dom.triggerEvents($('.note-image-popover .note-float .note-icon-align-left'), ['mousedown', 'click']);
},
},
},
Oops, something went wrong.

0 comments on commit ef7dd4d

Please sign in to comment.
You can’t perform that action at this time.