[IMP] sale: improve left menu and quotation builder
Adapt the left menu to correctly display each heading on a new line. Always show the left menu navigation, especially on mobile where it is the most useful to quickly go below. Remove unnecessary code from the quotation builder template. PR: #26801 task-1876864
This commit is contained in:
committed by
Romain Derie
parent
4decbcc55c
commit
6cde21413c
@@ -24,9 +24,6 @@ odoo.define('sale.SalePortalSidebar', function (require) {
|
||||
var PortalSidebar = require('portal.PortalSidebar');
|
||||
|
||||
var SalePortalSidebar = PortalSidebar.extend({
|
||||
events: {
|
||||
'click .o_portal_sale_print': '_onPrintSaleOrder',
|
||||
},
|
||||
/**
|
||||
* @override
|
||||
* @param {Object} $watched_selector
|
||||
@@ -97,7 +94,7 @@ var SalePortalSidebar = PortalSidebar.extend({
|
||||
}
|
||||
if (lastLI) {
|
||||
if (!lastUL) {
|
||||
lastUL = $("<ul class='nav'>").appendTo(lastLI);
|
||||
lastUL = $("<ul class='nav flex-column'>").appendTo(lastLI);
|
||||
}
|
||||
$("<li class='nav-item'>").append($('<a class="nav-link" href="#' + id + '"/>').text(text)).appendTo(lastUL);
|
||||
}
|
||||
@@ -126,20 +123,6 @@ var SalePortalSidebar = PortalSidebar.extend({
|
||||
});
|
||||
return rawText.join(' ');
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Handlers
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
_onPrintSaleOrder: function (ev) {
|
||||
ev.preventDefault();
|
||||
var href = $(ev.currentTarget).attr('href');
|
||||
this._printIframeContent(href);
|
||||
},
|
||||
});
|
||||
|
||||
return SalePortalSidebar;
|
||||
|
||||
@@ -150,8 +150,8 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="navspy list-group-item pl-0 d-none d-lg-block flex-grow-1" t-ignore="true" role="complementary">
|
||||
<ul class="nav flex-column bs-sidenav" data-id="quote_sidebar"></ul>
|
||||
<li class="navspy list-group-item pl-0 flex-grow-1" t-ignore="true" role="complementary">
|
||||
<ul class="nav flex-column bs-sidenav"></ul>
|
||||
</li>
|
||||
|
||||
<t t-if="not sale_order.is_expired and sale_order.state in ['draft', 'sent']">
|
||||
|
||||
@@ -18,17 +18,10 @@
|
||||
<!-- Template to edit the quotation template with the website editor -->
|
||||
<template id="so_template" name="SO Template">
|
||||
<t t-call="website.layout">
|
||||
<body data-spy="scroll" data-target=".navspy" data-offset="50">
|
||||
<body>
|
||||
<div class="container o_sale_order">
|
||||
<div class="row mt16">
|
||||
<div class="col-lg-3 d-print-none">
|
||||
<div class="bs-sidebar">
|
||||
<div class="navspy" role="complementary" t-ignore="True">
|
||||
<ul class="nav bs-sidenav" data-id="quote_sidebar"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-9">
|
||||
<div class="col-lg-9 ml-auto">
|
||||
<div class="row mb8">
|
||||
<div t-ignore="true" class="css_editable_mode_hidden offset-lg-11">
|
||||
<a role="button" class="btn btn-info d-print-none" t-att-href="'/web#return_label=Website&model=%s&id=%s&action=%s&view_type=form' % (template._name, template.id, request.env.ref('sale_management.sale_order_template_action').id)">Back</a>
|
||||
|
||||
Reference in New Issue
Block a user