From b2e32a8f7e7d0b4278c22fbc3d0832a3e8b1469f Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Tue, 16 Dec 2014 18:14:15 +0100 Subject: [IMP] web: use bootstrap's notebook, rewrite process_notebook Introduction of a specialized InvisibilityChanger for the notebook. It allows to handle more elegantly the issues of the notebook during page execution: modifiers hiding the active tab that must now active its sibling. Process_notebook only handle the processing of the page while NotebookInvisibilityChanger only handle the behavior of the notebook during the page execution. - readable code (more readable, at least) - correct handle of autofocus - rendering of the whole notebook in one call to qweb's render - one invisibility changer bound by header/content - no custom css, only legacy bootstrap --- addons/web/static/src/css/base.css | 75 +------------------------------------ addons/web/static/src/css/base.sass | 56 --------------------------- 2 files changed, 1 insertion(+), 130 deletions(-) (limited to 'addons/web/static/src/css') diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index fdc7db1e2f2..81d8628c504 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -532,7 +532,7 @@ background-image: -webkit-radial-gradient(circle, #eee 0%, #ccc 40%, #bbb 100%); background-image: -moz-radial-gradient(#eee 0%, #ccc 40%, #bbb 100%); background-image: -ms-radial-gradient(#eee 0%, #ccc 40%, #bbb 100%); - background-image: radial-gradient(circle, #eee 0%, #ccc 40%, #bbb 100%); + background-image: radial-gradient(circle, #eeeeee 0%, #cccccc 40%, #bbbbbb 100%); } .openerp .oe_kanban_status_green { background: green; @@ -616,79 +616,6 @@ font-style: italic; text-decoration: none; } -.openerp .oe_notebook { - margin: 8px 0; - padding: 0 16px; - list-style: none; - zoom: 1; -} -.openerp .oe_notebook.ui-corner-all { - -moz-border-radius: 0; - -webkit-border-radius: 0; - border-radius: 0; -} -.openerp .oe_notebook:before, .openerp .oe_notebook:after { - display: table; - content: ""; - zoom: 1; -} -.openerp .oe_notebook:after { - clear: both; -} -.openerp .oe_notebook > li { - float: left; -} -.openerp .oe_notebook > li > a { - display: block; - color: #808080; -} -.openerp .oe_notebook > li.ui-tabs-active > a { - color: #4c4c4c; -} -.openerp .oe_notebook { - border-color: #ddd; - border-style: solid; - border-width: 0 0 1px; -} -.openerp .oe_notebook > li { - position: relative; -} -.openerp .oe_notebook > li > a { - padding: 0 12px; - margin-right: 2px; - line-height: 30px; - border: 1px solid transparent; - -moz-border-radius: 4px 4px 0 0; - -webkit-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; -} -.openerp .oe_notebook > li > a:hover { - text-decoration: none; - background-color: #eee; - border-color: #eee #eee #ddd; -} -.openerp .ui-tabs .oe_notebook.ui-tabs-nav li.ui-tabs-active { - border-bottom: none; - padding-bottom: 1px; -} -.openerp .oe_notebook > li.ui-state-active > a, .openerp .oe_notebook > li.ui-state-active > a:hover { - background-color: #ffffff; - border: 1px solid #ddd; - border-bottom-color: transparent; - cursor: default; -} -.openerp .oe_notebook_page { - padding: 0; -} -.openerp .oe_notebook_page > label:not([for]) { - font-weight: normal !important; -} -.openerp div.ui-tabs { - padding: 3px 0px 3px 0px; -} -.openerp .ui-tabs-hide { - display: none; -} .openerp .oe_dropdown, .openerp .oe_dropdown_hover, .openerp .oe_dropdown_toggle { position: relative; cursor: pointer; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 632bc36c086..fc41de6f5e7 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -555,62 +555,6 @@ $sheet-padding: 16px text-decoration: none margin-bottom: 1px // }}} - // Notebook {{{ - .oe_notebook - margin: 8px 0 - padding: 0 16px - list-style: none - zoom: 1 - .oe_notebook.ui-corner-all - @include radius(0) - .oe_notebook:before, .oe_notebook:after - display: table - content: "" - zoom: 1 - .oe_notebook:after - clear: both - .oe_notebook > li - float: left - .oe_notebook > li > a - display: block - color: #808080 - .oe_notebook > li.ui-tabs-active > a - color: #4c4c4c - .oe_notebook - border-color: #ddd - border-style: solid - border-width: 0 0 1px - .oe_notebook > li - position: relative - .oe_notebook > li > a - padding: 0 12px - margin-right: 2px - line-height: 30px - border: 1px solid transparent - @include radius(4px 4px 0 0) - .oe_notebook > li > a:hover - text-decoration: none - background-color: #eee - border-color: #eee #eee #ddd - .ui-tabs .oe_notebook.ui-tabs-nav li.ui-tabs-active - border-bottom: none - padding-bottom: 1px - .oe_notebook > li.ui-state-active > a, .oe_notebook > li.ui-state-active > a:hover - background-color: #ffffff - border: 1px solid #ddd - border-bottom-color: transparent - cursor: default - .oe_notebook_page - padding: 0 - //Customize label weight according bootstrap3 - > label:not([for]) - font-weight: normal !important - // End of customize - div.ui-tabs - padding: 3px 0px 3px 0px - .ui-tabs-hide - display: none - // }}} // Dropdown {{{ .oe_dropdown, .oe_dropdown_hover, .oe_dropdown_toggle position: relative -- cgit v1.2.3