changeset 6e5f752025b9 in sao:default
details: https://hg.tryton.org/sao?cmd=changeset;node=6e5f752025b9
description:
        Customize default bootstrap theme

        The bootstrap rules are imported from sao less file to override some 
variables.
        We embed a stripped version of the bootswatch paper theme.
        We also try to import an option custom.less file.

        issue9427
        review294011002
diffstat:

 CHANGELOG              |    1 +
 COPYRIGHT              |    1 +
 Gruntfile.js           |   21 +-
 index.html             |   29 +-
 src/input-icon.less    |    5 +-
 src/offcanvas.less     |    6 +-
 src/sao-variables.less |   29 ++
 src/sao.js             |   30 +-
 src/sao.less           |   96 +++++++-
 src/screen.js          |    2 +-
 src/tab.js             |    3 +-
 src/theme.less         |  568 +++++++++++++++++++++++++++++++++++++++++++++++++
 src/view/tree.js       |    2 +-
 13 files changed, 738 insertions(+), 55 deletions(-)

diffs (1025 lines):

diff -r aa38a1d3a922 -r 6e5f752025b9 CHANGELOG
--- a/CHANGELOG Sun Aug 16 16:32:59 2020 +0200
+++ b/CHANGELOG Sun Aug 16 17:43:21 2020 +0200
@@ -1,3 +1,4 @@
+* Customize bootstrap default style
 * Set field's name as input's name attribute
 * Position copied records based on order
 * Sanitize translated RichtText fields content (issue9453)
diff -r aa38a1d3a922 -r 6e5f752025b9 COPYRIGHT
--- a/COPYRIGHT Sun Aug 16 16:32:59 2020 +0200
+++ b/COPYRIGHT Sun Aug 16 17:43:21 2020 +0200
@@ -3,6 +3,7 @@
 Copyright (C) 2012-2014 Bertrand Chenal.
 Copyright (C) 2012-2020 B2CK SPRL.
 Copyright (C) 2019 Jitbit.
+Copyright (C) 2013 Thomas Park
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff -r aa38a1d3a922 -r 6e5f752025b9 Gruntfile.js
--- a/Gruntfile.js      Sun Aug 16 16:32:59 2020 +0200
+++ b/Gruntfile.js      Sun Aug 16 17:43:21 2020 +0200
@@ -100,19 +100,32 @@
     less: {
         dev: {
             options: {
-                paths: ['src', 'bower_components/bootstrap/less']
+                paths: [
+                    'src',
+                    'bower_components',
+                    'bower_components/bootstrap',
+                    'bower_components/bootstrap/less',
+                    'bower_components/bootstrap-rtl-ondemand/less',
+                    
'bower_components/eonasdan-bootstrap-datetimepicker/src/less',
+                ]
             },
             files: {
-                'dist/<%= pkg.name %>.css': 'src/*.less'
+                'dist/<%= pkg.name %>.css': 'src/sao.less'
             }
         },
         'default': {
             options: {
-                paths: ['src', 'bower_components/bootstrap/less'],
+                paths: [
+                    'src',
+                    'bower_components',
+                    'bower_components/bootstrap/less',
+                    'bower_components/bootstrap-rtl-ondemand/less',
+                    
'bower_components/eonasdan-bootstrap-datetimepicker/src/less',
+                ],
                 yuicompress: true
             },
             files: {
-                'dist/<%= pkg.name %>.min.css': 'src/*.less'
+                'dist/<%= pkg.name %>.min.css': 'src/sao.less'
             }
         }
     },
diff -r aa38a1d3a922 -r 6e5f752025b9 index.html
--- a/index.html        Sun Aug 16 16:32:59 2020 +0200
+++ b/index.html        Sun Aug 16 17:43:21 2020 +0200
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
-<html style="overflow: auto;" lang="en">
+<html style="overflow: auto;" lang="en" theme="default">
     <head>
         <meta charset="utf-8"/>
         <meta name="viewport" content="width=device-width, initial-scale=1"/>
@@ -23,9 +23,6 @@
         <script type="text/javascript" 
src="bower_components/mousetrap/mousetrap.min.js"></script>
         <script type="text/javascript" 
src="bower_components/Sortable/Sortable.js"></script>
 
-        <link rel="stylesheet" 
href="bower_components/bootstrap/dist/css/bootstrap.min.css">
-        <link rel="stylesheet" 
href="bower_components/bootstrap-rtl-ondemand/dist/css/bootstrap-rtl-ondemand.min.css">
-        <link rel="stylesheet" 
href="bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css">
         <link rel="stylesheet" href="bower_components/c3/c3.min.css">
         <link rel="stylesheet" 
href="bower_components/fullcalendar/dist/fullcalendar.min.css">
 
@@ -42,7 +39,7 @@
         <link rel="stylesheet" type="text/css" href="custom.css" 
media="screen"/>
         </head>
         <body>
-        <nav class="navbar navbar-default navbar-static-top" role="navigation" 
style="margin-bottom: 0px;">
+        <nav class="navbar navbar-inverse navbar-static-top" role="navigation" 
style="margin-bottom: 0px;">
             <div class="container-fluid">
                 <div class="navbar-header">
                     <button type="button" class="navbar-toggle collapsed"
@@ -50,7 +47,12 @@
                         <span class="caret"></span>
                     </button>
                     <a class="navbar-brand" href="javascript:void(0)" 
data-toggle="offcanvas">
-                        <img class="icon" style="display:inline;" 
src="images/tryton-menu.svg"></img>
+                        <span class="icon">
+                            <svg xmlns="http://www.w3.org/2000/svg"; width="24" 
height="24" viewBox="0 0 24 24" fill="currentColor">
+                                <path d="M0 0h24v24H0z" fill="none"/>
+                                <path d="M3 
18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/>
+                            </svg>
+                        </span>
                         <span id="title">Tryton</span>
                     </a>
                 </div>
@@ -59,9 +61,20 @@
                     </form>
                     <ul class="nav navbar-nav navbar-right flip">
                         <li id="user-preferences"></li>
-                        <li id="user-logout"></li>
+                        <li id="user-logout">
+                            <a href="#">
+                                <span class="icon hidden-xs">
+                                    <svg xmlns="http://www.w3.org/2000/svg"; 
width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
+                                        <path d="M0 0h24v24H0z" fill="none"/>
+                                        <path d="M10.09 15.59L11.5 
17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 
2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>
+                                    </svg>
+                                </span>
+                                <span class="visible-xs">
+                                </span>
+                            </a>
+                        </li>
                     </ul>
-                    <ul id="tablist" class="nav navbar-nav nav-tabs 
nav-tabs-justified" role="tablist">
+                    <ul id="tablist" class="nav navbar-nav nav-pills" 
role="tablist">
                     </ul>
                 </div>
             </div>
diff -r aa38a1d3a922 -r 6e5f752025b9 src/input-icon.less
--- a/src/input-icon.less       Sun Aug 16 16:32:59 2020 +0200
+++ b/src/input-icon.less       Sun Aug 16 17:43:21 2020 +0200
@@ -1,6 +1,5 @@
-/*
- * Input icons
- */
+/* This file is part of Tryton.  The COPYRIGHT file at the top level of
+   this repository contains the full copyright notices and license terms. */
 @import "variables";
 
 .input-icon {
diff -r aa38a1d3a922 -r 6e5f752025b9 src/offcanvas.less
--- a/src/offcanvas.less        Sun Aug 16 16:32:59 2020 +0200
+++ b/src/offcanvas.less        Sun Aug 16 17:43:21 2020 +0200
@@ -1,7 +1,5 @@
-/*
- * Off Canvas
- * --------------------------------------------------
- */
+/* This file is part of Tryton.  The COPYRIGHT file at the top level of
+   this repository contains the full copyright notices and license terms. */
 @import "variables";
 
 @offcanvas-md: @screen-md-max;
diff -r aa38a1d3a922 -r 6e5f752025b9 src/sao-variables.less
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/src/sao-variables.less    Sun Aug 16 17:43:21 2020 +0200
@@ -0,0 +1,29 @@
+/* This file is part of Tryton.  The COPYRIGHT file at the top level of
+   this repository contains the full copyright notices and license terms. */
+@brand-primary: #267f82;
+@brand-success: #32ad52;
+@brand-info: #71bdc1;
+@brand-warning: #e78e42;
+@brand-danger: #e74842;
+
+@state-selected-text: lighten(@brand-primary, 25%);
+@state-selected-bg: lighten(@brand-primary, 50%);
+@state-selected-border: darken(spin(@state-selected-bg, -10), 5%);
+
+@input-border-focus: lighten(@brand-primary, 25%);
+
+@navbar-inverse-bg: @brand-primary;
+
+@navbar-inverse-link-color: lighten(@brand-primary, 30%);
+
+@navbar-inverse-toggle-hover-bg: rgba(0,0,0,0.5);
+@navbar-inverse-toggle-icon-bar-bg: rgba(0,0,0,0.5);
+
+@nav-tabs-justified-link-border-color: @nav-tabs-border-color;
+
+@panel-default-text: #fff;
+@panel-default-heading-bg: @brand-primary;
+
+@icon-font-path: "../bower_components/bootstrap/fonts/";
+
+@font-size-small: @font-size-base;
diff -r aa38a1d3a922 -r 6e5f752025b9 src/sao.js
--- a/src/sao.js        Sun Aug 16 16:32:59 2020 +0200
+++ b/src/sao.js        Sun Aug 16 17:43:21 2020 +0200
@@ -281,9 +281,9 @@
     Sao.config.display_size = 20;
     Sao.config.bug_url = 'https://bugs.tryton.org/';
     Sao.config.title = 'Tryton';
-    Sao.config.icon_colors = '#3465a4,#555753,#cc0000'.split(',');
-    Sao.config.calendar_colors = '#fff,#3465a4'.split(',');
-    Sao.config.graph_color = '#3465a4';
+    Sao.config.icon_colors = '#267f82,#3e4950,#e78e42'.split(',');
+    Sao.config.calendar_colors = '#fff,#267f82'.split(',');
+    Sao.config.graph_color = '#267f82';
     Sao.config.bus_timeout = 10 * 60 * 1000;
 
     Sao.i18n = i18n();
@@ -350,10 +350,6 @@
                         Sao.Action.execute(action_id, {}, null, {});
                     });
                     Sao.set_title();
-                    Sao.common.ICONFACTORY.get_icon_url('tryton-menu')
-                        .then(function(url) {
-                            jQuery('.navbar-brand > img').attr('src', url);
-                        });
                     var new_lang = preferences.language != 
Sao.i18n.getLocale();
                     var prm = jQuery.Deferred();
                     Sao.i18n.setlang(preferences.language).always(function() {
@@ -572,7 +568,6 @@
         var session = Sao.Session.current_session;
         Sao.Tab.tabs.close(true).done(function() {
             jQuery('#user-preferences').empty();
-            jQuery('#user-logout').empty();
             jQuery('#user-favorites').empty();
             jQuery('#global-search').empty();
             jQuery('#menu').empty();
@@ -585,7 +580,6 @@
         Sao.Tab.tabs.close(true).done(function() {
             jQuery('#user-preferences').empty();
             jQuery('#user-favorites').empty();
-            jQuery('#user-logout').empty();
             jQuery('#menu').empty();
             new Sao.Window.Preferences(function() {
                 Sao.Session.current_session.reset_context();
@@ -665,7 +659,6 @@
     Sao.user_menu = function(preferences) {
         jQuery('#user-preferences').empty();
         jQuery('#user-favorites').empty();
-        jQuery('#user-logout').empty();
         jQuery('#user-preferences').append(jQuery('<a/>', {
             'href': '#',
             'title': preferences.status_bar,
@@ -674,17 +667,12 @@
             Sao.preferences();
         }).text(preferences.status_bar));
         var title = Sao.i18n.gettext("Logout");
-        jQuery('#user-logout').append(jQuery('<a/>', {
-            'href': '#',
-            'title': title,
-            'aria-label': title,
-        }).click(Sao.logout).append(
-            Sao.common.ICONFACTORY.get_icon_img('tryton-exit', {
-            'class': 'icon hidden-xs',
-            'aria-hidden': true,
-        })).append(jQuery('<span/>', {
-            'class': 'visible-xs',
-        }).text(title)));
+        jQuery('#user-logout > a')
+            .attr('title', title)
+            .attr('aria-label', title)
+            .off()
+            .click(Sao.logout)
+            .find('span:not(.icon)').text(title);
     };
 
     Sao.main_menu_row_activate = function() {
diff -r aa38a1d3a922 -r 6e5f752025b9 src/sao.less
--- a/src/sao.less      Sun Aug 16 16:32:59 2020 +0200
+++ b/src/sao.less      Sun Aug 16 17:43:21 2020 +0200
@@ -1,5 +1,76 @@
-@import "variables";
-@import "mixins";
+/* This file is part of Tryton.  The COPYRIGHT file at the top level of
+   this repository contains the full copyright notices and license terms. */
+@import "bootstrap";
+@import "bootstrap-rtl";
+@import "bootstrap-datetimepicker-build";
+@import "sao-variables";
+html[theme="default"] {
+    @import "theme";
+}
+
+// Fix double rtl prefix
+.float-rtl-grid-columns(@class, @rtl-prefix) {
+  .col(@index) { // initial
+    @item: ~".col-@{class}-@{index}";
+    .col((@index + 1), @item);
+  }
+  .col(@index, @list) when (@index =< @grid-columns) { // general
+    @item: ~".col-@{class}-@{index}";
+    .col((@index + 1), ~"@{list}, @{item}");
+  }
+  .col(@index, @list) when (@index > @grid-columns) { // terminal
+    @{list} {
+      float: right;
+    }
+  }
+  .col(1); // kickstart it
+}
+
+
+.navbar-inverse {
+    .close {
+        color: @navbar-inverse-link-color;
+
+        &:hover,
+        &:focus {
+            color: @navbar-inverse-link-hover-color;
+            background-color: @navbar-inverse-link-hover-bg;
+        }
+    }
+    .active .close {
+        &,
+        &:hover,
+        &:focus {
+            color: @navbar-inverse-link-active-color;
+            background-color: @navbar-inverse-link-active-bg;
+        }
+    }
+}
+
+.navbar {
+    .icon {
+        display: inline-block;
+        height: unit(@line-height-base, em);
+        vertical-align: middle;
+    }
+}
+
+.btn-primary {
+    .icon {
+        filter: brightness(0) invert(1);
+    }
+}
+
+.panel-heading {
+    a {
+        color: inherit;
+    }
+}
+
+.modal-header {
+    background-color: @brand-primary;
+    color: #fff;
+}
 
 #tablist > li > a {
     > span {
@@ -73,8 +144,8 @@
     white-space: nowrap;
 }
 
-.list-group-item-variant(selected; @state-info-bg; @state-info-text);
-.table-row-variant(selected; @state-info-bg);
+.list-group-item-variant(selected; @state-selected-bg; @state-selected-text);
+.table-row-variant(selected; @state-selected-bg);
 /* Duplicate bootstrap variant to have precedence over selected */
 .table-row-variant(success; @state-success-bg);
 .table-row-variant(warning; @state-warning-bg);
@@ -400,7 +471,7 @@
         display: inline-table;
     }
     table.form-container > tbody > tr > td {
-        padding: 1px;
+        padding: 2px;
     }
     table.form-hcontainer > tbody > tr > td {
         padding-top: 0px;
@@ -523,6 +594,7 @@
     label {
         font-weight: normal;
         display: inline;
+        padding: 0 5px;
         &.required {
             font-weight: bold;
         }
@@ -534,7 +606,7 @@
         margin-bottom: 15px;
     }
     .panel-heading {
-        padding: 1px 1px;
+        padding: 2px 2px;
     }
     fieldset.form-group_ {
         overflow: auto;
@@ -573,12 +645,6 @@
     .center-block();
 }
 
-.form-boolean, .dict-boolean, .editabletree-boolean {
-    input[type=checkbox] {
-        width: initial;
-    }
-}
-
 .dict-label {
     text-align: right;
     text-align: end;
@@ -756,6 +822,8 @@
     transform: translateX(-50%);
     z-index: 1000;
     min-width: 50%;
+    text-align: center;
+    font-size: @font-size-large;
 }
 
 img.global-search-icon {
@@ -767,3 +835,7 @@
     width: 1em;
     height: 1em;
 }
+
+@import "input-icon";
+@import "offcanvas";
+@import (optional) "custom.less";
diff -r aa38a1d3a922 -r 6e5f752025b9 src/screen.js
--- a/src/screen.js     Sun Aug 16 16:32:59 2020 +0200
+++ b/src/screen.js     Sun Aug 16 17:43:21 2020 +0200
@@ -29,7 +29,7 @@
             this.el.append(this.filter_box);
             this.filter_button = jQuery('<button/>', {
                 type: 'button',
-                'class': 'btn btn-default'
+                'class': 'btn btn-link'
             }).text(Sao.i18n.gettext('Filters'));
             this.filter_button.click(this.search_box.bind(this));
             this.search_entry = jQuery('<input/>', {
diff -r aa38a1d3a922 -r 6e5f752025b9 src/tab.js
--- a/src/tab.js        Sun Aug 16 16:32:59 2020 +0200
+++ b/src/tab.js        Sun Aug 16 17:43:21 2020 +0200
@@ -164,7 +164,7 @@
                 'class': 'toolbar panel-heading',
                 'role': 'toolbar'
             }).append(jQuery('<div/>', {
-                'class': 'container-fluid'
+                'class': 'container-fluid navbar-inverse'
             }).append(jQuery('<div/>', {
                 'class': 'dropdown navbar-header navbar-left flip'
             }).append(jQuery('<a/>', {
@@ -1204,6 +1204,7 @@
                     color = '';
                 }
                 badge.css('background-color', color);
+                badge.css('color', '#fff');
                 badge.text(text);
                 button.attr('title', title);
                 button.prop('disabled', disabled);
diff -r aa38a1d3a922 -r 6e5f752025b9 src/theme.less
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/src/theme.less    Sun Aug 16 17:43:21 2020 +0200
@@ -0,0 +1,568 @@
+/* This file is part of Tryton.  The COPYRIGHT file at the top level of
+   this repository contains the full copyright notices and license terms. */
+/* The MIT License (MIT)
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+@input-border-radius: 0;
+@input-border-radius-large: 0;
+@input-border-radius-small: 0;
+@input-bg-disabled: transparent;
+
+.navbar {
+    border: none;
+    .box-shadow(0 1px 2px rgba(0,0,0,.3));
+}
+
+#btn(@class, @bg) {
+    .btn-@{class} {
+
+        &:focus,
+        &:hover,
+        &:active:hover {
+            background-color: darken(@bg, 6%);
+        }
+
+        &:active {
+            background-color: darken(@bg, 12%);
+            #gradient > .radial(darken(@bg, 12%) 10%, @bg 11%);
+            background-size: 1000% 1000%;
+            .box-shadow(2px 2px 4px rgba(0,0,0,.4));
+        }
+    }
+}
+
+#btn(default, @btn-default-bg);
+#btn(primary, @btn-primary-bg);
+#btn(success, @btn-success-bg);
+#btn(info, @btn-info-bg);
+#btn(warning, @btn-warning-bg);
+#btn(danger, @btn-danger-bg);
+#btn(link, #fff);
+
+.btn {
+    text-transform: uppercase;
+    border: none;
+    .box-shadow(1px 1px 4px rgba(0,0,0,.4));
+    .transition(all 0.4s);
+
+    &-link {
+        border-radius: @btn-border-radius-base;
+        .box-shadow(none);
+        color: @btn-default-color;
+
+        &:hover,
+        &:focus {
+            .box-shadow(none);
+            color: @btn-default-color;
+            text-decoration: none;
+        }
+    }
+
+    &-default {
+
+        &.disabled {
+            background-color: rgba(0, 0, 0, 0.1);
+            color: rgba(0, 0, 0, 0.4);
+            opacity: 1;
+        }
+    }
+}
+
+.table-hover {
+    > tbody > tr,
+    > tbody > tr > th,
+    > tbody > tr > td {
+        .transition(all 0.2s);
+    }
+}
+
+textarea,
+textarea.form-control,
+input.form-control,
+input[type=text],
+input[type=password],
+input[type=email],
+input[type=number],
+[type=text].form-control,
+[type=password].form-control,
+[type=email].form-control,
+[type=tel].form-control,
+[contenteditable].form-control {
+    padding: 0 5px;
+    border: none;
+    -webkit-appearance: none;
+    .box-shadow(inset 0 -1px 0 #ddd);
+
+    &:focus {
+        .box-shadow(inset 0 -2px 0 @brand-primary);
+    }
+
+    &[disabled],
+    &[readonly] {
+        .box-shadow(none);
+        border-bottom: 2px dotted #ddd;
+    }
+
+    &.input {
+        &-sm {
+            font-size: @font-size-small;
+        }
+
+        &-lg {
+            font-size: @font-size-large;
+        }
+    }
+}
+
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon {
+    padding: 0 5px;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon {
+    padding: 0 5px;
+}
+
+select,
+select.form-control {
+    border: 0;
+    border-radius: 0;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none;
+    padding-left: 0;
+    padding-right: 0;
+    background-image: 
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAJ1BMVEVmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmaP/QSjAAAADHRSTlMAAgMJC0uWpKa6wMxMdjkoAAAANUlEQVR4AeXJyQEAERAAsNl7Hf3X6xt0QL6JpZWq30pdvdadme+0PMdzvHm8YThHcT1H7K0BtOMDniZhWOgAAAAASUVORK5CYII=);
+    background-size: 13px;
+    background-repeat: no-repeat;
+    background-position: right center;
+    .box-shadow(inset 0 -1px 0 #ddd);
+    font-size: 16px;
+    line-height: 1.5;
+
+    &::-ms-expand {
+        display: none;
+    }
+
+    &.input {
+        &-sm {
+            font-size: @font-size-small;
+        }
+
+        &-lg {
+            font-size: @font-size-large;
+        }
+    }
+
+    &:focus {
+        .box-shadow(inset 0 -2px 0 @brand-primary);
+        background-image: 
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAJ1BMVEUhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISF8S9ewAAAADHRSTlMAAgMJC0uWpKa6wMxMdjkoAAAANUlEQVR4AeXJyQEAERAAsNl7Hf3X6xt0QL6JpZWq30pdvdadme+0PMdzvHm8YThHcT1H7K0BtOMDniZhWOgAAAAASUVORK5CYII=);
+    }
+
+    &[multiple] {
+        background: none;
+    }
+}
+
+.radio,
+.radio-inline,
+.checkbox,
+.checkbox-inline {
+    label {
+        padding-left: 25px;
+    }
+
+    input[type="radio"],
+    input[type="checkbox"] {
+        margin-left: -25px;
+    }
+}
+
+input[type="radio"],
+.radio input[type="radio"],
+.radio-inline input[type="radio"] {
+    position: relative;
+    border: none;
+    -webkit-appearance: none;
+    appearance: none;
+    cursor: pointer;
+
+    &:focus {
+        outline: none;
+    }
+
+    &:before,
+    &:after {
+        content: "";
+        display: block;
+        width: 18px;
+        height: 18px;
+        left: 50%;
+        margin: auto;
+        margin-left: -9px;
+        border-radius: 50%;
+        .transition(240ms);
+    }
+
+    &.form-control:before,
+    &.form-control:after {
+        top: 6px;
+    }
+
+    &:before {
+        position: absolute;
+        background-color: @brand-primary;
+        .scale(0);
+    }
+
+    &:after {
+        position: relative;
+        border: 2px solid @gray;
+    }
+
+    &:checked:before {
+        .scale(0.5);
+    }
+
+    &:disabled:checked:before {
+        background-color: @gray-light;
+    }
+
+    &:checked:after {
+        border-color: @brand-primary;
+    }
+
+    &:disabled:after,
+    &[readonly]:after,
+    &:disabled:checked:after,
+    &[readonly]:checked:after {
+        border-color: @gray-light;
+    }
+}
+
+input[type="checkbox"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+    position: relative;
+    border: none;
+    -webkit-appearance: none;
+    appearance: none;
+    cursor: pointer;
+
+    &:focus {
+        outline: none;
+    }
+
+    &:focus:before {
+        border-color: @brand-primary;
+    }
+
+    &:before {
+        content: "";
+        display: block;
+        width: 18px;
+        height: 18px;
+        margin: auto;
+        border: 2px solid @gray;
+        border-radius: 2px;
+        .transition(240ms);
+    }
+
+    &.form-control:before {
+        position: absolute;
+        top: 6px;
+        left: 0;
+        right: 0;
+    }
+
+    &:checked:after {
+        content: "";
+        position: absolute;
+        top: 1px;
+        left: 50%;
+        display: table;
+        width: 6px;
+        height: 12px;
+        margin: auto;
+        margin-left: -3px;
+        border: 2px solid #fff;
+        border-top-width: 0;
+        border-left-width: 0;
+        .rotate(45deg);
+    }
+
+    &.form-control:after {
+        top: 6px;
+    }
+
+    &:indeterminate:after {
+        content: "";
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        margin-left: -7px;
+        transform: translate(0, -50%);
+        width: 14px;
+        height: 2px;
+        background: #fff;
+    }
+
+    &:checked:before,
+    &:indeterminate:before {
+        background-color: @brand-primary;
+        border-color: @brand-primary;
+    }
+
+    &:disabled:before,
+    &[readonly]:before {
+        border-color: @gray-light;
+    }
+
+    &:disabled:checked:before,
+    &[readonly]:checked:before {
+        background-color: @gray-light;
+        border-color: transparent;
+    }
+}
+
+.form-boolean, .dict-boolean, .editabletree-boolean {
+    input[type=checkbox] {
+        width: default;
+    }
+}
+
+.has-warning {
+    input:not([type=checkbox]),
+    .form-control,
+    input.form-control[readonly],
+    input[type=text][readonly],
+    [type=text].form-control[readonly],
+    input:not([type=checkbox]):focus,
+    .form-control:focus {
+        border-bottom: none;
+        .box-shadow(inset 0 -2px 0 @brand-warning);
+    }
+}
+
+.has-error {
+    input:not([type=checkbox]),
+    .form-control,
+    input.form-control[readonly],
+    input[type=text][readonly],
+    [type=text].form-control[readonly],
+    input:not([type=checkbox]):focus,
+    .form-control:focus {
+        border-bottom: none;
+        .box-shadow(inset 0 -2px 0 @brand-danger);
+    }
+}
+
+.has-success {
+    input:not([type=checkbox]),
+    .form-control,
+    input.form-control[readonly],
+    input[type=text][readonly],
+    [type=text].form-control[readonly],
+    input:not([type=checkbox]):focus,
+    .form-control:focus {
+        border-bottom: none;
+        .box-shadow(inset 0 -2px 0 @brand-success);
+    }
+}
+
+.nav-tabs {
+    > li > a,
+    > li > a:focus {
+        margin-right: 0;
+        background-color: transparent;
+        border: none;
+        color: @navbar-default-link-color;
+        .box-shadow(inset 0 -1px 0 #ddd);
+        .transition(all 0.2s);
+
+        &:hover {
+            background-color: transparent;
+            .box-shadow(inset 0 -2px 0 @brand-primary);
+            color: @brand-primary;
+        }
+    }
+
+    & > li.active > a,
+    & > li.active > a:focus {
+        border: none;
+        .box-shadow(inset 0 -2px 0 @brand-primary);
+        color: @brand-primary;
+
+        &:hover {
+            border: none;
+            color: @brand-primary;
+        }
+    }
+
+    & > li.disabled > a {
+        .box-shadow(inset 0 -1px 0 #ddd);
+    }
+
+    &.nav-justified {
+
+        & > li > a,
+        & > li > a:hover,
+        & > li > a:focus,
+        & > .active > a,
+        & > .active > a:hover,
+        & > .active > a:focus {
+            border: none;
+        }
+    }
+
+    .dropdown-menu {
+        margin-top: 0;
+    }
+}
+
+.dropdown-menu {
+    margin-top: 0;
+    border: none;
+    .box-shadow(0 1px 4px rgba(0,0,0,.3));
+}
+
+.alert {
+    border: none;
+    color: #fff;
+
+    &-success {
+        background-color: @brand-success;
+    }
+
+    &-info {
+        background-color: @brand-info;
+    }
+
+    &-warning {
+        background-color: @brand-warning;
+    }
+
+    &-danger {
+        background-color: @brand-danger;
+    }
+
+    a:not(.close):not(.btn),
+    .alert-link {
+        color: #fff;
+        font-weight: bold;
+    }
+
+    .close {
+        color: #fff;
+    }
+}
+
+.badge {
+    padding: 4px 6px 4px;
+}
+
+.progress {
+    position: relative;
+    z-index: 1;
+    border-radius: 0;
+
+    .box-shadow(none);
+
+    &-bar {
+        .box-shadow(none);
+
+        &:last-child {
+            border-radius: 0 3px 3px 0;
+        }
+
+        &:last-child {
+            &:before {
+                display: block;
+                content: "";
+                position: absolute;
+                width: 100%;
+                height: 100%;
+                left: 0;
+                right: 0;
+                z-index: -1;
+                background-color: lighten(@progress-bar-bg, 35%);
+            }
+        }
+
+        &-success:last-child.progress-bar:before {
+            background-color: lighten(@brand-success, 35%);
+        }
+
+        &-info:last-child.progress-bar:before {
+            background-color: lighten(@brand-info, 45%);
+        }
+        &-warning:last-child.progress-bar:before {
+            background-color: lighten(@brand-warning, 35%);
+        }
+
+        &-danger:last-child.progress-bar:before {
+            background-color: lighten(@brand-danger, 25%);
+        }
+    }
+}
+
+.close {
+    font-size: 34px;
+    font-weight: 300;
+    line-height: inherit;
+    opacity: 0.6;
+    .transition(all 0.2s);
+
+    &:hover {
+        opacity: 1;
+    }
+}
+
+.well {
+    border-radius: 0;
+    .box-shadow(none);
+}
+
+.panel {
+    border: none;
+    border-radius: 2px;
+    .box-shadow(0 1px 4px rgba(0,0,0,.3));
+
+    &-heading {
+        border-bottom: none;
+    }
+
+    &-footer {
+        border-top: none;
+    }
+}
+
+.popover {
+    border: none;
+    .box-shadow(0 1px 4px rgba(0,0,0,.3));
+}
+
+.carousel {
+    &-caption {
+        h1, h2, h3, h4, h5, h6 {
+            color: inherit;
+        }
+    }
+}
diff -r aa38a1d3a922 -r 6e5f752025b9 src/view/tree.js
--- a/src/view/tree.js  Sun Aug 16 16:32:59 2020 +0200
+++ b/src/view/tree.js  Sun Aug 16 17:43:21 2020 +0200
@@ -695,7 +695,7 @@
                             'selection': 9,
                             'one2many': 5,
                             'many2many': 5,
-                            'boolean': 2,
+                            'boolean': 3,
                             'binary': 20,
                         }[column.attributes.widget] || 10;
                         var factor = 1;

Reply via email to