[FIX] website_slides: avoid scroll while creating section during tour

Currently, during the slide tour, while adding 'Section' from the
website, the modal is opened, and the tour/bubble for this step is
added at the bottom of the input which introduces a vertical scrollbar
to this simple modal which looks ugly.

This commit removes this step (and thus bubble for input), and simply
provides a placeholder for this input.

And, for the section modal next step ('Save' button), we simply improve
the wordings of the message, which now asks the user to pick
a name for the section first.

The same issue also happens while uploading new 'Content' from the
website, and so to avoid scrollbar here, this commit also adds little
bottom margin for the anchor (so that there's enough space for tour
bubble).

Task-2616529

closes odoo/odoo#75976

X-original-commit: 7757c5bfd3c6ef760035bcae9cfda9c919fb773e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Mitul Shah
2021-09-07 08:53:13 +00:00
committed by Dharmraj Jhala
parent 55b4891d87
commit 173b3001a4
3 changed files with 3 additions and 7 deletions
@@ -35,13 +35,9 @@ tour.register('slides_tour', {
trigger: '.o_wslides_js_slide_section_add',
content: Markup(_t("Congratulations, your course has been created, but there isn't any content yet. First, let's add a <b>Section</b> to give your course a structure.")),
position: 'bottom',
}, {
trigger: 'input[name="name"]',
content: Markup(_t("A good course has structure and a table of content. Your first section will be the <b>Introduction</b>.")),
position: 'bottom',
}, {
trigger: 'button.btn-primary',
content: Markup(_t("Click on <b>Save</b> to apply changes.")),
content: Markup(_t("A good course has a structure. Pick a name for your first section and click <b>Save</b> to create it.")),
position: 'bottom',
width: 260,
}, {
@@ -21,7 +21,7 @@
<div class="form-group row">
<label for="section_name" class="col-sm-3 col-form-label">Section name</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="name" id="section_name" required="required"/>
<input type="text" class="form-control" name="name" id="section_name" required="required" placeholder="e.g. Introduction"/>
</div>
</div>
</form>
@@ -13,7 +13,7 @@
Slide Type Selection template
-->
<t t-name="website.slide.upload.modal.select">
<div class="row p-1 mt-4">
<div class="row p-1 mt-4 mb-2">
<div t-foreach="widget.slide_type_data" t-as="slide_type" class="col-6 col-md-3">
<t t-set="type_data" t-value="widget.slide_type_data[slide_type]"/>