summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css2638
-rw-r--r--addons/web/static/src/css/base.sass330
-rw-r--r--addons/web/static/src/css/base_old.css2068
-rw-r--r--addons/web/static/src/css/full.css6
-rw-r--r--addons/web/static/src/img/header-about.pngbin442 -> 0 bytes
-rw-r--r--addons/web/static/src/img/header-background.pngbin149 -> 0 bytes
-rw-r--r--addons/web/static/src/img/header-help.pngbin454 -> 0 bytes
-rw-r--r--addons/web/static/src/img/header-home.pngbin452 -> 0 bytes
-rw-r--r--addons/web/static/src/img/header-preferences.pngbin420 -> 0 bytes
-rw-r--r--addons/web/static/src/img/header-requests.pngbin353 -> 0 bytes
-rw-r--r--addons/web/static/src/img/topbar-avatar.pngbin0 -> 846 bytes
-rw-r--r--addons/web/static/src/js/chrome.js640
-rw-r--r--addons/web/static/src/js/core.js624
-rw-r--r--addons/web/static/src/js/data.js31
-rw-r--r--addons/web/static/src/js/data_import.js14
-rw-r--r--addons/web/static/src/js/formats.js4
-rw-r--r--addons/web/static/src/js/search.js80
-rw-r--r--addons/web/static/src/js/view_editor.js4
-rw-r--r--addons/web/static/src/js/view_form.js282
-rw-r--r--addons/web/static/src/js/view_list.js35
-rw-r--r--addons/web/static/src/js/view_list_editable.js33
-rw-r--r--addons/web/static/src/js/view_page.js30
-rw-r--r--addons/web/static/src/js/view_tree.js16
-rw-r--r--addons/web/static/src/js/views.js56
-rw-r--r--addons/web/static/src/xml/base.xml213
25 files changed, 3744 insertions, 3360 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 2a27e61eb3d..dab8e6070af 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -1,2387 +1,283 @@
-body.openerp {
- padding: 0;
- margin: 0;
- overflow-y: scroll;
-}
-.openerp {
- padding: 0;
- margin: 0;
- height: 100%;
- font-size: 80%;
- font-family: Ubuntu, Helvetica, sans-serif;
-}
-
-.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option,
-.openerp button, .openerp .ui-widget {
- font-family: Ubuntu, Helvetica, sans-serif;
- font-size:85%;
-}
-
-.openerp .view-manager-main-content {
- width: 100%;
- padding: 0 8px 8px 8px;
-}
-
-.openerp .oe_form_frame_cell .view-manager-main-content {
- padding: 0;
-}
-
-.oe_box {
- border: 1px solid #aaf;
- padding: 2px;
- margin: 2px;
-}
-
-#oe_header h2 {
- margin: 2px 0;
-}
-
-#oe_errors pre {
- margin: 0;
-}
-
-.openerp .oe-listview .oe-number {
- text-align: right !important;
-}
-.oe-listview-header-columns {
- background: #d1d1d1; /* Old browsers */
- background: -moz-linear-gradient(top, #ffffff 0%, #d1d1d1 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#d1d1d1)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#d1d1d1',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* W3C */
-}
-
-.openerp .oe_hide {
- display: none !important;
-}
-
-/* STATES */
-.openerp .on_logged,
-.openerp .db_options_row {
- display: none;
-}
-
-/* Loading */
-.loading {
- cursor: wait;
-}
-.openerp .loading {
- display: none;
- z-index: 100;
- position: fixed;
- top: 0;
- right: 50%;
- padding: 4px 12px;
- background: #A61300;
- color: white;
- text-align: center;
- border: 1px solid #900;
- border-top: none;
- -moz-border-radius-bottomright: 8px;
- -moz-border-radius-bottomleft: 8px;
- border-bottom-right-radius: 8px;
- border-bottom-left-radius: 8px;
-}
-.openerp .oe_notification {
- z-index: 1050;
- display: none;
-}
-.openerp .oe_notification * {
- color: white;
-}
-
-/* Login page */
-
-.login {
- padding: 0;
- margin: 0;
- font-family: "Lucida Grande", Helvetica, Verdana, Arial;
- background: url("/web/static/src/img/pattern.png") repeat;
- color: #eee;
- font-size: 14px;
- height: 100%;
-}
-
-.login ul, ol {
- padding: 0;
- margin: 0;
-}
-
-.login li {
- list-style-type: none;
- padding-bottom: 4px;
-}
-
-.login a {
- color: #eee;
- text-decoration: none;
-}
-
-.login button {
- float: right;
- display: inline-block;
- cursor: pointer;
- padding: 6px 16px;
- font-size: 13px;
- font-family: "Lucida Grande", Helvetica, Verdana, Arial;
- border: 1px solid #222222;
- color: white;
- margin: 0;
- background: #600606;
- background: -moz-linear-gradient(#b92020, #600606);
- background: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606));
- background: -ms-linear-gradient(top, #b92020, #600606);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b92020', endColorstr='#600606',GradientType=0 );
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(155, 155, 155, 0.4) inset;
- -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
-}
-
-.login input, .login select {
- width: 252px;
- font-size: 14px;
- font-family: "Lucida Grande", Helvetica, Verdana, Arial;
- border: 1px solid #999999;
- background: whitesmoke;
- -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
- -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
- -box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-.login input {
- margin-bottom: 9px;
- padding: 5px 6px;
-}
-
-.login select {
- padding: 1px;
-}
-
-.login .dbpane {
- position: fixed;
- top: 0;
- right: 8px;
- padding: 5px 10px;
- color: #eee;
- border: solid 1px #333;
- background: #1e1e1e;
- background: rgba(30,30,30,0.94);
- -moz-border-radius: 0 0 8px 8px;
- -webkit-border-radius: 0 0 8px 8px;
- border-radius: 0 0 8px 8px;
-}
-
-.login .bottom {
+.openerp2 {
+ padding: 0;
+ margin: 0;
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;
+ color: #4c4c4c;
+ font-size: 13px;
+ background: white;
+ position: relative; }
+ .openerp2 a {
+ text-decoration: none; }
+ .openerp2 .oe_webclient {
position: absolute;
- top: 50%;
- left: 0;
- right: 0;
+ top: 0;
bottom: 0;
- text-shadow: 0 1px 1px #999999;
- background: #600606;
- background: -moz-linear-gradient(#b41616, #600606);
- background: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606));
- background: -ms-linear-gradient(top, #b41616, #600606);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b41616', endColorstr='#600606',GradientType=0 );
-}
-
-.login .pane {
- position: absolute;
- top: 50%;
- left: 50%;
- margin: -160px -166px;
- border: solid 1px #333333;
- background: #1e1e1e;
- background: rgba(30,30,30,0.94);
- padding: 22px 32px;
- text-align: left;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
- border-radius: 8px;
- -moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
- -webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
- -box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
-}
-
-.login .pane h2 {
- margin-top: 0;
- font-size: 18px;
-}
-
-.login #logo {
- position: absolute;
- top: -70px;
- left: 0;
- width: 100%;
- margin: 0 auto;
- text-align: center;
-}
-
-.login .footer {
- position: absolute;
- bottom: -40px;
left: 0;
+ right: 0; }
+ .openerp2 .oe_webclient .oe_application {
+ position: absolute;
+ top: 32px;
+ bottom: 0;
+ left: 206px;
+ right: 0; }
+ .openerp2 .oe_content_full_screen .oe_application {
+ top: 0;
+ left: 0; }
+ .openerp2 .oe_content_full_screen .topbar, .openerp2 .oe_content_full_screen .leftbar {
+ display: none; }
+ .openerp2 .oe_topbar {
width: 100%;
- text-align: center;
-}
-
-.login .footer a {
- font-size: 13px;
- margin: 0 8px;
-}
-
-.login .footer a:hover {
- text-decoration: underline;
-}
-
-.login .openerp {
- font-weight: bold;
- font-family: serif;
- font-size: 16px;
-}
-
-.openerp .login {
- text-align: center;
-}
-
-.openerp .login .login_error_message {
- display: none;
- background-color: #b41616;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
- -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
- -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
- color: #eee;
- font-size: 14px;
- padding: 14px 18px;
- margin-top: 15px;
- text-align: center;
-}
-
-.openerp .login.login_invalid .login_error_message {
- display: inline-block;
-}
-
-
-
-/* Database */
-.login .oe-database-manager {
- display: none;
- height: 100%;
- width: 100%;
- background-color: white;
-}
-.login.database_block .bottom,
-.login.database_block .login_error_message,
-.login.database_block .pane {
- display: none;
-}
-.login.database_block .oe-database-manager {
- display: block;
-}
-
-.login .database {
- float: left;
- width: 202px;
- height: 100%;
- background: #666666;
-}
-.login .oe_db_options {
- margin-left: 202px;
- color: black;
- padding-top: 20px;
-}
-
-.login .database ul {
- margin-top: 65px;
-}
-
-ul.db_options li {
- padding: 5px 0 10px 5px;
- background: #949292; /* Old browsers */
- background: -moz-linear-gradient(top, #949292 30%, #6d6b6b 95%, #282828 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,#949292), color-stop(95%,#6d6b6b), color-stop(100%,#282828)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* W3C */
- /* for ie9 */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */
- border: none;
- /* overriding jquery ui */
- -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
- display: block;
- font-weight: bold;
- text-transform: uppercase;
- margin: 1px;
- color: #EEEEEE;
- cursor: pointer;
- width: 195px;
- font-size: 12px;
-}
-
-.db_option_table {
- border: 1px solid #5A5858;
- padding: 5px;
- -moz-border-radius: 10px;
-}
-
-table.db_option_table input.required {
- background-color: #D2D2FF !important;
-}
-
-.db_option_table label {
- display: block;
- text-align: right;
-}
-
-.db_option_table input[type="text"],
-.db_option_table input[type="password"],
-.db_option_table input[type="file"],
-.db_option_table select {
- width: 300px;
-}
-
-.option_string {
- font-weight: bold;
- color: #555;
- width: 100%;
- text-align: center;
- padding: 10px 0;
- font-size: large;
-}
-
-label.error {
- float: none;
- color: red;
- padding-left: .5em;
- vertical-align: top;
-}
-
-/* Main*/
-.openerp .main_table {
- width: 100%;
+ height: 31px;
+ border-top: solid 1px #d3d3d3;
+ border-bottom: solid 1px black;
+ background-color: #646060;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#646060), to(#262626));
+ background-image: -webkit-linear-gradient(top, #646060, #262626);
+ background-image: -moz-linear-gradient(top, #646060, #262626);
+ background-image: -ms-linear-gradient(top, #646060, #262626);
+ background-image: -o-linear-gradient(top, #646060, #262626);
+ background-image: linear-gradient(to bottom, #646060, #262626); }
+ .openerp2 .oe_topbar .oe_systray {
+ float: right; }
+ .openerp2 .oe_topbar .oe_systray > div {
+ float: left;
+ padding: 0 4px 0 4px; }
+ .openerp2 .oe_topbar .oe_topbar_item li {
+ float: left; }
+ .openerp2 .oe_topbar .oe_topbar_item li a {
+ display: block;
+ padding: 5px 10px 7px;
+ line-height: 20px;
+ height: 20px;
+ color: #eeeeee;
+ vertical-align: top;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); }
+ .openerp2 .oe_topbar .oe_topbar_item li a:hover {
+ background: #303030;
+ color: white;
+ -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; }
+ .openerp2 .oe_topbar .oe_topbar_item .oe_active {
+ background: #303030;
+ font-weight: bold;
+ color: white;
+ -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; }
+ .openerp2 .oe_topbar .oe_topbar_avatar {
+ width: 24px;
+ height: 24px;
+ margin: -2px 2px 0 0;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px; }
+ .openerp2 .oe_topbar .oe_topbar_avatar {
+ vertical-align: top; }
+ .openerp2 .oe_leftbar {
+ width: 205px;
height: 100%;
background: #f0eeee;
-}
-.openerp .oe-application {
- height: 100%;
-}
-.openerp .oe-application-container {
- width: 100%;
- height: 100%;
-}
-
-/* IE Hack - for IE < 9
- * Avoids footer to be placed statically at 100% cutting the middle of the views
- * */
-.openerp .oe-application-container {
- height: auto\9;
- min-height: 100%\9;
-}
-
-/* Menu */
-.openerp .menu {
- height: 34px;
- background: #cc4e45; /* Old browsers */
- background: -moz-linear-gradient(top, #cc4e45 0%, #b52d20 8%, #7a211a 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#cc4e45), color-stop(8%,#b52d20), color-stop(100%,#7a211a)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#CC4E45', endColorstr='#7A211A',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #cc4e45 0%,#b52d20 8%,#7a211a 100%); /* W3C */
-}
-.openerp .menu td {
+ border-right: 1px solid #afafb6;
+ overflow: auto;
+ text-shadow: 0 1px 1px white; }
+ .openerp2 .oe_leftbar .oe_footer {
+ position: absolute;
+ width: 205px;
+ text-align: center;
+ bottom: 8px; }
+ .openerp2 a.oe_logo {
+ display: block;
text-align: center;
- padding:0;
-}
-.openerp .menu a {
- display:block;
- min-width: 60px;
- height: 20px;
- margin: 3px 2px;
- padding: 0 8px;
-
- background: #bd5e54; /* Old browsers */
- background: -moz-linear-gradient(top, #bd5e54 0%, #90322a 60%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#bd5e54), color-stop(60%,#90322a)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #bd5e54 0%,#90322a 60%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#BD5E54', endColorstr='#90322A',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #bd5e54 0%,#90322a 60%); /* W3C */
-
- border: 1px solid #5E1A14;
- border-radius: 4px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
-
- color: #eee;
- text-shadow: #222 0 1px 0;
- text-decoration: none;
- text-transform: uppercase;
- line-height: 20px;
- font-weight: bold;
- font-size: 75%;
-
- white-space: nowrap;
-}
-.openerp .menu a:hover,
-.openerp .menu a:focus,
-.openerp .menu a.active {
- background: #c6c6c6; /* Old browsers */
- background: -moz-linear-gradient(top, #c6c6c6 0%, #5c5c5c 7%, #969595 86%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#c6c6c6), color-stop(7%,#5c5c5c), color-stop(86%,#969595)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#C6C6C6', endColorstr='#969595',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #c6c6c6 0%,#5c5c5c 7%,#969595 86%); /* W3C */
- /* for ie */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5c5c5c', endColorstr='#969595',GradientType=0 ); /* IE6-9 */
- color: #fff;
-}
-/* Secondary Menu */
-.openerp .secondary_menu .oe_toggle_secondary_menu {
+ height: 70px;
+ line-height: 70px; }
+ .openerp2 a.oe_logo img {
+ height: 40px;
+ width: 157px;
+ margin: 14px 0; }
+ .openerp2 .oe_footer {
position: absolute;
- cursor: pointer;
- border-left: 1px solid #282828;
- border-bottom: 1px solid #282828;
- width: 21px;
- height: 21px;
- z-index: 10;
- background: transparent;
- color: white;
- text-shadow: 0 1px 0 #333;
+ width: 205px;
text-align: center;
- font-size: 18px;
- line-height: 18px;
- right: 0;
-}
-.openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu {
- position: static;
- border-left: none;
- border-bottom: 1px solid #282828;
- width: 21px;
- height: 21px;
- background: #818181;
-}
-.openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu span.oe_menu_fold {
- display: none;
-}
-.openerp .secondary_menu.oe_unfolded .oe_toggle_secondary_menu span.oe_menu_unfold {
- display: none;
-}
-.openerp .secondary_menu {
- width: 200px;
- min-width: 200px;
- border-right: 1px solid #3C3C3C;
- border-bottom: 1px solid #5A5858;
- background: #5A5858;
- vertical-align: top;
- height: 100%;
- display: block;
- position: relative;
- font-size:85%;
-}
-.openerp .secondary_menu.oe_folded {
- width: 20px;
- min-width: 20px;
- position: static;
-}
-.openerp .secondary_menu.oe_folded .oe_secondary_menu.active {
- position: absolute;
- z-index: 100;
- border: 4px solid #585858;
- border-color: rgba(88, 88, 88, .5);
- border-radius: 4px;
- min-width: 200px;
-}
-.openerp .secondary_menu a {
- display: block;
- padding: 0 5px 2px 5px;
- line-height: 20px;
- text-decoration: none;
- white-space: nowrap;
- color: white;
- text-shadow: 0 1px 0 #333;
-}
-.openerp .oe_secondary_submenu {
- background: #5A5858;
-}
-.openerp .secondary_menu a.oe_secondary_menu_item {
- background: #949292; /* Old browsers */
- background: -moz-linear-gradient(top, #949292 0%, #6d6b6b 87%, #282828 99%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#949292), color-stop(87%,#6d6b6b), color-stop(99%,#282828)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #949292 0%,#6d6b6b 87%,#282828 99%); /* W3C */
- /* for ie9 */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */
- white-space: nowrap;
- color: white;
- text-shadow: 0 1px 0 #333;
-
-}
-.openerp a.oe_secondary_submenu_item {
- padding: 0 5px 2px 10px;
-}
-.openerp a.oe_secondary_submenu_item,
-.openerp a.oe_secondary_menu_item {
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.openerp a.oe_secondary_submenu_item:hover,
-.openerp a.oe_secondary_submenu_item.leaf.active {
- display: block;
- background: #ffffff; /* Old browsers */
- background: -moz-linear-gradient(top, #ffffff 0%, #d8d8d8 11%, #afafaf 86%, #333333 91%, #5a5858 96%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(11%,#d8d8d8), color-stop(86%,#afafaf), color-stop(91%,#333333), color-stop(96%,#5a5858)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#5A5858',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ffffff 0%,#d8d8d8 11%,#afafaf 86%,#333333 91%,#5a5858 96%); /* W3C */
- padding: 0 5px 2px 10px;
- line-height: 20px;
- color: #3f3d3d;
- text-decoration: none;
- text-shadow: #fff 0 1px 0;
-}
-.openerp a.oe_secondary_submenu_item.submenu.opened span:before {
- content: "\25be";
-}
-.openerp a.oe_secondary_submenu_item.submenu span:before {
- content: "\25b8";
-}
-
-/* Header */
-.openerp .header {
- height: 65px;
- background: url("/web/static/src/img/header-background.png") repeat-x scroll left top transparent;
- color: #FFFFFF;
- letter-spacing: 0.5px;
- text-shadow: 0 1px 0 #333333;
-}
-.openerp .company_logo_link {
- display: block;
- float: left;
- height: 63px;
- width: 200px;
- border: 1px solid white;
- border-right-color: black;
- border-bottom-color: black;
- background: #FFFFFF;
- background: -moz-linear-gradient(top, #FFFFFF 0%, #CECECE 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#FFFFFF), color-stop(100%,#CECECE));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#CECECE',GradientType=0 );
-}
-.openerp .company_logo {
- margin-top: 7px;
- margin-left: 10px;
- display: block;
- background: url(/web/static/src/img/logo.png);
- width:180px;
- height:46px;
-}
-.openerp .header_title {
+ bottom: 8px; }
+ .openerp2 .oe_footer a {
+ font-weight: 800;
+ font-family: serif;
+ font-size: 16px;
+ color: black; }
+ .openerp2 .oe_footer a span {
+ color: #c81010;
+ font-style: italic; }
+ .openerp2 .oe_menu {
float: left;
- font-size: 100%;
- margin: 0;
- padding: 4px 10px;
- text-shadow: 0 1px 0 #111111;
- font-weight:normal;
- line-height:14px;
-}
-.openerp .header_title small {
- color: #ccc;
- font-size: 90%;
- font-weight: normal;
-}
-.openerp .header_corner {
- float: right;
-}
-.openerp .header_corner .block {
- float: left;
- height: 34px;
- line-height: 34px;
- /*background: url(../images/top-sep-a.png) no-repeat;*/
- border-left: 1px solid #6a6a6a;
- background: #828282;
- background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 );
-}
-.openerp .header_corner .block a {
- display: block;
- color: white;
- text-decoration: none;
- padding: 0 10px;
-}
-.openerp .header_corner .block a:hover {
- background: #929292;
- background: -moz-linear-gradient(top, #929292 0%, #4D4D4D 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#929292), color-stop(100%,#4D4D4D));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#929292', endColorstr='#4D4D4D',GradientType=0 );
-}
-.openerp .header_corner ul.block {
- list-style: none;
- height: 34px;
- margin: 0;
- padding: 0 0 0 2px;
- line-height: 33px;
-}
-.openerp .header_corner ul.block li {
- float: left;
-}
-.openerp .header_corner ul.block li a {
- padding: 0 5px;
- position: relative;
- line-height: 32px;
-}
-.openerp .header_corner ul.block li a img {
- vertical-align: middle;
-}
-.openerp .header_corner ul.block li a small {
- position: absolute;
- right: 0;
- top: 5px;
- padding: 1px 4px 2px;
- background: rgba(0, 0, 0, 0.75);
- border-radius: 7px;
- -moz-border-radius: 7px;
- -webkit-border-radius: 7px;
- line-height: 1em;
- font-weight: bold;
-}
-
-.openerp .logout {
- font-size:80%;
-}
-
-/* Footer */
-.openerp div.oe_footer {
- background: none repeat scroll 0 0 #CCCCCC;
- overflow: hidden;
- padding: 5px 0;
- position: relative;
- -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4);
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.4);
-}
-.openerp div.oe_footer p.oe_footer_powered {
- left: 50%;
- margin: 0;
- padding: 0 15px;
- color: #666666;
- font-weight: bold;
- font-size: 0.8em;
- text-align: center;
-}
-.openerp div.oe_footer p.oe_footer_powered a {
- text-decoration: none;
- color: #666666;
-}
-
-
-/* Main Application */
-.openerp .oe-main-content {
padding: 0;
- height: 100%;
-}
-
-.openerp h2.oe_view_title {
- font-size: 110%;
- font-weight: normal;
- margin: 2px 0;
- color: #252424;
- text-shadow: white 0 1px 0;
-}
-.openerp div[id^="notebook"] .oe_view_title {
- font-size:85%;
- padding-bottom:4px;
-}
-
-/* View Manager */
-.openerp .oe_vm_switch {
- float: right;
-}
-.openerp .oe-view-manager-header .oe_view_title {
- font-size:150%;
- padding:2px 0 0 0;
-}
-
-/* SearchView */
-.openerp .oe_searchview_field > div {
- position: relative;
- white-space: nowrap;
-}
-.openerp .oe_searchview_field .oe_input_icon {
- top: auto;
- bottom: 3px;
-}
-
-.openerp .filter_label, .openerp .filter_icon {
- background: #F0F0F0;
- border: 1px solid #999;
- background: -moz-linear-gradient(top, #F0F0F0 0%, #C0C0C0 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#C0C0C0));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#C0C0C0',GradientType=0 );
-}
-.openerp .filter_label:hover, .openerp .filter_icon:hover {
- background: #F0F0F0;
- background: -moz-linear-gradient(top, #F0F0F0 0%, #A1A7CE 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#A1A7CE));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#A1A7CE',GradientType=0 );
-}
-.openerp .filter_label:active, .openerp .filter_icon:active {
- background: #aaa;
- background: -moz-linear-gradient(top, #999999 0%, #EEEEEE 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999999), color-stop(100%,#EEEEEE));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#999999', endColorstr='#EEEEEE',GradientType=0 );
-}
-.openerp .filter_label.enabled, .openerp .filter_icon.enabled {
- background: #aaa;
- filter: none;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- -o-box-shadow: none;
- box-shadow: none;
-}
-.openerp .filter_icon {
- height: 22px;
- padding: 1px 2px 0 2px;
- margin: 0;
- vertical-align: bottom;
-}
-.openerp .filter_label {
- font-weight: bold;
- text-transform: uppercase;
- text-shadow: #EEE 0 1px 0;
- color: #4C4C4C;
- white-space: nowrap;
- min-height: 40px;
- min-width: 75px;
- padding: 2px 4px;
- margin: 0;
-}
-.openerp .filter_label_group {
- padding-right: 0.4em;
- white-space: nowrap;
-}
-
-.openerp .filter_label_group button {
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
- border-right: none;
-}
-.openerp .filter_label_group button:first-child {
- -webkit-border-top-left-radius: 7px;
- -webkit-border-bottom-left-radius: 7px;
- -moz-border-radius-topleft: 7px;
- -moz-border-radius-bottomleft: 7px;
- border-top-left-radius: 7px;
- border-bottom-left-radius: 7px;
- border-right: none;
-}
-.openerp .filter_label_group button:last-child {
- -webkit-border-top-right-radius: 7px;
- -webkit-border-bottom-right-radius: 7px;
- -moz-border-radius-topright: 7px;
- -moz-border-radius-bottomright: 7px;
- border-top-right-radius: 7px;
- border-bottom-right-radius: 7px;
- border-right: 1px solid #999;
-}
-.openerp .filter_label_group button.filter_icon img {
- padding: 1px 8px 0 8px;
-}
-.openerp .filter_label_group button.filter_icon:first-child {
- border-left: solid 1px #999;
- margin-left: -7px;
- -webkit-border-top-left-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -moz-border-radius-topleft: 0;
- -moz-border-radius-bottomleft: 0;
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
-}
-
-.openerp .searchview_group_string {
- display: block;
- color: #7D7979;
- font-weight: bold;
- padding: 2px 0 2px 10px;
- text-decoration: none;
-}
-.openerp .searchview_group_string:hover {
- background-color: #ccc;
-}
-.openerp .searchview_group.folded .searchview_group_string {
- background: url("/web/static/src/img/ui/group-folded.png") no-repeat scroll 0 50%;
-}
-.openerp .searchview_group.folded .searchview_group_content {
- display: none;
-}
-.openerp .searchview_group.expanded .searchview_group_string {
- background: url("/web/static/src/img/ui/group-expanded.png") no-repeat scroll 0 50%;
-}
-.openerp .searchview_group.expanded .searchview_group_content {
- display: block;
- padding-bottom:3px;
-}
-
-.openerp .searchview_group_content .oe_label, .openerp .searchview_group_content .oe_label_help {
+ margin: 0; }
+ .openerp2 .oe_menu li {
+ list-style-type: none;
+ float: left; }
+ .openerp2 .oe_menu a {
+ display: block;
+ padding: 5px 10px 7px;
+ line-height: 20px;
+ height: 20px;
+ color: #eeeeee;
+ vertical-align: top;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); }
+ .openerp2 .oe_menu a:hover {
+ background: #303030;
+ color: white;
+ -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; }
+ .openerp2 .oe_menu .oe_active {
+ background: #303030;
+ font-weight: bold;
+ color: white;
+ -moz-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset;
+ -box-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) inset; }
+ .openerp2 .oe_secondary_menu_section {
font-weight: bold;
- color: #4c4c4c;
-}
-
-.openerp .oe-searchview-render-line .oe_label, .openerp .oe-searchview-render-line .oe_label_help {
- font-weight: bold;
- font-size: 80%;
- white-space: nowrap;
-}
-
-.openerp .searchview_extended_group {
- padding: 3px;
- margin: 2px;
-}
-
-.openerp .searchview_extended_group .oe_adv_filters_and {
- border-bottom: 1px solid #8E8E8E;
- text-align: center;
- margin-top: -10px;
-}
-.openerp .searchview_extended_group .oe_adv_filters_and span {
- background: #F0EEEE;
- position: relative;
- top: 0.5em;
- padding: 0 1em 0 1em;
- color: #8E8E8E;
-}
-
-.openerp .searchview_extended_group.last_group .oe_adv_filters_and {
- display: none;
-}
-
-.openerp .oe_search-view-buttons {
- padding: 2px 0 10px 0;
- vertical-align:middle;
-}
-.openerp .oe_search-view-filters-management {
- float: right;
-}
-.openerp .oe_search-view-filters-management, .openerp .oe_search-view-custom-filter-btn {
- float:right;
-}
-
-.openerp .searchview_extended_add_proposition span {
- font-size: 0.9em;
- background: url(/web/static/src/img/icons/gtk-add.png) repeat-y;
- padding-left: 18px;
-}
-
-.openerp .searchview_extended_delete_group {
- float:right;
- display: none;
-}
-
-.openerp .searchview_extended_delete_prop {
- text-decoration: none;
-}
-
-.openerp .searchview_extended_delete_group span,
-.openerp .searchview_extended_delete_prop span {
- font-size: 0.9em;
- background: url(/web/static/src/img/icons/gtk-close.png) repeat-y;
- padding-left: 18px;
-}
-/* List */
-.openerp table.oe-listview-content {
- clear: right;
- width: 100%;
- border-spacing: 0;
- border: 1px solid silver;
-}
-
-.openerp .oe-listview thead table {
- width: 100%;
- border: none;
-}
-.openerp .oe-listview tr.odd {
- background-color: #f3f3f3;
-}
-.openerp .oe-listview tbody tr:hover {
- background-color: #ecebf2;
-}
-.openerp .oe-listview tbody tr:hover {
- background-color: #eae9f0;
-}
-.openerp .oe-listview thead table tr,
-.openerp .oe-listview thead table tr:hover {
- background: none;
-}
-
-.openerp .oe-listview > table > tbody > tr > td,
-.openerp .oe-listview th {
- vertical-align: middle;
- text-align: left;
- padding: 1px 2px;
-}
-
-.openerp .oe-record-delete button,
-.openerp button.oe-edit-row-save {
- border: none;
- height: 12px;
- width: 12px;
- background: url("/web/static/src/img/iconset-b-remove.png") no-repeat scroll center center transparent;
- cursor: pointer;
-}
-.openerp button.oe-edit-row-save {
- background-image: url('/web/static/src/img/icons/save-document.png');
-}
-
-/* Could use :not selectors if they were supported by MSIE8... */
-.openerp .oe-listview > table > tbody > tr > td {
- border-left: 1px solid #dadada; /*currently commenting to test with no vertical lines in list view*/
-}
-.openerp .oe-listview tbody td:first-child,
-.openerp .oe-listview tbody td.oe-button,
-.openerp .oe-listview tbody td.oe-button,
-.openerp .oe-listview tbody th.oe-record-selector,
-.openerp .oe-listview tbody td.oe-record-delete {
- border-left: none;
-}
-
-.openerp .oe-listview td.oe-record-delete {
- text-align: right;
-}
-.openerp .oe-listview th.oe-sortable {
- cursor: pointer;
- font-size: 75%;
- text-transform: uppercase;
- padding: 0;
+ margin-left: 8px;
+ color: #8a89ba; }
+ .openerp2 .oe_secondary_submenu {
+ padding: 2px 0 8px 0;
margin: 0;
- padding-left: 3px;
- color: #333;
-}
-.openerp .oe-listview th.oe-sortable .ui-icon {
- height: 60%;
- margin: -6px 0 0;
- display: inline;
- display: inline-block;
- vertical-align: middle;
-}
-
-.openerp .oe-listview > table > tbody > tr > td {
- border-bottom: 1px solid #E3E3E3;
-}
-
-
-.openerp .oe-listview td.oe-actions {
- border-bottom:none;
-}
-
-.openerp .oe-listview .oe-record-selector, .openerp .oe-listview .oe-record-edit-link {
- border-bottom: 1px solid #E3E3E3;
-}
-.openerp .oe-listview .oe-record-edit-link {
- cursor: pointer;
-}
-
-.openerp .oe-listview .oe-field-cell {
- cursor: pointer;
- margin-top: 0;
- margin-bottom: 0;
- padding-top: 3px;
- padding-bottom: 3px;
- font-size: 80%;
-}
-.openerp .oe-listview .oe-field-cell progress {
width: 100%;
-}
-.openerp .oe-listview .oe-field-cell.oe-button button,
-.openerp .oe-listview .oe_form_button button {
- margin: 0;
- padding: 0;
- border: none;
- background: none;
- width: 16px;
- box-shadow: none;
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
-}
-.openerp .oe-listview .oe-field-cell button:active {
- opacity: 0.5;
-}
-.openerp .oe-listview .oe-field-cell button img {
- cursor: pointer;
-}
-.openerp .oe-listview .oe-field-cell button img:hover {
- opacity: 0.75;
-}
-
-.openerp .oe-listview .oe-field-cell .oe-listview-button-disabled img {
- opacity: 0.5;
-}
-
-.openerp .oe-listview th.oe-actions {
- text-align: left;
- white-space: nowrap;
-}
-.openerp .oe-listview th.oe-list-pager {
- text-align: right;
- white-space: nowrap;
-}
-.openerp .oe-list-pager .oe-pager-state {
- cursor: pointer;
- font-size: 90%;
- color: #555;
-}
-
-.openerp .oe_button.oe_button_pager,
-.openerp .oe-list-pager > span,
-.openerp .oe_form_pager > span {
- line-height: 17px;
- height: 17px;
- cursor: pointer;
- color: gray;
- font-weight: bold;
- vertical-align: middle;
-}
-.openerp .oe_button.oe_button_pager,
-.openerp .oe_button.oe_button_pager:disabled {
- padding: 0 3px 0 3px;
- margin: 0;
- height: 17px;
-}
-.openerp .oe-listview .oe-group-name {
- padding-right: 1em;
-}
-.openerp .oe-listview .oe-group-name,
-.openerp .oe-listview .oe-group-pagination {
- white-space: nowrap;
-}
-
-.openerp .oe-listview tfoot td {
- padding: 3px 3px 0;
-}
-.openerp .oe-listview .oe-list-footer {
- text-align: center;
- white-space: nowrap;
- color: #444;
- font-size: 85%;
-}
-.openerp .oe-listview .oe-list-footer span {
- margin: 0 1em;
-}
-.openerp .oe-listview .oe-list-footer progress {
- vertical-align:-10% !important;
- width: 100%;
-}
-
-/** list rounded corners
-
- rounded corners are a pain on tables: need to round not only table, but
- also on the first and last children of the first and last row
- */
-.openerp .oe-listview table.oe-listview-content {
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
-}
-.openerp .oe-listview table.oe-listview-content thead tr:first-child th:first-child {
- -webkit-border-top-left-radius: 4px;
- -moz-border-radius-topleft: 4px;
- border-top-left-radius: 4px;
-}
-.openerp .oe-listview table.oe-listview-content thead tr:first-child th:last-child {
- -webkit-border-top-right-radius: 4px;
- -moz-border-radius-topright: 4px;
- border-top-right-radius: 4px;
-}
-.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:first-child,
-.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:first-child,
-.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child th:first-child {
- -webkit-border-bottom-left-radius: 4px;
- -moz-border-radius-bottomleft: 4px;
- border-bottom-left-radius: 4px;
-}
-.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:last-child,
-.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:last-child,
-.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child td:last-child {
- -webkit-border-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- border-bottom-right-radius: 4px;
-}
-
-/* Notebook */
-.openerp .oe_form_notebook {
- padding: 0;
- background: none;
- border-width: 0;
-}
-.openerp .oe_form_notebook .ui-tabs-panel {
- padding: 4px;
- -moz-border-radius-topright: 4px;
- -webkit-border-top-right-radius: 4px;
- border-top-right-radius: 4px;
-}
-.openerp .oe_form_notebook ul.ui-tabs-nav {
- padding-left: 0;
- background: transparent;
- border-width: 0;
- border-radius: 0;
- -moz-border-radius: 0;
- -webkit-border-radius: 0;
- line-height: 0.8em;
- font-size: 95%;
- color: #555;
-}
-.openerp .oe_form_notebook ul.ui-tabs-nav li {
- font-weight: bold;
-}
-.openerp .oe_form_notebook .ui-tabs-panel {
- background: #f9f9f9;
- border-width: 1px;
-}
-.openerp .oe_form_notebook .ui-tabs-selected {
- background: #f9f9f9;
-}
-/* Unedit Form */
-.openerp .field_char,
-.openerp .field_date,
-.openerp .field_float,
-.openerp .field_selection,
-.openerp a.oe_form_uri {
- vertical-align: middle;
- padding-top: 3px;
- font-size: 90%;
- color: #222;
-}
-.openerp a.oe_form_uri {
- color: #9A0404;
- line-height: 12px;
-}
-
-
-
-/* Form */
-.openerp .oe_form_button_save_dirty {
- display: none;
-}
-.openerp .oe_form_dirty > .oe_form_header > .oe_form_buttons > .oe_form_button_save {
- color: white;
- background: #dc5f59;
- background: -moz-linear-gradient(#dc5f59, #b33630);
- background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
- background: -webkit-linear-gradient(#dc5f59, #b33630);
- -moz-box-shadow: none;
- -webkit-box-shadow: none;
- -box-shadow: none;
- font-weight: bold;
-}
-.openerp .oe_form_frame_cell input[type="checkbox"] {
- margin-top: 3px;
- vertical-align: middle;
-}
-.openerp .oe_form_frame_cell .input[type="text"] {
- padding-bottom: 1px;
-}
-
-.openerp table.oe_frame td {
- color: #4c4c4c;
-}
-.openerp td.oe_form_frame_cell {
- padding: 2px;
- position: relative;
-}
-.openerp .oe_frame.oe_forms {
- clear: both;
-}
-.openerp table.oe_frame {
- color: #4c4c4c;
-}
-.openerp fieldset.oe_group_box {
- border: 1px solid #AAAAAA;
- moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- background: #F9F9F9;
- padding: 4px;
-}
-.openerp fieldset.oe_group_box legend {
- font-weight: bold;
-}
-.openerp td.oe_form_frame_cell {
- padding: 2px;
- position: relative;
-}
-.openerp td.oe_form_field_translatable,
-.openerp td.oe_form_field_many2one,
-.openerp td.oe_form_field_date,
-.openerp td.oe_form_field_datetime {
- white-space: nowrap;
-}
-.openerp td.oe_form_field_boolean {
- padding-top: 4px;
-}
-.openerp td.oe_form_frame_cell.oe_form_group {
- padding: 0;
-}
-.openerp .required.error {
- border: 1px solid #900;
-}
-.openerp .oe_form_buttons, .openerp .oe_list_buttons {
- float: left;
-}
-.openerp .oe_form_pager, .openerp .oe_list_pager {
+ display: inline-block; }
+ .openerp2 .oe_secondary_submenu li {
+ position: relative;
+ padding: 1px 0 1px 16px;
+ list-style-type: none; }
+ .openerp2 .oe_secondary_submenu li a {
+ display: block;
+ color: #4c4c4c;
+ padding: 2px 4px 2px 0; }
+ .openerp2 .oe_secondary_submenu li .oe_menu_label {
+ position: absolute;
+ top: 1px;
+ right: 1px;
+ font-size: 10px;
+ background: #8a89ba;
+ color: white;
+ padding: 2px 4px;
+ margin: 1px 6px 0 0;
+ border: 1px solid lightGray;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+ -box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); }
+ .openerp2 .oe_secondary_submenu .oe_active {
+ background: #8a89ba;
+ border-top: 1px solid lightGray;
+ border-bottom: 1px solid lightGray;
+ text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2);
+ -box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); }
+ .openerp2 .oe_secondary_submenu .oe_active a {
+ color: white; }
+ .openerp2 .oe_secondary_submenu .oe_active .oe_menu_label {
+ background: #eeeeee;
+ color: #8a89ba;
+ text-shadow: 0 1px 1px white;
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
+ -box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); }
+ .openerp2 .oe_secondary_submenu .oe_menu_toggler:before {
+ width: 0;
+ height: 0;
+ display: inline-block;
+ content: "&darr";
+ text-indent: -99999px;
+ vertical-align: top;
+ margin-left: -8px;
+ margin-top: 4px;
+ margin-right: 4px;
+ border-top: 4px solid transparent;
+ border-bottom: 4px solid transparent;
+ border-left: 4px solid #4c4c4c;
+ filter: alpha(opacity=50);
+ opacity: 0.5; }
+ .openerp2 .oe_secondary_submenu .oe_menu_opened:before {
+ margin-top: 6px;
+ margin-left: -12px;
+ margin-right: 4px;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid #4c4c4c; }
+ .openerp2 .oe_user_menu {
float: right;
- font-size: 80%;
- color: gray;
- font-weight: bold;
-}
-
-.openerp .oe_form_pager {
- margin-right: 3px;
-}
-
-
-.openerp label.oe_label_help, .openerp label.oe_label,
-.openerp .oe_form_paragraph,
-.openerp .oe_form_field_statusbar,
-.openerp .oe_forms input[type="text"],
-.openerp .oe_forms input[type="password"],
-.openerp .oe_forms input[type="file"],
-.openerp .oe_forms select,
-.openerp .oe_forms .oe_button,
-.openerp .oe_forms textarea {
- font-size: 85%;
-}
-
-.openerp label.oe_label_help, .openerp label.oe_label {
- display: block;
- color: #4c4c4c;
- font-weight: normal;
-}
-.openerp label.oe_label_help {
- cursor: help;
-}
-.openerp .oe_form_frame_cell .oe_label, .openerp .oe_form_frame_cell .oe_label_help {
- font-weight: normal;
-}
-.openerp #tiptip_content {
- font-size: 12px;
-}
-.openerp .oe_tooltip_string {
- color: #FD5;
- font-weight: bold;
- font-size: 13px;
-}
-.openerp .oe_tooltip_help {
- white-space: pre-wrap;
-}
-.openerp .oe_tooltip_technical {
- padding: 0 0 4px 0;
- margin: 5px 0 0 15px;
- list-style: circle;
-}
-.openerp .oe_tooltip_technical_title {
- font-weight: bold;
-}
-
-.openerp .oe_forms label.oe_label, .openerp .oe_forms label.oe_label_help {
- margin: 3px 0 0 3px;
- white-space: nowrap;
-}
-.openerp .oe_forms .searchview_group_content label.oe_label, .openerp .searchview_group_content .oe_forms label.oe_label_help { /* making a distinction between labels in search view and other labels */
- margin: 3px 0 0 3px;
-}
-
-.openerp label.oe_label_help span {
- font-size: 80%;
- color: darkgreen;
- vertical-align:top;
- position: relative;
- top: -4px;
- padding: 0 2px;
-}
-.openerp .oe_align_left {
- text-align: left;
-}
-.openerp .oe_align_right {
- text-align: right;
-}
-.openerp .oe_align_center {
- text-align: center;
-}
-.openerp .oe_forms .oe_form_paragraph {
- margin: 3px 0 0 0;
- white-space: normal;
-}
-
-.openerp .oe_forms .oe_form_paragraph.oe_multilines {
- white-space: pre;
-}
-
-.openerp .oe_form_field_one2many .oe-actions h3.oe_view_title,
-.openerp .oe_form_field_one2many_list .oe-actions h3.oe_view_title{
- display: inline;
- margin: 0 0.5em 0 0;
-}
-
-.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon,
-.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon {
- height: 100%;
- margin-top: -9px;
-}
-
-.openerp table.oe_frame .oe-listview-content td {
- color: inherit;
-}
-
-/* Uneditable Form View */
-.openerp .oe_form_readonly {
-
-}
-.openerp .oe_form_readonly .oe_form_frame_cell .field_text,
-.openerp .oe_form_readonly .field_char,
-.openerp .oe_form_readonly .field_int,
-.openerp .oe_form_readonly .field_float,
-.openerp .oe_form_readonly .field_email,
-.openerp .oe_form_readonly .field_date,
-.openerp .oe_form_readonly .field_selection,
-.openerp .oe_forms_readonly .oe_form_field_many2one {
- padding: 3px 2px 2px 2px;
- background-color: white;
- height: 17px;
-}
-.openerp .oe_form_readonly .oe_form_frame_cell .field_text {
- height: auto;
-}
-.openerp .oe_form_readonly .field_datetime {
- padding: 1px 2px 2px 2px;
- background-color: white;
- height:19px;
-}
-.openerp .oe_form_readonly .oe_form_field_many2one div {
- background-color:white;
- height:18px;
- margin-bottom:1px;
- padding: 0px 2px 5px 2px;
-}
-
-.openerp .oe_form_readonly .oe_form_field_email div {
- background-color: white;
- padding: 1px 2px 3px 2px;
-}
-
-
-.openerp .oe_form_readonly .oe_form_field_text div.field_text,
-.openerp .oe_form_readonly .oe_form_field_text_html div.field_text_html {
- white-space: pre-wrap;
-}
-.openerp .oe_form_readonly .oe_form_frame_cell .field_text {
- min-height:100px;
-}
-/* Inputs */
-.openerp .oe_forms input[type="text"],
-.openerp .oe_forms input[type="password"],
-.openerp .oe_forms input[type="file"],
-.openerp .oe_forms select,
-.openerp .oe_forms textarea {
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -ms-box-sizing: border-box;
- box-sizing: border-box;
- padding: 0 2px;
- margin: 0 2px;
- border: 1px solid #999;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- background: white;
- min-width: 90px;
- color: #1f1f1f;
-}
-
-.openerp .oe_forms input.field_many2one,
-.openerp .oe_forms input.field_binary,
-.openerp .oe_forms input.field_binary,
-.openerp .oe_forms input.field_email,
-.openerp .oe_forms input.field_url {
- border-right: none;
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0px;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0px;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0px;
-}
-.openerp .oe_button.oe_field_button {
- -webkit-border-top-left-radius: 0px;
- -webkit-border-bottom-left-radius: 0px;
- -moz-border-radius-topleft: 0px;
- -moz-border-radius-bottomleft: 0px;
- border-top-left-radius: 0px;
- border-bottom-left-radius: 0px;
- margin-right:-1px;
- height: 22px;
-}
-
-.openerp .oe_form_field_email button img,
-.openerp .oe_form_field_url button img {
- vertical-align: top;
-}
-/* vertically recentering filter management select tag */
-.openerp select.oe_search-view-filters-management {
- margin-top:2px;
-}
-
-.openerp .oe_forms select{
- padding-top: 2px;
-}
-.openerp .oe_forms input[readonly],
-.openerp .oe_forms select[readonly],
-.openerp .oe_forms textarea[readonly],
-.openerp .oe_forms input[disabled],
-.openerp .oe_forms select[disabled],
-.openerp .oe_forms textarea[disabled]{
- background: #E5E5E5 !important;
- color: #666;
-}
-.openerp .oe_forms textarea {
- resize:vertical;
-}
-.openerp .oe_forms input[type="text"],
-.openerp .oe_forms input[type="password"],
-.openerp .oe_forms input[type="file"],
-.openerp .oe_forms select,
-.openerp .oe_forms .oe_button {
- height: 22px;
-}
-
-.openerp .oe_forms input.field_datetime {
- min-width: 11em;
-}
-.openerp .oe_forms .oe_form_button .oe_button {
- color: #4c4c4c;
- white-space: nowrap;
- min-width: 100%;
- width: 100%;
-}
-@-moz-document url-prefix() {
- /* Strange firefox behaviour on width: 100% + white-space: nowrap */
- .openerp .oe_forms .oe_form_button .oe_button {
- width: auto;
- }
-}
-/* IE Hack - for IE < 9
- * Avoids buttons overflow
- * */
-.openerp .oe_forms .oe_form_button .oe_button {
- min-width: auto\9;
-}
-.openerp .oe_forms .button {
- height: 22px;
-}
-.openerp .oe_forms .oe_button span {
- position: relative;
- vertical-align: top;
-}
-.openerp .oe_input_icon {
- cursor: pointer;
- margin: 3px 0 0 -21px;
- vertical-align: top;
-}
-.openerp .oe_datepicker_container {
- display: none;
-}
-.openerp .oe_datepicker_root {
- display: inline-block;
-}
-.openerp .oe_form_frame_cell .oe_datepicker_root {
- width: 100%;
-}
-.openerp .oe_input_icon_disabled {
- position: absolute;
- cursor: default;
- opacity: 0.5;
- filter:alpha(opacity=50);
- right: 5px;
- top: 3px;
-}
-.openerp .oe_trad_field.touched {
- border: 1px solid green !important;
-}
-
-/* http://www.quirksmode.org/dom/inputfile.html
- * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
- */
-.openerp .oe-binary-file-set {
- overflow: hidden;
- position: relative;
-}
-.openerp input.oe-binary-file {
- z-index: 0;
- line-height: 0;
- font-size: 50px;
- position: absolute;
- /* Should be adjusted for all browsers */
- top: -2px;
- right: 0;
- opacity: 0;
- filter: alpha(opacity = 0);
- -ms-filter: "alpha(opacity=0)";
- margin: 0;
- padding:0;
-}
-
-/* Widgets */
-.openerp .separator {
- border: 0 solid #666;
-}
-.openerp .separator.horizontal {
- font-weight: bold;
- border-bottom-width: 1px;
- margin: 3px 4px 3px 1px;
- height: 17px;
- font-size: 95%;
-}
-.openerp .separator.horizontal:empty {
- height: 5px;
-}
-.openerp .oe_form_frame_cell.oe_form_separator_vertical {
- border-left: 1px solid #666;
-}
-.openerp td.required input, .openerp td.required select {
- background-color: #D2D2FF !important;
-}
-.openerp td.invalid input, .openerp td.invalid select, .openerp td.invalid textarea {
- background-color: #F66 !important;
- border: 1px solid #D00 !important;
-}
-.openerp div.oe-progressbar span {
- position: absolute;
- margin-left: 10px;
- margin-top: 5px;
- font-weight: bold;
-}
-
-/* jQuery UI override */
-.openerp .ui-widget {
- font-size: 1em;
-}
-.openerp .oe_form_field_progressbar .ui-progressbar {
- height: 22px;
- font-size: 10px;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- -ms-box-sizing: border-box;
- box-sizing: border-box;
- border: 1px solid #999;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- background: white;
- min-width: 90px;
-}
-.openerp tbody.ui-widget-content {
- margin-bottom: 10px;
- border-spacing: 4px;
-}
-.openerp .ui-widget-header {
- background: white none;
-}
-/* progress bars */
-.openerp .ui-progressbar .ui-widget-header {
- background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
-}
-
-/* Sidebar */
-.openerp .view-manager-main-table {
- margin: 0;
- width:100%;
- border-collapse:collapse;
- height:100%;
-}
-
-.openerp .view-manager-main-table tbody {
- vertical-align: top;
-}
-
-.openerp .oe-view-manager-header {
- overflow: auto;
- background: url("/web/static/src/img/sep-a.gif") 0 100% repeat-x;
- margin:6px 0 6px 2px;
-}
-.openerp .oe_form_frame_cell .oe-view-manager-header { /* Trick: remove the background when element is in a formular */
- background: none;
-}
-
-.openerp .oe-view-manager-header h2 {
- float: left;
-}
-
-.openerp .oe_view_manager_menu_tips blockquote {
- display: none;
- font-size: 85%;
- margin: 0;
- background: #fff;
- border-bottom: 1px solid #CECBCB;
- padding: 1px 10px;
- color: #4C4C4C;
-}
-.openerp .oe_view_manager_menu_tips blockquote p {
- margin: 0;
- padding: 6px 1px 4px;
-}
-
-.openerp .oe_view_manager_menu_tips blockquote div {
- text-align: right;
- margin-right:10px;
-}
-
-.openerp .oe_view_manager_menu_tips blockquote div button {
- border: none;
- background: none;
- padding: 0 4px;
- margin: 0;
- display: inline;
- text-decoration: underline;
- color: inherit;
-}
-.openerp .oe-view-manager-logs {
- clear: both;
- background: #fff;
- margin: 0.25em 0;
- font-size: 85%;
- color: #4C4C4C;
- position: relative;
- overflow: hidden;
-}
-.openerp .oe-view-manager-logs ul {
- margin: 0;
- padding: 0 10px;
- list-style: none;
-}
-.openerp .oe-view-manager-logs li:before {
- content: '\2192 ';
-}
-.openerp .oe-view-manager-logs a {
- text-decoration: none;
- color: inherit;
-}
-/* only display first three log items of a folded logs list */
-.openerp .oe-view-manager-logs.oe-folded li:nth-child(n+4) {
- display: none;
-}
-/* display link to more logs if there are more logs to view and the logview is
- currently folded */
-.openerp .oe-view-manager-logs a.oe-more-logs {
- display: none;
-}
-.openerp .oe-view-manager-logs.oe-folded.oe-has-more a.oe-more-logs {
- display: block;
-}
-.openerp .oe-view-manager-logs a.oe-remove-everything {
- position: absolute;
- top: 0;
- right: 0;
- cursor: pointer;
-}
-
-.openerp .view-manager-main-sidebar {
- width: 180px;
- padding: 0;
- margin: 0;
-}
-
-.openerp .sidebar-main-div {
- height: 100%;
- border-left: 1px solid #D2CFCF;
-}
-
-.openerp .sidebar-content {
- padding: 0;
- margin: 0;
- width: 180px;
- height: 100%;
- font-size: 0.9em;
-}
-
-.openerp .closed-sidebar .sidebar-content {
- width: 22px;
-}
-
-.openerp .closed-sidebar .sidebar-content {
- display: none;
-}
-
-.openerp .sidebar-main-div a {
- color: #555;
- text-decoration: none;
-}
-
-.openerp .sidebar-main-div a:hover {
- color: black;
-}
-
-.openerp .oe-sidebar-attachments-toolbar {
- margin: 4px 0 0 4px;
-}
-.openerp .oe-sidebar-attachments-items {
- clear: both;
- padding-top: 5px !important;
-}
-.openerp .oe-sidebar-attachments-items li {
- position: relative;
- padding: 0 0 3px 10px !important;
-}
-.openerp .oe-sidebar-attachments-items li:hover {
- background: #ddd;
-}
-.openerp .oe-sidebar-attachments-link {
- display: block;
- margin-right: 15px;
- overflow: hidden;
-}
-.openerp .oe-sidebar-attachment-delete {
- position: absolute;
- right: 2px;
- top: 1px;
- overflow: hidden;
- width: 15px;
- height: 15px;
- padding: 1px;
- border-radius: 7px;
- -moz-border-radius: 7px;
- -webkit-border-radius: 7px;
-}
-.openerp .oe-sidebar-attachment-delete:hover {
- background-color: white;
-}
-
-.openerp .view-manager-main-sidebar h2 {
- margin:0;
- font-size: 1.15em;
- color: #8E8E8E;
- text-shadow: white 0 1px 0;
- padding-left: 10px;
- padding-right: 21px;
- height: 21px;
-
- background: #ffffff; /* Old browsers */
- background: -moz-linear-gradient(top, #ffffff 0%, #ebe9e9 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ebe9e9)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EBE9E9',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* W3C */
-
- border: 1px solid #D2CFCF;
- border-right-width: 0;
- border-left-width: 0;
-}
-.openerp .view-manager-main-sidebar h2 {
- border-top-width: 0;
-}
-
-.openerp .view-manager-main-sidebar ul {
- list-style-type: none;
- margin: 0;
- padding: 0;
- display: block;
-}
-
-.openerp .view-manager-main-sidebar li {
- display: block;
- padding: 3px 3px 3px 10px;
-}
-
-.openerp .toggle-sidebar {
- cursor: pointer;
- border: 1px solid #D2CFCF;
- border-top-width: 0;
- display: block;
- background: url(/web/static/src/img/toggle-a-bg.png);
- width: 21px;
- height: 21px;
- z-index: 10;
-}
-.openerp .open-sidebar .toggle-sidebar {
- margin-left: 158px;
- background-position: 21px 0;
- position: absolute;
-}
-.openerp .closed-sidebar .toggle-sidebar {
- border-left: none;
-}
-.openerp li.oe_sidebar_print {
- padding-left: 20px;
- background: 1px 3px url(/web/static/src/img/icons/gtk-print.png) no-repeat;
-}
-
-.openerp .oe_sidebar_print ul {
- padding-left:8px;
-}
-
-.openerp.kitten-mode-activated .main_table {
- background: url(http://placekitten.com/g/1500/800) repeat;
-}
-.openerp.kitten-mode-activated.clark-gable .main_table {
- background: url(http://amigrave.com/ClarkGable.jpg);
- background-size: 100%;
-}
-
-.openerp.kitten-mode-activated .header {
- background: url(http://placekitten.com/g/211/65) repeat;
-}
-
-.openerp.kitten-mode-activated .secondary_menu {
- background: url(http://placekitten.com/g/212/100) repeat;
-}
-
-.openerp.kitten-mode-activated .menu {
- background: #828282;
- background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%);
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D));
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 );
-}
-.openerp.kitten-mode-activated .menu a {
- background: none;
-}
-.openerp.kitten-mode-activated .menu span {
- background: none;
-}
-.openerp.kitten-mode-activated .sidebar-content li a,
-.openerp.kitten-mode-activated .oe-application .view-manager-main-content h2.oe_view_title,
-.openerp.kitten-mode-activated .oe-application .view-manager-main-content a.searchview_group_string,
-.openerp.kitten-mode-activated .oe-application .view-manager-main-content label {
- color: white;
-}
-.openerp.kitten-mode-activated .menu,
-.openerp.kitten-mode-activated .header_corner,
-.openerp.kitten-mode-activated .header_title,
-.openerp.kitten-mode-activated .secondary_menu div,
-.openerp.kitten-mode-activated .oe-application,
-.openerp.kitten-mode-activated .oe_footer,
-.openerp.kitten-mode-activated .loading,
-.openerp.kitten-mode-activated .ui-dialog {
- opacity:0.8;
- filter:alpha(opacity=80);
-}
-.openerp.kitten-mode-activated .header .company_logo {
- background: url(http://placekitten.com/g/180/46);
-}
-.openerp.kitten-mode-activated .loading {
- background: #828282;
- border-color: #828282;
-}
-
-.openerp .oe-m2o-drop-down-button {
- margin-left: -24px;
-}
-.openerp .oe-m2o-drop-down-button img {
- margin-bottom: -4px;
- cursor: pointer;
-}
-.openerp .oe-m2o input {
- border-right: none;
- margin-right: 0px !important;
- padding-bottom: 2px !important;
-}
-.openerp .oe-m2o-disabled-cm {
- color: grey;
-}
-.openerp ul[role="listbox"] li a {
- font-size:80%;
-}
-.parent_top {
- vertical-align: text-top;
-}
-
-.openerp .oe-dialog-warning p {
- padding-left: 1em;
- font-size: 1.2em;
- font-weight: bold;
-}
-
-.openerp .dhx_mini_calendar {
- -moz-box-shadow: none;
- -khtml-box-shadow: none;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.openerp .oe-treeview-table {
- width: 100%;
- background-color : #FFFFFF;
- border-spacing: 0;
-
-}
-.openerp .oe-treeview-table tr:hover{
- color: blue;
- background-color : #D8D8D8;
-}
-.treeview-tr, .treeview-td {
- cursor: pointer;
- vertical-align: top;
- text-align: left;
- border-bottom: 1px solid #CFCCCC;
-}
-.openerp .oe-treeview-table .oe-number {
- text-align: right !important;
-}
-.treeview-tr span, .treeview-td span {
- font-size: 90%;
- font-weight: normal;
- white-space: nowrap;
- display: block;
- }
-.treeview-tr.oe-treeview-first {
- background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat;
-}
-.oe-open .treeview-tr.oe-treeview-first {
- background-image: url(/web/static/src/img/collapse.gif);
-}
-.treeview-tr.oe-treeview-first span,
-.treeview-td.oe-treeview-first span {
- margin-left: 16px;
-}
-
-.treeview-header {
- vertical-align: top;
- background-color : #D8D8D8;
- white-space: nowrap;
- text-align: left;
- padding: 4px 5px;
-}
-/* Shortcuts*/
-.oe-shortcut-toggle {
- height: 20px;
- margin-top: 3px;
- padding: 0;
- width: 24px;
- cursor: pointer;
- display: block;
- background: url(/web/static/src/img/add-shortcut.png) no-repeat center center;
- float: left;
-}
-.oe-shortcut-remove{
- background: url(/web/static/src/img/remove-shortcut.png) no-repeat center center;
-}
-.oe-shortcuts {
- position: absolute;
- margin: 0;
- padding: 6px 15px;
- top: 37px;
- left: 197px;
- right: 0;
- height: 17px;
- line-height: 1.2;
-}
-.oe-shortcuts ul {
- display: block;
- overflow: hidden;
- list-style: none;
- white-space: nowrap;
padding: 0;
- margin: 0;
-}
-.oe-shortcuts li {
- cursor: pointer;
- display: -moz-inline-stack;
- display: inline-block;
- display: inline; /*IE7 */
- color: #fff;
- text-align: center;
- border-left: 1px solid #909090;
- padding: 0 4px;
- font-size: 80%;
- font-weight: normal;
- vertical-align: top;
-}
-
-.oe-shortcuts li:hover {
- background-color: #666;
-}
-.oe-shortcuts li:first-child {
- border-left: none;
- padding-left: 0;
-}
-
-ul.oe-arrow-list {
- padding-left: 1.1em;
- margin: 0;
- white-space: nowrap;
-}
-ul.oe-arrow-list li {
- display: inline-block;
- margin-left: -1em;
-}
-ul.oe-arrow-list li span {
- vertical-align: top;
- display: inline-block;
- border: 1em solid #DEDEDE;
- line-height:0em;
-}
-ul.oe-arrow-list .oe-arrow-list-before {
- border-left-color: rgba(0,0,0,0);
- border-right-width:0;
-}
-ul.oe-arrow-list .oe-arrow-list-after {
- border-color: rgba(0,0,0,0);
- border-left-color: #DEDEDE;
- border-right-width:0;
-}
-ul.oe-arrow-list li.oe-arrow-list-selected span {
- border-color: #B5B9FF;
-}
-ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-before {
- border-left-color: rgba(0,0,0,0);
-}
-ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
- border-color: rgba(0,0,0,0);
- border-left-color: #B5B9FF;
-}
-.openerp ul.oe-arrow-list li:first-child span:first-child{
- -webkit-border-top-left-radius: 3px;
- -moz-border-radius-topleft: 3px;
- border-top-left-radius: 3px;
- -webkit-border-bottom-left-radius: 3px;
- -moz-border-radius-bottomleft: 3px;
- border-bottom-left-radius: 3px;
-}
-.openerp ul.oe-arrow-list li:last-child span:last-child{
- -webkit-border-top-right-radius: 3px;
- -moz-border-radius-topright: 3px;
- border-top-right-radius: 3px;
- -webkit-border-bottom-right-radius: 3px;
- -moz-border-radius-bottomright: 3px;
- border-bottom-right-radius: 3px;
-}
-.openerp .oe_view_editor {
- width:100%;
- border-collapse : collapse;
- margin-left: -12px;
-
- width: 100%;
- background-color : white;
- border-spacing: 0;
-}
-.openerp .oe_view_editor td{
- text-align: center;
- white-space: nowrap;
- border: 1px solid #D8D8D8;
-
- cursor: pointer;
- font-size: 90%;
-}
-.openerp .oe_view_editor_field td{
- border: 0px !important;
-}
-
-.openerp .oe_view_editor tr:hover {
- background-color: #ecebf2;
-}
-
-
-/* Dialog traceback cases */
-.openerp .oe_error_detail{
- display: block;
-}
-.openerp .oe_error_send{
- display:block;
-}
-.openerp .oe_fielddiv{
- display:inline-block;
- width:100%;
-}
-.openerp .oe_fielddiv input[type=text],textarea{
- width:100%;
-}
-/* for Alignment center */
-.openerp .oe_centeralign{
- text-align:center;
-}
-
-.openerp .oe_applications_tiles {
- color: #4C4C4C;
- text-shadow: #EEE 0 1px 0;
- margin: 0 20px;
-}
-
-.openerp .oe_vm_switch {
- margin:2px 0 0 0;
-}
-
-.openerp .oe_vm_switch_form,
-.openerp .oe_vm_switch_page,
-.openerp .oe_vm_switch_tree,
-.openerp .oe_vm_switch_list,
-.openerp .oe_vm_switch_graph,
-.openerp .oe_vm_switch_gantt,
-.openerp .oe_vm_switch_calendar,
-.openerp .oe_vm_switch_kanban,
-.openerp .oe_vm_switch_diagram {
- background: url("/web/static/src/img/views-icons-a.png") repeat-x scroll left top transparent;
- overflow: hidden;
- width: 22px;
- height: 21px;
- border: none;
- background-position: 0px 0px;
-}
-
-.openerp .oe_vm_switch_form span,
-.openerp .oe_vm_switch_page span,
-.openerp .oe_vm_switch_tree span,
-.openerp .oe_vm_switch_list span,
-.openerp .oe_vm_switch_graph span,
-.openerp .oe_vm_switch_gantt span,
-.openerp .oe_vm_switch_calendar span,
-.openerp .oe_vm_switch_kanban span,
-.openerp .oe_vm_switch_diagram span {
- display: none;
-}
-
-.openerp .oe_vm_switch_list {
- background-position: 0px 0px;
-}
-.openerp .oe_vm_switch_list:active,
-.openerp .oe_vm_switch_list:hover,
-.openerp .oe_vm_switch_list:focus,
-.openerp .oe_vm_switch_list[disabled="disabled"] {
- background-position: 0px -21px;
-}
-
-.openerp .oe_vm_switch_tree {
- background-position: 0px 0px;
-}
-.openerp .oe_vm_switch_tree:active,
-.openerp .oe_vm_switch_tree:hover,
-.openerp .oe_vm_switch_tree:focus,
-.openerp .oe_vm_switch_tree[disabled="disabled"] {
- background-position: 0px -21px;
-}
-
-.openerp .oe_vm_switch_form {
- background-position: -22px 0px;
-}
-.openerp .oe_vm_switch_form:active,
-.openerp .oe_vm_switch_form:hover,
-.openerp .oe_vm_switch_form:focus,
-.openerp .oe_vm_switch_form[disabled="disabled"] {
- background-position: -22px -21px;
-}
-
-.openerp .oe_vm_switch_page {
- background-position: -22px 0px;
-}
-.openerp .oe_vm_switch_page:active,
-.openerp .oe_vm_switch_page:hover,
-.openerp .oe_vm_switch_page:focus,
-.openerp .oe_vm_switch_page[disabled="disabled"] {
- background-position: -22px -21px;
-}
-.openerp .oe_vm_switch_graph {
- background-position: -44px 0px;
-}
-.openerp .oe_vm_switch_graph:active,
-.openerp .oe_vm_switch_graph:hover,
-.openerp .oe_vm_switch_graph:focus,
-.openerp .oe_vm_switch_graph[disabled="disabled"] {
- background-position: -44px -21px;
-}
-
-.openerp .oe_vm_switch_gantt {
- background-position: -66px 0px;
-}
-.openerp .oe_vm_switch_gantt:active,
-.openerp .oe_vm_switch_gantt:hover,
-.openerp .oe_vm_switch_gantt:focus,
-.openerp .oe_vm_switch_gantt[disabled="disabled"] {
- background-position: -66px -21px;
-}
-
-.openerp .oe_vm_switch_calendar {
- background-position: -88px 0px;
-}
-.openerp .oe_vm_switch_calendar:active,
-.openerp .oe_vm_switch_calendar:hover,
-.openerp .oe_vm_switch_calendar:focus,
-.openerp .oe_vm_switch_calendar[disabled="disabled"] {
- background-position: -88px -21px;
-}
-.openerp .oe_vm_switch_kanban {
- background-position: -110px 0px;
-}
-.openerp .oe_vm_switch_kanban:active,
-.openerp .oe_vm_switch_kanban:hover,
-.openerp .oe_vm_switch_kanban:focus,
-.openerp .oe_vm_switch_kanban[disabled="disabled"] {
- background-position: -110px -21px;
-}
-
-.openerp .oe_vm_switch_diagram {
- background-position: 0px 0px;
-}
-.openerp .oe_vm_switch_diagram:active,
-.openerp .oe_vm_switch_diagram:hover,
-.openerp .oe_vm_switch_diagram:focus,
-.openerp .oe_vm_switch_diagram[disabled="disabled"] {
- background-position: 0px -21px;
-}
-
-/* Buttons */
-.openerp .oe_button:link,
-.openerp .oe_button:visited,
-.openerp .oe_button {
- display: inline-block;
- border: 1px solid #ababab;
- color: #404040;
- font-size: 12px;
- padding: 3px 10px;
- text-align: center;
- -o-background-size: 100% 100%;
- -moz-background-size: 100% 100%;
- -webkit-background-size: auto auto !important;
- background-size: 100% 100%;
- background: #d8d8d8 none;
- background: none, -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
- background: none, -webkit-linear-gradient(#efefef, #d8d8d8);
- background: none, -moz-linear-gradient(#efefef, #d8d8d8);
- background: none, -o-linear-gradient(top, #efefef, #d8d8d8);
- background: none, -khtml-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
- background: -ms-linear-gradient(top, #efefef, #d8d8d8);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#efefef', endColorstr='#d8d8d8',GradientType=0 );
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- -o-border-radius: 3px;
- -ms-border-radius: 3px;
- border-radius: 3px;
- -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
- -webkit-font-smoothing: antialiased;
- outline: none;
-}
-
-.openerp .oe_button:hover {
- -o-background-size: 100% 100%;
- -moz-background-size: 100% 100%;
- -webkit-background-size: auto auto !important;
- background-size: 100% 100%;
- background: #e3e3e3 none;
- background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
- background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3);
- background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3);
- background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3);
- background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
- background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 );
- cursor: pointer;
-}
-
-.openerp .oe_button:focus {
- border: 1px solid #80bfff;
- -o-background-size: 100% 100%;
- -moz-background-size: 100% 100%;
- -webkit-background-size: auto auto !important;
- background-size: 100% 100%;
- background: #e3e3e3, none;
- background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
- background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3);
- background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3);
- background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3);
- background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
- background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 );
- -moz-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- -webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- -o-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
- box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
-}
-
-.openerp .oe_button:active,
-.openerp .oe_button.active {
- background: #e3e3e3;
- background: -moz-linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f;
- background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)) #1b468f;
- background: linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f;
- background: -ms-linear-gradient(top, #e3e3e3, #f6f6f6);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e3e3e3', endColorstr='#f6f6f6',GradientType=0 );
- -moz-box-shadow: none, 0 0 0 transparent;
- -webkit-box-shadow: none, 0 0 0 transparent;
- -o-box-shadow: none, 0 0 0 transparent;
- box-shadow: none, 0 0 0 transparent;
-}
-
-.openerp .oe_button.disabled,
-.openerp .oe_button:disabled {
- background: #efefef !important;
- border: 1px solid #d1d1d1 !important;
- font-size: 12px;
- padding: 3px 10px;
- -moz-box-shadow: none !important, 0 0 0 transparent;
- -webkit-box-shadow: none !important, 0 0 0 transparent;
- -o-box-shadow: none !important, 0 0 0 transparent;
- box-shadow: none !important, 0 0 0 transparent;
- color: #aaaaaa !important;
- cursor: default;
- text-shadow: 0 1px 1px white !important;
-}
-
-.openerp select.oe_search-view-filters-management {
- font-style: oblique;
- color: #999999;
-}
-
-.openerp .oe_search-view-filters-management option,
-.openerp .oe_search-view-filters-management optgroup {
- font-style: normal;
- color: black;
-}
-
-/* Debug stuff */
-.openerp .oe_debug_view_log {
- font-size: 95%;
-}
-.openerp .oe_debug_view_log label {
- display: block;
- width: 49%;
- text-align: right;
- float: left;
- font-weight: bold;
- color: #009;
-}
-.openerp .oe_debug_view_log span {
- display: block;
- width: 49%;
- float: right;
- color: #333;
-}
-
-/* Internet Explorer Fix */
-a img {
- border: none;
-}
+ margin: 0; }
+ .openerp2 .oe_user_menu li {
+ list-style-type: none;
+ float: left; }
+ .openerp2 .oe_user_menu .oe_dropdown {
+ position: relative; }
+ .openerp2 .oe_user_menu .oe_dropdown_toggle:after {
+ width: 0;
+ height: 0;
+ display: inline-block;
+ content: "&darr";
+ text-indent: -99999px;
+ vertical-align: top;
+ margin-top: 8px;
+ margin-left: 4px;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid white;
+ filter: alpha(opacity=50);
+ opacity: 0.5; }
+ .openerp2 .oe_user_menu .oe_dropdown_options {
+ float: left;
+ background: #333333;
+ background: rgba(37, 37, 37, 0.9);
+ display: none;
+ position: absolute;
+ top: 32px;
+ right: -1px;
+ border: 0;
+ z-index: 900;
+ margin-left: 0;
+ margin-right: 0;
+ padding: 6px 0;
+ zoom: 1;
+ border-color: #999999;
+ border-color: rgba(0, 0, 0, 0.2);
+ border-style: solid;
+ border-width: 0 1px 1px;
+ -moz-border-radius: 0 0 6px 6px;
+ -webkit-border-radius: 0 0 6px 6px;
+ border-radius: 0 0 6px 6px;
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box; }
+ .openerp2 .oe_user_menu .oe_dropdown_options li {
+ float: none;
+ display: block;
+ background-color: none; }
+ .openerp2 .oe_user_menu .oe_dropdown_options li a {
+ display: block;
+ padding: 4px 15px;
+ clear: both;
+ font-weight: normal;
+ line-height: 18px;
+ color: #eeeeee; }
+ .openerp2 .oe_user_menu .oe_dropdown_options li a:hover {
+ background-color: #292929;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#292929), to(#191919));
+ background-image: -webkit-linear-gradient(top, #292929, #191919);
+ background-image: -moz-linear-gradient(top, #292929, #191919);
+ background-image: -ms-linear-gradient(top, #292929, #191919);
+ background-image: -o-linear-gradient(top, #292929, #191919);
+ background-image: linear-gradient(to bottom, #292929, #191919);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ -box-shadow: none; }
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
new file mode 100644
index 00000000000..56a735c98fd
--- /dev/null
+++ b/addons/web/static/src/css/base.sass
@@ -0,0 +1,330 @@
+// Variables {{{
+$colour4: #8a89ba
+//$colour4: #d14836
+// }}}
+
+// Mixins {{{
+@mixin vertical-gradient($startColor: #555, $endColor: #333)
+ background-color: $startColor
+ background-image: -webkit-gradient(linear, left top, left bottom, from($startColor), to($endColor)) /* Saf4+, Chrome */
+ background-image: -webkit-linear-gradient(top, $startColor, $endColor) /* Chrome 10+, Saf5.1+, iOS 5+ */
+ background-image: -moz-linear-gradient(top, $startColor, $endColor) /* FF3.6 */
+ background-image: -ms-linear-gradient(top, $startColor, $endColor) /* IE10 */
+ background-image: -o-linear-gradient(top, $startColor, $endColor) /* Opera 11.10+ */
+ background-image: linear-gradient(to bottom, $startColor, $endColor)
+
+
+@mixin radial-gradient($gradient)
+ background-position: center center
+ background-image: -webkit-radial-gradient(circle, $gradient)
+ background-image: -moz-radial-gradient($gradient)
+ background-image: -ms-radial-gradient($gradient)
+ background-image: radial-gradient($gradient)
+
+@mixin radius($radius: 5px)
+ -moz-border-radius: $radius
+ -webkit-border-radius: $radius
+ border-radius: $radius
+
+@mixin box-shadow($bsval: 0px 1px 4px #777)
+ -moz-box-shadow: $bsval
+ -webkit-box-shadow: $bsval
+ -box-shadow: $bsval
+
+@mixin transition($transval: (border linear 0.2s, box-shadow linear 0.2s))
+ -webkit-transition: $transval
+ -moz-transition: $transval
+ -ms-transition: $transval
+ -o-transition: $transval
+ transition: $transval
+
+@mixin opacity($opacity: .5)
+ filter: alpha(opacity=$opacity * 100)
+ opacity: $opacity
+
+@mixin background-clip($clip: padding-box)
+ -webkit-background-clip: $clip
+ -moz-background-clip: $clip
+ background-clip: $clip
+// }}}
+
+.openerp2
+ // Common styles {{{
+ padding: 0
+ margin: 0
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif
+ color: #4c4c4c
+ font-size: 13px
+ background: white
+ position: relative
+
+ a
+ text-decoration: none
+ // }}}
+
+ // WebClient {{{
+ .oe_webclient
+ position: absolute
+ top: 0
+ bottom: 0
+ left: 0
+ right: 0
+
+ .oe_application
+ position: absolute
+ top: 32px
+ bottom: 0
+ left: 206px
+ right: 0
+ // }}}
+
+ // Fullscreen mode {{{
+ .oe_content_full_screen
+ .oe_application
+ top: 0
+ left: 0
+ .topbar, .leftbar
+ display: none
+ // }}
+
+ // Topbar {{{
+ .oe_topbar
+ width: 100%
+ height: 31px
+ border-top: solid 1px #d3d3d3
+ border-bottom: solid 1px black
+ @include vertical-gradient(#646060, #262626)
+
+ .oe_systray
+ float: right
+ .oe_systray > div
+ float: left
+ padding: 0 4px 0 4px
+
+ .oe_topbar_item
+ li
+ float: left
+ a
+ display: block
+ padding: 5px 10px 7px
+ line-height: 20px
+ height: 20px
+ color: #eee
+ vertical-align: top
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ &:hover
+ background: #303030
+ color: white
+ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset)
+ .oe_active
+ background: #303030
+ font-weight: bold
+ color: white
+ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset)
+
+ .oe_topbar_avatar
+ width: 24px
+ height: 24px
+ margin: -2px 2px 0 0
+ @include radius(4px)
+ .oe_topbar_avatar
+ vertical-align: top
+ // }}}
+
+ // Leftbar {{{
+ .oe_leftbar
+ width: 205px
+ height: 100%
+ background: #f0eeee
+ border-right: 1px solid #afafb6
+ overflow: auto
+ text-shadow: 0 1px 1px white
+
+ .oe_footer
+ position: absolute
+ width: 205px
+ text-align: center
+ bottom: 8px
+ a.oe_logo
+ display: block
+ text-align: center
+ height: 70px
+ line-height: 70px
+ img
+ height: 40px
+ width: 157px
+ margin: 14px 0
+ .oe_footer
+ position: absolute
+ width: 205px
+ text-align: center
+ bottom: 8px
+ a
+ font-weight: 800
+ font-family: serif
+ font-size: 16px
+ color: black
+ span
+ color: #c81010
+ font-style: italic
+ // }}}
+
+ // Menu {{{
+ .oe_menu
+ float: left
+ padding: 0
+ margin: 0
+ li
+ list-style-type: none
+ float: left
+ a
+ display: block
+ padding: 5px 10px 7px
+ line-height: 20px
+ height: 20px
+ color: #eee
+ vertical-align: top
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ &:hover
+ background: #303030
+ color: white
+ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset)
+ .oe_active
+ background: #303030
+ font-weight: bold
+ color: white
+ @include box-shadow(0 1px 2px rgba(255,255,255,0.3) inset)
+ .oe_secondary_menu_section
+ font-weight: bold
+ margin-left: 8px
+ color: $colour4
+ .oe_secondary_submenu
+ padding: 2px 0 8px 0
+ margin: 0
+ width: 100%
+ display: inline-block
+ li
+ position: relative
+ padding: 1px 0 1px 16px
+ list-style-type: none
+ a
+ display: block
+ color: #4c4c4c
+ padding: 2px 4px 2px 0
+ .oe_menu_label
+ position: absolute
+ top: 1px
+ right: 1px
+ font-size: 10px
+ background: $colour4
+ color: white
+ padding: 2px 4px
+ margin: 1px 6px 0 0
+ border: 1px solid lightGray
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ @include radius(4px)
+ @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2))
+ .oe_active
+ background: $colour4
+ border-top: 1px solid lightGray
+ border-bottom: 1px solid lightGray
+ text-shadow: 0 1px 1px rgba(0,0,0,0.2)
+ @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2))
+ a
+ color: white
+ .oe_menu_label
+ background: #eee
+ color: $colour4
+ text-shadow: 0 1px 1px white
+ @include box-shadow(0 1px 1px rgba(0, 0, 0, 0.2))
+ .oe_menu_toggler:before
+ width: 0
+ height: 0
+ display: inline-block
+ content: "&darr"
+ text-indent: -99999px
+ vertical-align: top
+ margin-left: -8px
+ margin-top: 4px
+ margin-right: 4px
+ border-top: 4px solid transparent
+ border-bottom: 4px solid transparent
+ border-left: 4px solid #4c4c4c
+ @include opacity(0.5)
+ .oe_menu_opened:before
+ margin-top: 6px
+ margin-left: -12px
+ margin-right: 4px
+ border-left: 4px solid transparent
+ border-right: 4px solid transparent
+ border-top: 4px solid #4c4c4c
+ // }}}
+
+ // UserMenu {{{
+ .oe_user_menu
+ float: right
+ padding: 0
+ margin: 0
+ li
+ list-style-type: none
+ float: left
+ .oe_dropdown
+ position: relative
+
+ .oe_dropdown_toggle:after
+ width: 0
+ height: 0
+ display: inline-block
+ content: "&darr"
+ text-indent: -99999px
+ vertical-align: top
+ margin-top: 8px
+ margin-left: 4px
+ border-left: 4px solid transparent
+ border-right: 4px solid transparent
+ border-top: 4px solid white
+ @include opacity(0.5)
+
+ .oe_dropdown_options
+ float: left
+ background: #333
+ background: rgba(37,37,37,0.9)
+ display: none
+ position: absolute
+ top: 32px
+ right: -1px
+ border: 0
+ z-index: 900
+ margin-left: 0
+ margin-right: 0
+ padding: 6px 0
+ zoom: 1
+ border-color: #999
+ border-color: rgba(0, 0, 0, 0.2)
+ border-style: solid
+ border-width: 0 1px 1px
+ @include radius(0 0 6px 6px)
+ @include box-shadow(0 1px 4px rgba(0,0,0,0.3))
+ @include background-clip()
+ li
+ float: none
+ display: block
+ background-color: none
+ a
+ display: block
+ padding: 4px 15px
+ clear: both
+ font-weight: normal
+ line-height: 18px
+ color: #eee
+ &:hover
+ @include vertical-gradient(#292929, #191919)
+ @include box-shadow(none)
+ // }}}
+
+.openerp
+ // Transitional overrides for old styles {{{
+ // }}}
+
+// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css"
+// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:
diff --git a/addons/web/static/src/css/base_old.css b/addons/web/static/src/css/base_old.css
new file mode 100644
index 00000000000..fe3a6074492
--- /dev/null
+++ b/addons/web/static/src/css/base_old.css
@@ -0,0 +1,2068 @@
+.openerp {
+ padding: 0;
+ margin: 0;
+ height: 100%;
+ font-size: 80%;
+ font-family: Ubuntu, Helvetica, sans-serif;
+}
+
+.openerp, .openerp textarea, .openerp input, .openerp select, .openerp option,
+.openerp button, .openerp .ui-widget {
+ font-family: Ubuntu, Helvetica, sans-serif;
+ font-size:85%;
+}
+
+.openerp .view-manager-main-content {
+ width: 100%;
+ padding: 0 8px 8px 8px;
+}
+
+.openerp .oe_form_frame_cell .view-manager-main-content {
+ padding: 0;
+}
+
+.oe_box {
+ border: 1px solid #aaf;
+ padding: 2px;
+ margin: 2px;
+}
+
+
+#oe_errors pre {
+ margin: 0;
+}
+
+.openerp .oe-listview .oe-number {
+ text-align: right !important;
+}
+.oe-listview-header-columns {
+ background: #d1d1d1; /* Old browsers */
+ background: -moz-linear-gradient(top, #ffffff 0%, #d1d1d1 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#d1d1d1)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#d1d1d1',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #ffffff 0%,#d1d1d1 100%); /* W3C */
+}
+
+.openerp .oe_hide {
+ display: none !important;
+}
+
+/* STATES */
+.openerp .on_logged,
+.openerp .db_options_row {
+ display: none;
+}
+
+/* Loading */
+.loading {
+ cursor: wait;
+}
+.openerp .loading {
+ display: none;
+ z-index: 100;
+ position: fixed;
+ top: 0;
+ right: 50%;
+ padding: 4px 12px;
+ background: #A61300;
+ color: white;
+ text-align: center;
+ border: 1px solid #900;
+ border-top: none;
+ -moz-border-radius-bottomright: 8px;
+ -moz-border-radius-bottomleft: 8px;
+ border-bottom-right-radius: 8px;
+ border-bottom-left-radius: 8px;
+}
+.openerp .oe_notification {
+ z-index: 1050;
+ display: none;
+}
+.openerp .oe_notification * {
+ color: white;
+}
+
+/* Login page */
+
+.login {
+ padding: 0;
+ margin: 0;
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial;
+ background: url("/web/static/src/img/pattern.png") repeat;
+ color: #eee;
+ font-size: 14px;
+ height: 100%;
+}
+
+.login ul, ol {
+ padding: 0;
+ margin: 0;
+}
+
+.login li {
+ list-style-type: none;
+ padding-bottom: 4px;
+}
+
+.login a {
+ color: #eee;
+ text-decoration: none;
+}
+
+.login button {
+ float: right;
+ display: inline-block;
+ cursor: pointer;
+ padding: 6px 16px;
+ font-size: 13px;
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial;
+ border: 1px solid #222222;
+ color: white;
+ margin: 0;
+ background: #600606;
+ background: -moz-linear-gradient(#b92020, #600606);
+ background: -webkit-gradient(linear, left top, left bottom, from(#b92020), to(#600606));
+ background: -ms-linear-gradient(top, #b92020, #600606);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b92020', endColorstr='#600606',GradientType=0 );
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(155, 155, 155, 0.4) inset;
+ -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(155, 155, 155, 0.4) inset;
+}
+
+.login input, .login select {
+ width: 252px;
+ font-size: 14px;
+ font-family: "Lucida Grande", Helvetica, Verdana, Arial;
+ border: 1px solid #999999;
+ background: whitesmoke;
+ -moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
+ -box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+
+.login input {
+ margin-bottom: 9px;
+ padding: 5px 6px;
+}
+
+.login select {
+ padding: 1px;
+}
+
+.login .dbpane {
+ position: fixed;
+ top: 0;
+ right: 8px;
+ padding: 5px 10px;
+ color: #eee;
+ border: solid 1px #333;
+ background: #1e1e1e;
+ background: rgba(30,30,30,0.94);
+ -moz-border-radius: 0 0 8px 8px;
+ -webkit-border-radius: 0 0 8px 8px;
+ border-radius: 0 0 8px 8px;
+}
+
+.login .bottom {
+ position: absolute;
+ top: 50%;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ text-shadow: 0 1px 1px #999999;
+ background: #600606;
+ background: -moz-linear-gradient(#b41616, #600606);
+ background: -webkit-gradient(linear, left top, left bottom, from(#b41616), to(#600606));
+ background: -ms-linear-gradient(top, #b41616, #600606);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#b41616', endColorstr='#600606',GradientType=0 );
+}
+
+.login .pane {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin: -160px -166px;
+ border: solid 1px #333333;
+ background: #1e1e1e;
+ background: rgba(30,30,30,0.94);
+ padding: 22px 32px;
+ text-align: left;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ -moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
+ -webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
+ -box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);
+}
+
+.login .pane h2 {
+ margin-top: 0;
+ font-size: 18px;
+}
+
+.login #logo {
+ position: absolute;
+ top: -70px;
+ left: 0;
+ width: 100%;
+ margin: 0 auto;
+ text-align: center;
+}
+
+.login .footer {
+ position: absolute;
+ bottom: -40px;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+
+.login .footer a {
+ font-size: 13px;
+ margin: 0 8px;
+}
+
+.login .footer a:hover {
+ text-decoration: underline;
+}
+
+.login .openerp {
+ font-weight: bold;
+ font-family: serif;
+ font-size: 16px;
+}
+
+.openerp .login {
+ text-align: center;
+}
+
+.openerp .login .login_error_message {
+ display: none;
+ background-color: #b41616;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
+ -box-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
+ color: #eee;
+ font-size: 14px;
+ padding: 14px 18px;
+ margin-top: 15px;
+ text-align: center;
+}
+
+.openerp .login.login_invalid .login_error_message {
+ display: inline-block;
+}
+
+
+
+/* Database */
+.login .oe-database-manager {
+ display: none;
+ height: 100%;
+ width: 100%;
+ background-color: white;
+}
+.login.database_block .bottom,
+.login.database_block .login_error_message,
+.login.database_block .pane {
+ display: none;
+}
+.login.database_block .oe-database-manager {
+ display: block;
+}
+
+.login .database {
+ float: left;
+ width: 202px;
+ height: 100%;
+ background: #666666;
+}
+.login .oe_db_options {
+ margin-left: 202px;
+ color: black;
+ padding-top: 20px;
+}
+
+.login .database ul {
+ margin-top: 65px;
+}
+
+ul.db_options li {
+ padding: 5px 0 10px 5px;
+ background: #949292; /* Old browsers */
+ background: -moz-linear-gradient(top, #949292 30%, #6d6b6b 95%, #282828 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(30%,#949292), color-stop(95%,#6d6b6b), color-stop(100%,#282828)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#282828',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #949292 30%,#6d6b6b 95%,#282828 100%); /* W3C */
+ /* for ie9 */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#949292', endColorstr='#5B5A5A',GradientType=0 ); /* IE6-9 */
+ border: none;
+ /* overriding jquery ui */
+ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
+ display: block;
+ font-weight: bold;
+ text-transform: uppercase;
+ margin: 1px;
+ color: #EEEEEE;
+ cursor: pointer;
+ width: 195px;
+ font-size: 12px;
+}
+
+.db_option_table {
+ border: 1px solid #5A5858;
+ padding: 5px;
+ -moz-border-radius: 10px;
+}
+
+table.db_option_table input.required {
+ background-color: #D2D2FF !important;
+}
+
+.db_option_table label {
+ display: block;
+ text-align: right;
+}
+
+.db_option_table input[type="text"],
+.db_option_table input[type="password"],
+.db_option_table input[type="file"],
+.db_option_table select {
+ width: 300px;
+}
+
+.option_string {
+ font-weight: bold;
+ color: #555;
+ width: 100%;
+ text-align: center;
+ padding: 10px 0;
+ font-size: large;
+}
+
+label.error {
+ float: none;
+ color: red;
+ padding-left: .5em;
+ vertical-align: top;
+}
+
+/* Main*/
+.openerp .main_table {
+ width: 100%;
+ height: 100%;
+ background: #f0eeee;
+}
+.openerp .oe-application {
+ height: 100%;
+}
+.openerp .oe-application-container {
+ width: 100%;
+ height: 100%;
+}
+
+/* IE Hack - for IE < 9
+ * Avoids footer to be placed statically at 100% cutting the middle of the views
+ * */
+.openerp .oe-application-container {
+ height: auto\9;
+ min-height: 100%\9;
+}
+
+
+/* Main Application */
+.openerp .oe-main-content {
+ padding: 0;
+ height: 100%;
+}
+
+.openerp h2.oe_view_title {
+ font-size: 110%;
+ font-weight: normal;
+ margin: 2px 0;
+ color: #252424;
+ text-shadow: white 0 1px 0;
+}
+.openerp div[id^="notebook"] .oe_view_title {
+ font-size:85%;
+ padding-bottom:4px;
+}
+
+/* View Manager */
+.openerp .oe_vm_switch {
+ float: right;
+}
+.openerp .oe-view-manager-header .oe_view_title {
+ font-size:150%;
+ padding:2px 0 0 0;
+}
+
+/* SearchView */
+.openerp .oe_searchview_field > div {
+ position: relative;
+ white-space: nowrap;
+}
+.openerp .oe_searchview_field .oe_input_icon {
+ top: auto;
+ bottom: 3px;
+}
+
+.openerp .filter_label, .openerp .filter_icon {
+ background: #F0F0F0;
+ border: 1px solid #999;
+ background: -moz-linear-gradient(top, #F0F0F0 0%, #C0C0C0 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#C0C0C0));
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#C0C0C0',GradientType=0 );
+}
+.openerp .filter_label:hover, .openerp .filter_icon:hover {
+ background: #F0F0F0;
+ background: -moz-linear-gradient(top, #F0F0F0 0%, #A1A7CE 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#F0F0F0), color-stop(100%,#A1A7CE));
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F0F0F0', endColorstr='#A1A7CE',GradientType=0 );
+}
+.openerp .filter_label:active, .openerp .filter_icon:active {
+ background: #aaa;
+ background: -moz-linear-gradient(top, #999999 0%, #EEEEEE 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#999999), color-stop(100%,#EEEEEE));
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#999999', endColorstr='#EEEEEE',GradientType=0 );
+}
+.openerp .filter_label.enabled, .openerp .filter_icon.enabled {
+ background: #aaa;
+ filter: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ -o-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .filter_icon {
+ height: 22px;
+ padding: 1px 2px 0 2px;
+ margin: 0;
+ vertical-align: bottom;
+}
+.openerp .filter_label {
+ font-weight: bold;
+ text-transform: uppercase;
+ text-shadow: #EEE 0 1px 0;
+ color: #4C4C4C;
+ white-space: nowrap;
+ min-height: 40px;
+ min-width: 75px;
+ padding: 2px 4px;
+ margin: 0;
+}
+.openerp .filter_label_group {
+ padding-right: 0.4em;
+ white-space: nowrap;
+}
+
+.openerp .filter_label_group button {
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ border-right: none;
+}
+.openerp .filter_label_group button:first-child {
+ -webkit-border-top-left-radius: 7px;
+ -webkit-border-bottom-left-radius: 7px;
+ -moz-border-radius-topleft: 7px;
+ -moz-border-radius-bottomleft: 7px;
+ border-top-left-radius: 7px;
+ border-bottom-left-radius: 7px;
+ border-right: none;
+}
+.openerp .filter_label_group button:last-child {
+ -webkit-border-top-right-radius: 7px;
+ -webkit-border-bottom-right-radius: 7px;
+ -moz-border-radius-topright: 7px;
+ -moz-border-radius-bottomright: 7px;
+ border-top-right-radius: 7px;
+ border-bottom-right-radius: 7px;
+ border-right: 1px solid #999;
+}
+.openerp .filter_label_group button.filter_icon img {
+ padding: 1px 8px 0 8px;
+}
+.openerp .filter_label_group button.filter_icon:first-child {
+ border-left: solid 1px #999;
+ margin-left: -7px;
+ -webkit-border-top-left-radius: 0;
+ -webkit-border-bottom-left-radius: 0;
+ -moz-border-radius-topleft: 0;
+ -moz-border-radius-bottomleft: 0;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.openerp .searchview_group_string {
+ display: block;
+ color: #7D7979;
+ font-weight: bold;
+ padding: 2px 0 2px 10px;
+ text-decoration: none;
+}
+.openerp .searchview_group_string:hover {
+ background-color: #ccc;
+}
+.openerp .searchview_group.folded .searchview_group_string {
+ background: url("/web/static/src/img/ui/group-folded.png") no-repeat scroll 0 50%;
+}
+.openerp .searchview_group.folded .searchview_group_content {
+ display: none;
+}
+.openerp .searchview_group.expanded .searchview_group_string {
+ background: url("/web/static/src/img/ui/group-expanded.png") no-repeat scroll 0 50%;
+}
+.openerp .searchview_group.expanded .searchview_group_content {
+ display: block;
+ padding-bottom:3px;
+}
+
+.openerp .searchview_group_content .oe_label, .openerp .searchview_group_content .oe_label_help {
+ font-weight: bold;
+ color: #4c4c4c;
+}
+
+.openerp .oe-searchview-render-line .oe_label, .openerp .oe-searchview-render-line .oe_label_help {
+ font-weight: bold;
+ font-size: 80%;
+ white-space: nowrap;
+}
+
+.openerp .searchview_extended_group {
+ padding: 3px;
+ margin: 2px;
+}
+
+.openerp .searchview_extended_group .oe_adv_filters_and {
+ border-bottom: 1px solid #8E8E8E;
+ text-align: center;
+ margin-top: -10px;
+}
+.openerp .searchview_extended_group .oe_adv_filters_and span {
+ background: #F0EEEE;
+ position: relative;
+ top: 0.5em;
+ padding: 0 1em 0 1em;
+ color: #8E8E8E;
+}
+
+.openerp .searchview_extended_group.last_group .oe_adv_filters_and {
+ display: none;
+}
+
+.openerp .oe_search-view-buttons {
+ padding: 2px 0 10px 0;
+ vertical-align:middle;
+}
+.openerp .oe_search-view-filters-management {
+ float: right;
+}
+.openerp .oe_search-view-filters-management, .openerp .oe_search-view-custom-filter-btn {
+ float:right;
+}
+
+.openerp .searchview_extended_add_proposition span {
+ font-size: 0.9em;
+ background: url(/web/static/src/img/icons/gtk-add.png) repeat-y;
+ padding-left: 18px;
+}
+
+.openerp .searchview_extended_delete_group {
+ float:right;
+ display: none;
+}
+
+.openerp .searchview_extended_delete_prop {
+ text-decoration: none;
+}
+
+.openerp .searchview_extended_delete_group span,
+.openerp .searchview_extended_delete_prop span {
+ font-size: 0.9em;
+ background: url(/web/static/src/img/icons/gtk-close.png) repeat-y;
+ padding-left: 18px;
+}
+/* List */
+.openerp table.oe-listview-content {
+ clear: right;
+ width: 100%;
+ border-spacing: 0;
+ border: 1px solid silver;
+}
+
+.openerp .oe-listview thead table {
+ width: 100%;
+ border: none;
+}
+.openerp .oe-listview tr.odd {
+ background-color: #f3f3f3;
+}
+.openerp .oe-listview tbody tr:hover {
+ background-color: #ecebf2;
+}
+.openerp .oe-listview tbody tr:hover {
+ background-color: #eae9f0;
+}
+.openerp .oe-listview thead table tr,
+.openerp .oe-listview thead table tr:hover {
+ background: none;
+}
+
+.openerp .oe-listview > table > tbody > tr > td,
+.openerp .oe-listview th {
+ vertical-align: middle;
+ text-align: left;
+ padding: 1px 2px;
+}
+
+.openerp .oe-record-delete button,
+.openerp button.oe-edit-row-save {
+ border: none;
+ height: 12px;
+ width: 12px;
+ background: url("/web/static/src/img/iconset-b-remove.png") no-repeat scroll center center transparent;
+ cursor: pointer;
+}
+.openerp button.oe-edit-row-save {
+ background-image: url('/web/static/src/img/icons/save-document.png');
+}
+
+/* Could use :not selectors if they were supported by MSIE8... */
+.openerp .oe-listview > table > tbody > tr > td {
+ border-left: 1px solid #dadada; /*currently commenting to test with no vertical lines in list view*/
+}
+.openerp .oe-listview tbody td:first-child,
+.openerp .oe-listview tbody td.oe-button,
+.openerp .oe-listview tbody td.oe-button,
+.openerp .oe-listview tbody th.oe-record-selector,
+.openerp .oe-listview tbody td.oe-record-delete {
+ border-left: none;
+}
+
+.openerp .oe-listview td.oe-record-delete {
+ text-align: right;
+}
+.openerp .oe-listview th.oe-sortable {
+ cursor: pointer;
+ font-size: 75%;
+ text-transform: uppercase;
+ padding: 0;
+ margin: 0;
+ padding-left: 3px;
+ color: #333;
+}
+.openerp .oe-listview th.oe-sortable .ui-icon {
+ height: 60%;
+ margin: -6px 0 0;
+ display: inline;
+ display: inline-block;
+ vertical-align: middle;
+}
+
+.openerp .oe-listview > table > tbody > tr > td {
+ border-bottom: 1px solid #E3E3E3;
+}
+
+
+.openerp .oe-listview td.oe-actions {
+ border-bottom:none;
+}
+
+.openerp .oe-listview .oe-record-selector, .openerp .oe-listview .oe-record-edit-link {
+ border-bottom: 1px solid #E3E3E3;
+}
+.openerp .oe-listview .oe-record-edit-link {
+ cursor: pointer;
+}
+
+.openerp .oe-listview .oe-field-cell {
+ cursor: pointer;
+ margin-top: 0;
+ margin-bottom: 0;
+ padding-top: 3px;
+ padding-bottom: 3px;
+ font-size: 80%;
+}
+.openerp .oe-listview .oe-field-cell progress {
+ width: 100%;
+}
+.openerp .oe-listview .oe-field-cell.oe-button button,
+.openerp .oe-listview .oe_form_button button {
+ margin: 0;
+ padding: 0;
+ border: none;
+ background: none;
+ width: 16px;
+ box-shadow: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+}
+.openerp .oe-listview .oe-field-cell button:active {
+ opacity: 0.5;
+}
+.openerp .oe-listview .oe-field-cell button img {
+ cursor: pointer;
+}
+.openerp .oe-listview .oe-field-cell button img:hover {
+ opacity: 0.75;
+}
+
+.openerp .oe-listview .oe-field-cell .oe-listview-button-disabled img {
+ opacity: 0.5;
+}
+
+.openerp .oe-listview th.oe-actions {
+ text-align: left;
+ white-space: nowrap;
+}
+.openerp .oe-listview th.oe-list-pager {
+ text-align: right;
+ white-space: nowrap;
+}
+.openerp .oe-list-pager .oe-pager-state {
+ cursor: pointer;
+ font-size: 90%;
+ color: #555;
+}
+
+.openerp .oe_button.oe_button_pager,
+.openerp .oe-list-pager > span,
+.openerp .oe_form_pager > span {
+ line-height: 17px;
+ height: 17px;
+ cursor: pointer;
+ color: gray;
+ font-weight: bold;
+ vertical-align: middle;
+}
+.openerp .oe_button.oe_button_pager,
+.openerp .oe_button.oe_button_pager:disabled {
+ padding: 0 3px 0 3px;
+ margin: 0;
+ height: 17px;
+}
+.openerp .oe-listview .oe-group-name {
+ padding-right: 1em;
+}
+.openerp .oe-listview .oe-group-name,
+.openerp .oe-listview .oe-group-pagination {
+ white-space: nowrap;
+}
+
+.openerp .oe-listview tfoot td {
+ padding: 3px 3px 0;
+}
+.openerp .oe-listview .oe-list-footer {
+ text-align: center;
+ white-space: nowrap;
+ color: #444;
+ font-size: 85%;
+}
+.openerp .oe-listview .oe-list-footer span {
+ margin: 0 1em;
+}
+.openerp .oe-listview .oe-list-footer progress {
+ vertical-align:-10% !important;
+ width: 100%;
+}
+
+/** list rounded corners
+
+ rounded corners are a pain on tables: need to round not only table, but
+ also on the first and last children of the first and last row
+ */
+.openerp .oe-listview table.oe-listview-content {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.openerp .oe-listview table.oe-listview-content thead tr:first-child th:first-child {
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ border-top-left-radius: 4px;
+}
+.openerp .oe-listview table.oe-listview-content thead tr:first-child th:last-child {
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ border-top-right-radius: 4px;
+}
+.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:first-child,
+.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:first-child,
+.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child th:first-child {
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ border-bottom-left-radius: 4px;
+}
+.openerp .oe-listview table.oe-listview-content tfoot tr:last-child th:last-child,
+.openerp .oe-listview table.oe-listview-content tfoot tr:last-child td:last-child,
+.openerp .oe-listview table.oe-listview-content tbody:last-child tr:last-child td:last-child {
+ -webkit-border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ border-bottom-right-radius: 4px;
+}
+
+/* Notebook */
+.openerp .oe_form_notebook {
+ padding: 0;
+ background: none;
+ border-width: 0;
+}
+.openerp .oe_form_notebook .ui-tabs-panel {
+ padding: 4px;
+ -moz-border-radius-topright: 4px;
+ -webkit-border-top-right-radius: 4px;
+ border-top-right-radius: 4px;
+}
+.openerp .oe_form_notebook ul.ui-tabs-nav {
+ padding-left: 0;
+ background: transparent;
+ border-width: 0;
+ border-radius: 0;
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ line-height: 0.8em;
+ font-size: 95%;
+ color: #555;
+}
+.openerp .oe_form_notebook ul.ui-tabs-nav li {
+ font-weight: bold;
+}
+.openerp .oe_form_notebook .ui-tabs-panel {
+ background: #f9f9f9;
+ border-width: 1px;
+}
+.openerp .oe_form_notebook .ui-tabs-selected {
+ background: #f9f9f9;
+}
+/* Unedit Form */
+.openerp .field_char,
+.openerp .field_date,
+.openerp .field_float,
+.openerp .field_selection,
+.openerp a.oe_form_uri {
+ vertical-align: middle;
+ padding-top: 3px;
+ font-size: 90%;
+ color: #222;
+}
+.openerp a.oe_form_uri {
+ color: #9A0404;
+ line-height: 12px;
+}
+
+
+
+/* Form */
+.openerp .oe_form_button_save_dirty {
+ display: none;
+}
+.openerp .oe_form_dirty > .oe_form_header > .oe_form_buttons > .oe_form_button_save {
+ color: white;
+ background: #dc5f59;
+ background: -moz-linear-gradient(#dc5f59, #b33630);
+ background: -webkit-gradient(linear, left top, left bottom, from(#dc5f59), to(#b33630));
+ background: -webkit-linear-gradient(#dc5f59, #b33630);
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ -box-shadow: none;
+ font-weight: bold;
+}
+.openerp .oe_form_frame_cell input[type="checkbox"] {
+ margin-top: 3px;
+ vertical-align: middle;
+}
+.openerp .oe_form_frame_cell .input[type="text"] {
+ padding-bottom: 1px;
+}
+
+.openerp table.oe_frame td {
+ color: #4c4c4c;
+}
+.openerp td.oe_form_frame_cell {
+ padding: 2px;
+ position: relative;
+}
+.openerp .oe_frame.oe_forms {
+ clear: both;
+}
+.openerp table.oe_frame {
+ color: #4c4c4c;
+}
+.openerp fieldset.oe_group_box {
+ border: 1px solid #AAAAAA;
+ moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ background: #F9F9F9;
+ padding: 4px;
+}
+.openerp fieldset.oe_group_box legend {
+ font-weight: bold;
+}
+.openerp td.oe_form_frame_cell {
+ padding: 2px;
+ position: relative;
+}
+.openerp td.oe_form_field_translatable,
+.openerp td.oe_form_field_many2one,
+.openerp td.oe_form_field_date,
+.openerp td.oe_form_field_datetime {
+ white-space: nowrap;
+}
+.openerp td.oe_form_field_boolean {
+ padding-top: 4px;
+}
+.openerp td.oe_form_frame_cell.oe_form_group {
+ padding: 0;
+}
+.openerp .required.error {
+ border: 1px solid #900;
+}
+.openerp .oe_form_buttons, .openerp .oe_list_buttons {
+ float: left;
+}
+.openerp .oe_form_pager, .openerp .oe_list_pager {
+ float: right;
+ font-size: 80%;
+ color: gray;
+ font-weight: bold;
+}
+
+.openerp .oe_form_pager {
+ margin-right: 3px;
+}
+
+
+.openerp label.oe_label_help, .openerp label.oe_label,
+.openerp .oe_form_paragraph,
+.openerp .oe_form_field_statusbar,
+.openerp .oe_forms input[type="text"],
+.openerp .oe_forms input[type="password"],
+.openerp .oe_forms input[type="file"],
+.openerp .oe_forms select,
+.openerp .oe_forms .oe_button,
+.openerp .oe_forms textarea {
+ font-size: 85%;
+}
+
+.openerp label.oe_label_help, .openerp label.oe_label {
+ display: block;
+ color: #4c4c4c;
+ font-weight: normal;
+}
+.openerp label.oe_label_help {
+ cursor: help;
+}
+.openerp .oe_form_frame_cell .oe_label, .openerp .oe_form_frame_cell .oe_label_help {
+ font-weight: normal;
+}
+.openerp #tiptip_content {
+ font-size: 12px;
+}
+.openerp .oe_tooltip_string {
+ color: #FD5;
+ font-weight: bold;
+ font-size: 13px;
+}
+.openerp .oe_tooltip_help {
+ white-space: pre-wrap;
+}
+.openerp .oe_tooltip_technical {
+ padding: 0 0 4px 0;
+ margin: 5px 0 0 15px;
+ list-style: circle;
+}
+.openerp .oe_tooltip_technical_title {
+ font-weight: bold;
+}
+
+.openerp .oe_forms label.oe_label, .openerp .oe_forms label.oe_label_help {
+ margin: 3px 0 0 3px;
+ white-space: nowrap;
+}
+.openerp .oe_forms .searchview_group_content label.oe_label, .openerp .searchview_group_content .oe_forms label.oe_label_help { /* making a distinction between labels in search view and other labels */
+ margin: 3px 0 0 3px;
+}
+
+.openerp label.oe_label_help span {
+ font-size: 80%;
+ color: darkgreen;
+ vertical-align:top;
+ position: relative;
+ top: -4px;
+ padding: 0 2px;
+}
+.openerp .oe_align_left {
+ text-align: left;
+}
+.openerp .oe_align_right {
+ text-align: right;
+}
+.openerp .oe_align_center {
+ text-align: center;
+}
+.openerp .oe_forms .oe_form_paragraph {
+ margin: 3px 0 0 0;
+ white-space: normal;
+}
+
+.openerp .oe_forms .oe_form_paragraph.oe_multilines {
+ white-space: pre;
+}
+
+.openerp .oe_form_field_one2many .oe-actions h3.oe_view_title,
+.openerp .oe_form_field_one2many_list .oe-actions h3.oe_view_title{
+ display: inline;
+ margin: 0 0.5em 0 0;
+}
+
+.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon,
+.openerp .oe_forms .oe-listview th.oe-sortable .ui-icon {
+ height: 100%;
+ margin-top: -9px;
+}
+
+.openerp table.oe_frame .oe-listview-content td {
+ color: inherit;
+}
+
+/* Uneditable Form View */
+.openerp .oe_form_readonly {
+
+}
+.openerp .oe_form_readonly .oe_form_frame_cell .field_text,
+.openerp .oe_form_readonly .field_char,
+.openerp .oe_form_readonly .field_int,
+.openerp .oe_form_readonly .field_float,
+.openerp .oe_form_readonly .field_email,
+.openerp .oe_form_readonly .field_date,
+.openerp .oe_form_readonly .field_selection,
+.openerp .oe_forms_readonly .oe_form_field_many2one {
+ padding: 3px 2px 2px 2px;
+ background-color: white;
+ height: 17px;
+}
+.openerp .oe_form_readonly .oe_form_frame_cell .field_text {
+ height: auto;
+}
+.openerp .oe_form_readonly .field_datetime {
+ padding: 1px 2px 2px 2px;
+ background-color: white;
+ height:19px;
+}
+.openerp .oe_form_readonly .oe_form_field_many2one div {
+ background-color:white;
+ height:18px;
+ margin-bottom:1px;
+ padding: 0px 2px 5px 2px;
+}
+
+.openerp .oe_form_readonly .oe_form_field_email div {
+ background-color: white;
+ padding: 1px 2px 3px 2px;
+}
+
+
+.openerp .oe_form_readonly .oe_form_field_text div.field_text,
+.openerp .oe_form_readonly .oe_form_field_text_html div.field_text_html {
+ white-space: pre-wrap;
+}
+.openerp .oe_form_readonly .oe_form_frame_cell .field_text {
+ min-height:100px;
+}
+/* Inputs */
+.openerp .oe_forms input[type="text"],
+.openerp .oe_forms input[type="password"],
+.openerp .oe_forms input[type="file"],
+.openerp .oe_forms select,
+.openerp .oe_forms textarea {
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 0 2px;
+ margin: 0 2px;
+ border: 1px solid #999;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ background: white;
+ min-width: 90px;
+ color: #1f1f1f;
+}
+
+.openerp .oe_forms input.field_many2one,
+.openerp .oe_forms input.field_binary,
+.openerp .oe_forms input.field_binary,
+.openerp .oe_forms input.field_email,
+.openerp .oe_forms input.field_url {
+ border-right: none;
+ -webkit-border-top-right-radius: 0px;
+ -webkit-border-bottom-right-radius: 0px;
+ -moz-border-radius-topright: 0px;
+ -moz-border-radius-bottomright: 0px;
+ border-top-right-radius: 0px;
+ border-bottom-right-radius: 0px;
+}
+.openerp .oe_button.oe_field_button {
+ -webkit-border-top-left-radius: 0px;
+ -webkit-border-bottom-left-radius: 0px;
+ -moz-border-radius-topleft: 0px;
+ -moz-border-radius-bottomleft: 0px;
+ border-top-left-radius: 0px;
+ border-bottom-left-radius: 0px;
+ margin-right:-1px;
+ height: 22px;
+}
+
+.openerp .oe_form_field_email button img,
+.openerp .oe_form_field_url button img {
+ vertical-align: top;
+}
+/* vertically recentering filter management select tag */
+.openerp select.oe_search-view-filters-management {
+ margin-top:2px;
+}
+
+.openerp .oe_forms select{
+ padding-top: 2px;
+}
+.openerp .oe_forms input[readonly],
+.openerp .oe_forms select[readonly],
+.openerp .oe_forms textarea[readonly],
+.openerp .oe_forms input[disabled],
+.openerp .oe_forms select[disabled],
+.openerp .oe_forms textarea[disabled]{
+ background: #E5E5E5 !important;
+ color: #666;
+}
+.openerp .oe_forms textarea {
+ resize:vertical;
+}
+.openerp .oe_forms input[type="text"],
+.openerp .oe_forms input[type="password"],
+.openerp .oe_forms input[type="file"],
+.openerp .oe_forms select,
+.openerp .oe_forms .oe_button {
+ height: 22px;
+}
+
+.openerp .oe_forms input.field_datetime {
+ min-width: 11em;
+}
+.openerp .oe_forms .oe_form_button .oe_button {
+ color: #4c4c4c;
+ white-space: nowrap;
+ min-width: 100%;
+ width: 100%;
+}
+@-moz-document url-prefix() {
+ /* Strange firefox behaviour on width: 100% + white-space: nowrap */
+ .openerp .oe_forms .oe_form_button .oe_button {
+ width: auto;
+ }
+}
+/* IE Hack - for IE < 9
+ * Avoids buttons overflow
+ * */
+.openerp .oe_forms .oe_form_button .oe_button {
+ min-width: auto\9;
+}
+.openerp .oe_forms .button {
+ height: 22px;
+}
+.openerp .oe_forms .oe_button span {
+ position: relative;
+ vertical-align: top;
+}
+.openerp .oe_input_icon {
+ cursor: pointer;
+ margin: 3px 0 0 -21px;
+ vertical-align: top;
+}
+.openerp .oe_datepicker_container {
+ display: none;
+}
+.openerp .oe_datepicker_root {
+ display: inline-block;
+}
+.openerp .oe_form_frame_cell .oe_datepicker_root {
+ width: 100%;
+}
+.openerp .oe_input_icon_disabled {
+ position: absolute;
+ cursor: default;
+ opacity: 0.5;
+ filter:alpha(opacity=50);
+ right: 5px;
+ top: 3px;
+}
+.openerp .oe_trad_field.touched {
+ border: 1px solid green !important;
+}
+
+/* http://www.quirksmode.org/dom/inputfile.html
+ * http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
+ */
+.openerp .oe-binary-file-set {
+ overflow: hidden;
+ position: relative;
+}
+.openerp input.oe-binary-file {
+ z-index: 0;
+ line-height: 0;
+ font-size: 12px;
+ position: absolute;
+ /* Should be adjusted for all browsers */
+ top: 1px;
+ right: 10px;
+ opacity: 0;
+ filter: alpha(opacity = 0);
+ -ms-filter: "alpha(opacity=0)";
+ margin: 0;
+ padding:0;
+}
+
+/* Widgets */
+.openerp .separator {
+ border: 0 solid #666;
+}
+.openerp .separator.horizontal {
+ font-weight: bold;
+ border-bottom-width: 1px;
+ margin: 3px 4px 3px 1px;
+ height: 17px;
+ font-size: 95%;
+}
+.openerp .separator.horizontal:empty {
+ height: 5px;
+}
+.openerp .oe_form_frame_cell.oe_form_separator_vertical {
+ border-left: 1px solid #666;
+}
+.openerp td.required input, .openerp td.required select {
+ background-color: #D2D2FF !important;
+}
+.openerp td.invalid input, .openerp td.invalid select, .openerp td.invalid textarea {
+ background-color: #F66 !important;
+ border: 1px solid #D00 !important;
+}
+.openerp div.oe-progressbar span {
+ position: absolute;
+ margin-left: 10px;
+ margin-top: 5px;
+ font-weight: bold;
+}
+
+/* jQuery UI override */
+.openerp .ui-widget {
+ font-size: 1em;
+}
+.openerp .oe_form_field_progressbar .ui-progressbar {
+ height: 22px;
+ font-size: 10px;
+ -moz-box-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -ms-box-sizing: border-box;
+ box-sizing: border-box;
+ border: 1px solid #999;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ background: white;
+ min-width: 90px;
+}
+.openerp tbody.ui-widget-content {
+ margin-bottom: 10px;
+ border-spacing: 4px;
+}
+.openerp .ui-widget-header {
+ background: white none;
+}
+/* progress bars */
+.openerp .ui-progressbar .ui-widget-header {
+ background: #cccccc url(/web/static/lib/jquery.ui/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;
+}
+
+/* Sidebar */
+.openerp .view-manager-main-table {
+ margin: 0;
+ width:100%;
+ border-collapse:collapse;
+ height:100%;
+}
+
+.openerp .view-manager-main-table tbody {
+ vertical-align: top;
+}
+
+.openerp .oe-view-manager-header {
+ overflow: auto;
+ background: url("/web/static/src/img/sep-a.gif") 0 100% repeat-x;
+ margin:6px 0 6px 2px;
+}
+.openerp .oe_form_frame_cell .oe-view-manager-header { /* Trick: remove the background when element is in a formular */
+ background: none;
+}
+
+.openerp .oe-view-manager-header h2 {
+ float: left;
+}
+
+.openerp .oe_view_manager_menu_tips blockquote {
+ display: none;
+ font-size: 85%;
+ margin: 0;
+ background: #fff;
+ border-bottom: 1px solid #CECBCB;
+ padding: 1px 10px;
+ color: #4C4C4C;
+}
+.openerp .oe_view_manager_menu_tips blockquote p {
+ margin: 0;
+ padding: 6px 1px 4px;
+}
+
+.openerp .oe_view_manager_menu_tips blockquote div {
+ text-align: right;
+ margin-right:10px;
+}
+
+.openerp .oe_view_manager_menu_tips blockquote div button {
+ border: none;
+ background: none;
+ padding: 0 4px;
+ margin: 0;
+ display: inline;
+ text-decoration: underline;
+ color: inherit;
+}
+.openerp .oe-view-manager-logs {
+ clear: both;
+ background: #fff;
+ margin: 0.25em 0;
+ font-size: 85%;
+ color: #4C4C4C;
+ position: relative;
+ overflow: hidden;
+}
+.openerp .oe-view-manager-logs ul {
+ margin: 0;
+ padding: 0 10px;
+ list-style: none;
+}
+.openerp .oe-view-manager-logs li:before {
+ content: '\2192 ';
+}
+.openerp .oe-view-manager-logs a {
+ text-decoration: none;
+ color: inherit;
+}
+/* only display first three log items of a folded logs list */
+.openerp .oe-view-manager-logs.oe-folded li:nth-child(n+4) {
+ display: none;
+}
+/* display link to more logs if there are more logs to view and the logview is
+ currently folded */
+.openerp .oe-view-manager-logs a.oe-more-logs {
+ display: none;
+}
+.openerp .oe-view-manager-logs.oe-folded.oe-has-more a.oe-more-logs {
+ display: block;
+}
+.openerp .oe-view-manager-logs a.oe-remove-everything {
+ position: absolute;
+ top: 0;
+ right: 0;
+ cursor: pointer;
+}
+
+.openerp .view-manager-main-sidebar {
+ width: 180px;
+ padding: 0;
+ margin: 0;
+}
+
+.openerp .sidebar-main-div {
+ height: 100%;
+ border-left: 1px solid #D2CFCF;
+}
+
+.openerp .sidebar-content {
+ padding: 0;
+ margin: 0;
+ width: 180px;
+ height: 100%;
+ font-size: 0.9em;
+}
+
+.openerp .closed-sidebar .sidebar-content {
+ width: 22px;
+}
+
+.openerp .closed-sidebar .sidebar-content {
+ display: none;
+}
+
+.openerp .sidebar-main-div a {
+ color: #555;
+ text-decoration: none;
+}
+
+.openerp .sidebar-main-div a:hover {
+ color: black;
+}
+
+.openerp .oe-sidebar-attachments-toolbar {
+ margin: 4px 0 0 4px;
+}
+.openerp .oe-sidebar-attachments-items {
+ clear: both;
+ padding-top: 5px !important;
+}
+.openerp .oe-sidebar-attachments-items li {
+ position: relative;
+ padding: 0 0 3px 10px !important;
+}
+.openerp .oe-sidebar-attachments-items li:hover {
+ background: #ddd;
+}
+.openerp .oe-sidebar-attachments-link {
+ display: block;
+ margin-right: 15px;
+ overflow: hidden;
+}
+.openerp .oe-sidebar-attachment-delete {
+ position: absolute;
+ right: 2px;
+ top: 1px;
+ overflow: hidden;
+ width: 15px;
+ height: 15px;
+ padding: 1px;
+ border-radius: 7px;
+ -moz-border-radius: 7px;
+ -webkit-border-radius: 7px;
+}
+.openerp .oe-sidebar-attachment-delete:hover {
+ background-color: white;
+}
+
+.openerp .view-manager-main-sidebar h2 {
+ margin:0;
+ font-size: 1.15em;
+ color: #8E8E8E;
+ text-shadow: white 0 1px 0;
+ padding-left: 10px;
+ padding-right: 21px;
+ height: 21px;
+
+ background: #ffffff; /* Old browsers */
+ background: -moz-linear-gradient(top, #ffffff 0%, #ebe9e9 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ebe9e9)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* Opera11.10+ */
+ background: -ms-linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* IE10+ */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FFFFFF', endColorstr='#EBE9E9',GradientType=0 ); /* IE6-9 */
+ background: linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* W3C */
+
+ border: 1px solid #D2CFCF;
+ border-right-width: 0;
+ border-left-width: 0;
+}
+.openerp .view-manager-main-sidebar h2 {
+ border-top-width: 0;
+}
+
+.openerp .view-manager-main-sidebar ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ display: block;
+}
+
+.openerp .view-manager-main-sidebar li {
+ display: block;
+ padding: 3px 3px 3px 10px;
+}
+
+.openerp .toggle-sidebar {
+ cursor: pointer;
+ border: 1px solid #D2CFCF;
+ border-top-width: 0;
+ display: block;
+ background: url(/web/static/src/img/toggle-a-bg.png);
+ width: 21px;
+ height: 21px;
+ z-index: 10;
+}
+.openerp .open-sidebar .toggle-sidebar {
+ margin-left: 158px;
+ background-position: 21px 0;
+ position: absolute;
+}
+.openerp .closed-sidebar .toggle-sidebar {
+ border-left: none;
+}
+.openerp li.oe_sidebar_print {
+ padding-left: 20px;
+ background: 1px 3px url(/web/static/src/img/icons/gtk-print.png) no-repeat;
+}
+
+.openerp .oe_sidebar_print ul {
+ padding-left:8px;
+}
+
+.openerp.kitten-mode-activated .main_table {
+ background: url(http://placekitten.com/g/1500/800) repeat;
+}
+.openerp.kitten-mode-activated.clark-gable .main_table {
+ background: url(http://amigrave.com/ClarkGable.jpg);
+ background-size: 100%;
+}
+
+.openerp.kitten-mode-activated .header {
+ background: url(http://placekitten.com/g/211/65) repeat;
+}
+
+.openerp.kitten-mode-activated .menu {
+ background: #828282;
+ background: -moz-linear-gradient(top, #828282 0%, #4D4D4D 100%);
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828282), color-stop(100%,#4D4D4D));
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828282', endColorstr='#4D4D4D',GradientType=0 );
+}
+.openerp.kitten-mode-activated .menu a {
+ background: none;
+}
+.openerp.kitten-mode-activated .menu span {
+ background: none;
+}
+.openerp.kitten-mode-activated .sidebar-content li a,
+.openerp.kitten-mode-activated .oe-application .view-manager-main-content h2.oe_view_title,
+.openerp.kitten-mode-activated .oe-application .view-manager-main-content a.searchview_group_string,
+.openerp.kitten-mode-activated .oe-application .view-manager-main-content label {
+ color: white;
+}
+.openerp.kitten-mode-activated .menu,
+.openerp.kitten-mode-activated .header_corner,
+.openerp.kitten-mode-activated .header_title,
+.openerp.kitten-mode-activated .oe-application,
+.openerp.kitten-mode-activated .oe_footer,
+.openerp.kitten-mode-activated .loading,
+.openerp.kitten-mode-activated .ui-dialog {
+ opacity:0.8;
+ filter:alpha(opacity=80);
+}
+.openerp.kitten-mode-activated .header .company_logo {
+ background: url(http://placekitten.com/g/180/46);
+}
+.openerp.kitten-mode-activated .loading {
+ background: #828282;
+ border-color: #828282;
+}
+
+.openerp .oe-m2o-drop-down-button {
+ margin-left: -24px;
+}
+.openerp .oe-m2o-drop-down-button img {
+ margin-bottom: -4px;
+ cursor: pointer;
+}
+.openerp .oe-m2o input {
+ border-right: none;
+ margin-right: 0px !important;
+ padding-bottom: 2px !important;
+}
+.openerp .oe-m2o-disabled-cm {
+ color: grey;
+}
+.openerp ul[role="listbox"] li a {
+ font-size:80%;
+}
+.parent_top {
+ vertical-align: text-top;
+}
+
+.openerp .oe-dialog-warning p {
+ padding-left: 1em;
+ font-size: 1.2em;
+ font-weight: bold;
+}
+
+.openerp .dhx_mini_calendar {
+ -moz-box-shadow: none;
+ -khtml-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .oe-treeview-table {
+ width: 100%;
+ background-color : #FFFFFF;
+ border-spacing: 0;
+
+}
+.openerp .oe-treeview-table tr:hover{
+ color: blue;
+ background-color : #D8D8D8;
+}
+.treeview-tr, .treeview-td {
+ cursor: pointer;
+ vertical-align: top;
+ text-align: left;
+ border-bottom: 1px solid #CFCCCC;
+}
+.openerp .oe-treeview-table .oe-number {
+ text-align: right !important;
+}
+.treeview-tr span, .treeview-td span {
+ font-size: 90%;
+ font-weight: normal;
+ white-space: nowrap;
+ display: block;
+ }
+.treeview-tr.oe-treeview-first {
+ background: transparent url(/web/static/src/img/expand.gif) 0 50% no-repeat;
+}
+.oe-open .treeview-tr.oe-treeview-first {
+ background-image: url(/web/static/src/img/collapse.gif);
+}
+.treeview-tr.oe-treeview-first span,
+.treeview-td.oe-treeview-first span {
+ margin-left: 16px;
+}
+
+.treeview-header {
+ vertical-align: top;
+ background-color : #D8D8D8;
+ white-space: nowrap;
+ text-align: left;
+ padding: 4px 5px;
+}
+/* Shortcuts*/
+.oe-shortcut-toggle {
+ height: 20px;
+ margin-top: 3px;
+ padding: 0;
+ width: 24px;
+ cursor: pointer;
+ display: block;
+ background: url(/web/static/src/img/add-shortcut.png) no-repeat center center;
+ float: left;
+}
+.oe-shortcut-remove{
+ background: url(/web/static/src/img/remove-shortcut.png) no-repeat center center;
+}
+.oe-shortcuts {
+ position: absolute;
+ margin: 0;
+ padding: 6px 15px;
+ top: 37px;
+ left: 197px;
+ right: 0;
+ height: 17px;
+ line-height: 1.2;
+}
+.oe-shortcuts ul {
+ display: block;
+ overflow: hidden;
+ list-style: none;
+ white-space: nowrap;
+ padding: 0;
+ margin: 0;
+}
+.oe-shortcuts li {
+ cursor: pointer;
+ display: -moz-inline-stack;
+ display: inline-block;
+ display: inline; /*IE7 */
+ color: #fff;
+ text-align: center;
+ border-left: 1px solid #909090;
+ padding: 0 4px;
+ font-size: 80%;
+ font-weight: normal;
+ vertical-align: top;
+}
+
+.oe-shortcuts li:hover {
+ background-color: #666;
+}
+.oe-shortcuts li:first-child {
+ border-left: none;
+ padding-left: 0;
+}
+
+ul.oe-arrow-list {
+ padding-left: 1.1em;
+ margin: 0;
+ white-space: nowrap;
+}
+ul.oe-arrow-list li {
+ display: inline-block;
+ margin-left: -1em;
+}
+ul.oe-arrow-list li span {
+ vertical-align: top;
+ display: inline-block;
+ border: 1em solid #DEDEDE;
+ line-height:0em;
+}
+ul.oe-arrow-list .oe-arrow-list-before {
+ border-left-color: rgba(0,0,0,0);
+ border-right-width:0;
+}
+ul.oe-arrow-list .oe-arrow-list-after {
+ border-color: rgba(0,0,0,0);
+ border-left-color: #DEDEDE;
+ border-right-width:0;
+}
+ul.oe-arrow-list li.oe-arrow-list-selected span {
+ border-color: #B5B9FF;
+}
+ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-before {
+ border-left-color: rgba(0,0,0,0);
+}
+ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
+ border-color: rgba(0,0,0,0);
+ border-left-color: #B5B9FF;
+}
+.openerp ul.oe-arrow-list li:first-child span:first-child{
+ -webkit-border-top-left-radius: 3px;
+ -moz-border-radius-topleft: 3px;
+ border-top-left-radius: 3px;
+ -webkit-border-bottom-left-radius: 3px;
+ -moz-border-radius-bottomleft: 3px;
+ border-bottom-left-radius: 3px;
+}
+.openerp ul.oe-arrow-list li:last-child span:last-child{
+ -webkit-border-top-right-radius: 3px;
+ -moz-border-radius-topright: 3px;
+ border-top-right-radius: 3px;
+ -webkit-border-bottom-right-radius: 3px;
+ -moz-border-radius-bottomright: 3px;
+ border-bottom-right-radius: 3px;
+}
+.openerp .oe_view_editor {
+ width:100%;
+ border-collapse : collapse;
+ margin-left: -12px;
+
+ width: 100%;
+ background-color : white;
+ border-spacing: 0;
+}
+.openerp .oe_view_editor td{
+ text-align: center;
+ white-space: nowrap;
+ border: 1px solid #D8D8D8;
+
+ cursor: pointer;
+ font-size: 90%;
+}
+.openerp .oe_view_editor_field td{
+ border: 0px !important;
+}
+
+.openerp .oe_view_editor tr:hover {
+ background-color: #ecebf2;
+}
+
+
+/* Dialog traceback cases */
+.openerp .oe_error_detail{
+ display: block;
+}
+.openerp .oe_error_send{
+ display:block;
+}
+.openerp .oe_fielddiv{
+ display:inline-block;
+ width:100%;
+}
+.openerp .oe_fielddiv input[type=text],textarea{
+ width:100%;
+}
+/* for Alignment center */
+.openerp .oe_centeralign{
+ text-align:center;
+}
+
+.openerp .oe_applications_tiles {
+ color: #4C4C4C;
+ text-shadow: #EEE 0 1px 0;
+ margin: 0 20px;
+}
+
+.openerp .oe_vm_switch {
+ margin:2px 0 0 0;
+}
+
+.openerp .oe_vm_switch_form,
+.openerp .oe_vm_switch_page,
+.openerp .oe_vm_switch_tree,
+.openerp .oe_vm_switch_list,
+.openerp .oe_vm_switch_graph,
+.openerp .oe_vm_switch_gantt,
+.openerp .oe_vm_switch_calendar,
+.openerp .oe_vm_switch_kanban,
+.openerp .oe_vm_switch_diagram {
+ background: url("/web/static/src/img/views-icons-a.png") repeat-x scroll left top transparent;
+ overflow: hidden;
+ width: 22px;
+ height: 21px;
+ border: none;
+ background-position: 0px 0px;
+}
+
+.openerp .oe_vm_switch_form span,
+.openerp .oe_vm_switch_page span,
+.openerp .oe_vm_switch_tree span,
+.openerp .oe_vm_switch_list span,
+.openerp .oe_vm_switch_graph span,
+.openerp .oe_vm_switch_gantt span,
+.openerp .oe_vm_switch_calendar span,
+.openerp .oe_vm_switch_kanban span,
+.openerp .oe_vm_switch_diagram span {
+ display: none;
+}
+
+.openerp .oe_vm_switch_list {
+ background-position: 0px 0px;
+}
+.openerp .oe_vm_switch_list:active,
+.openerp .oe_vm_switch_list:hover,
+.openerp .oe_vm_switch_list:focus,
+.openerp .oe_vm_switch_list[disabled="disabled"] {
+ background-position: 0px -21px;
+}
+
+.openerp .oe_vm_switch_tree {
+ background-position: 0px 0px;
+}
+.openerp .oe_vm_switch_tree:active,
+.openerp .oe_vm_switch_tree:hover,
+.openerp .oe_vm_switch_tree:focus,
+.openerp .oe_vm_switch_tree[disabled="disabled"] {
+ background-position: 0px -21px;
+}
+
+.openerp .oe_vm_switch_form {
+ background-position: -22px 0px;
+}
+.openerp .oe_vm_switch_form:active,
+.openerp .oe_vm_switch_form:hover,
+.openerp .oe_vm_switch_form:focus,
+.openerp .oe_vm_switch_form[disabled="disabled"] {
+ background-position: -22px -21px;
+}
+
+.openerp .oe_vm_switch_page {
+ background-position: -22px 0px;
+}
+.openerp .oe_vm_switch_page:active,
+.openerp .oe_vm_switch_page:hover,
+.openerp .oe_vm_switch_page:focus,
+.openerp .oe_vm_switch_page[disabled="disabled"] {
+ background-position: -22px -21px;
+}
+.openerp .oe_vm_switch_graph {
+ background-position: -44px 0px;
+}
+.openerp .oe_vm_switch_graph:active,
+.openerp .oe_vm_switch_graph:hover,
+.openerp .oe_vm_switch_graph:focus,
+.openerp .oe_vm_switch_graph[disabled="disabled"] {
+ background-position: -44px -21px;
+}
+
+.openerp .oe_vm_switch_gantt {
+ background-position: -66px 0px;
+}
+.openerp .oe_vm_switch_gantt:active,
+.openerp .oe_vm_switch_gantt:hover,
+.openerp .oe_vm_switch_gantt:focus,
+.openerp .oe_vm_switch_gantt[disabled="disabled"] {
+ background-position: -66px -21px;
+}
+
+.openerp .oe_vm_switch_calendar {
+ background-position: -88px 0px;
+}
+.openerp .oe_vm_switch_calendar:active,
+.openerp .oe_vm_switch_calendar:hover,
+.openerp .oe_vm_switch_calendar:focus,
+.openerp .oe_vm_switch_calendar[disabled="disabled"] {
+ background-position: -88px -21px;
+}
+.openerp .oe_vm_switch_kanban {
+ background-position: -110px 0px;
+}
+.openerp .oe_vm_switch_kanban:active,
+.openerp .oe_vm_switch_kanban:hover,
+.openerp .oe_vm_switch_kanban:focus,
+.openerp .oe_vm_switch_kanban[disabled="disabled"] {
+ background-position: -110px -21px;
+}
+
+.openerp .oe_vm_switch_diagram {
+ background-position: 0px 0px;
+}
+.openerp .oe_vm_switch_diagram:active,
+.openerp .oe_vm_switch_diagram:hover,
+.openerp .oe_vm_switch_diagram:focus,
+.openerp .oe_vm_switch_diagram[disabled="disabled"] {
+ background-position: 0px -21px;
+}
+
+/* Buttons */
+.openerp .oe_button:link,
+.openerp .oe_button:visited,
+.openerp .oe_button {
+ display: inline-block;
+ border: 1px solid #ababab;
+ color: #404040;
+ font-size: 12px;
+ padding: 3px 10px;
+ text-align: center;
+ -o-background-size: 100% 100%;
+ -moz-background-size: 100% 100%;
+ -webkit-background-size: auto auto !important;
+ background-size: 100% 100%;
+ background: #d8d8d8 none;
+ background: none, -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
+ background: none, -webkit-linear-gradient(#efefef, #d8d8d8);
+ background: none, -moz-linear-gradient(#efefef, #d8d8d8);
+ background: none, -o-linear-gradient(top, #efefef, #d8d8d8);
+ background: none, -khtml-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
+ background: -ms-linear-gradient(top, #efefef, #d8d8d8);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#efefef', endColorstr='#d8d8d8',GradientType=0 );
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ -o-border-radius: 3px;
+ -ms-border-radius: 3px;
+ border-radius: 3px;
+ -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ -o-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
+ -webkit-font-smoothing: antialiased;
+ outline: none;
+}
+
+.openerp .oe_button:hover {
+ -o-background-size: 100% 100%;
+ -moz-background-size: 100% 100%;
+ -webkit-background-size: auto auto !important;
+ background-size: 100% 100%;
+ background: #e3e3e3 none;
+ background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
+ background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3);
+ background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3);
+ background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
+ background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 );
+ cursor: pointer;
+}
+
+.openerp .oe_button:focus {
+ border: 1px solid #80bfff;
+ -o-background-size: 100% 100%;
+ -moz-background-size: 100% 100%;
+ -webkit-background-size: auto auto !important;
+ background-size: 100% 100%;
+ background: #e3e3e3, none;
+ background: none, -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
+ background: none, -webkit-linear-gradient(#f6f6f6, #e3e3e3);
+ background: none, -moz-linear-gradient(#f6f6f6, #e3e3e3);
+ background: none, -o-linear-gradient(top, #f6f6f6, #e3e3e3);
+ background: none, -khtml-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
+ background: -ms-linear-gradient(top, #f6f6f6, #e3e3e3);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f6f6f6', endColorstr='#e3e3e3',GradientType=0 );
+ -moz-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ -webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ -o-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+ box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
+}
+
+.openerp .oe_button:active,
+.openerp .oe_button.active {
+ background: #e3e3e3;
+ background: -moz-linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f;
+ background: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6)) #1b468f;
+ background: linear-gradient(top, #e3e3e3, #f6f6f6) #1b468f;
+ background: -ms-linear-gradient(top, #e3e3e3, #f6f6f6);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e3e3e3', endColorstr='#f6f6f6',GradientType=0 );
+ -moz-box-shadow: none, 0 0 0 transparent;
+ -webkit-box-shadow: none, 0 0 0 transparent;
+ -o-box-shadow: none, 0 0 0 transparent;
+ box-shadow: none, 0 0 0 transparent;
+}
+
+.openerp .oe_button.disabled,
+.openerp .oe_button:disabled {
+ background: #efefef !important;
+ border: 1px solid #d1d1d1 !important;
+ font-size: 12px;
+ padding: 3px 10px;
+ -moz-box-shadow: none !important, 0 0 0 transparent;
+ -webkit-box-shadow: none !important, 0 0 0 transparent;
+ -o-box-shadow: none !important, 0 0 0 transparent;
+ box-shadow: none !important, 0 0 0 transparent;
+ color: #aaaaaa !important;
+ cursor: default;
+ text-shadow: 0 1px 1px white !important;
+}
+
+.openerp select.oe_search-view-filters-management {
+ font-style: oblique;
+ color: #999999;
+}
+
+.openerp .oe_search-view-filters-management option,
+.openerp .oe_search-view-filters-management optgroup {
+ font-style: normal;
+ color: black;
+}
+
+/* Debug stuff */
+.openerp .oe_debug_view_log {
+ font-size: 95%;
+}
+.openerp .oe_debug_view_log label {
+ display: block;
+ width: 49%;
+ text-align: right;
+ float: left;
+ font-weight: bold;
+ color: #009;
+}
+.openerp .oe_debug_view_log span {
+ display: block;
+ width: 49%;
+ float: right;
+ color: #333;
+}
+
+/* Internet Explorer Fix */
+a img {
+ border: none;
+}
diff --git a/addons/web/static/src/css/full.css b/addons/web/static/src/css/full.css
new file mode 100644
index 00000000000..7f3a2f60ea4
--- /dev/null
+++ b/addons/web/static/src/css/full.css
@@ -0,0 +1,6 @@
+body {
+ padding: 0;
+ margin: 0;
+ overflow-y: scroll;
+ height: 100%;
+} \ No newline at end of file
diff --git a/addons/web/static/src/img/header-about.png b/addons/web/static/src/img/header-about.png
deleted file mode 100644
index b53e9a86ebe..00000000000
--- a/addons/web/static/src/img/header-about.png
+++ /dev/null
Binary files differ
diff --git a/addons/web/static/src/img/header-background.png b/addons/web/static/src/img/header-background.png
deleted file mode 100644
index 774b3954124..00000000000
--- a/addons/web/static/src/img/header-background.png
+++ /dev/null
Binary files differ
diff --git a/addons/web/static/src/img/header-help.png b/addons/web/static/src/img/header-help.png
deleted file mode 100644
index 19e9906fdef..00000000000
--- a/addons/web/static/src/img/header-help.png
+++ /dev/null
Binary files differ
diff --git a/addons/web/static/src/img/header-home.png b/addons/web/static/src/img/header-home.png
deleted file mode 100644
index fd96742d15a..00000000000
--- a/addons/web/static/src/img/header-home.png
+++ /dev/null
Binary files differ
diff --git a/addons/web/static/src/img/header-preferences.png b/addons/web/static/src/img/header-preferences.png
deleted file mode 100644
index 6c978b49f55..00000000000
--- a/addons/web/static/src/img/header-preferences.png
+++ /dev/null
Binary files differ
diff --git a/addons/web/static/src/img/header-requests.png b/addons/web/static/src/img/header-requests.png
deleted file mode 100644
index 6577e7e6448..00000000000
--- a/addons/web/static/src/img/header-requests.png
+++ /dev/null
Binary files differ
diff --git a/addons/web/static/src/img/topbar-avatar.png b/addons/web/static/src/img/topbar-avatar.png
new file mode 100644
index 00000000000..a2c70ea7d49
--- /dev/null
+++ b/addons/web/static/src/img/topbar-avatar.png
Binary files differ
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index ba31ec81846..f8af815d187 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -45,6 +45,12 @@ openerp.web.Notification = openerp.web.OldWidget.extend(/** @lends openerp.web.
});
+openerp.web.dialog = function(element) {
+ var result = element.dialog.apply(element, _.rest(_.toArray(arguments)));
+ result.dialog("widget").addClass("openerp");
+ return result;
+}
+
openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog# */{
dialog_title: "",
/**
@@ -86,7 +92,7 @@ openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog#
if (this.dialog_options.autoOpen) {
this.open();
} else {
- this.$element.dialog(this.get_options());
+ openerp.web.dialog(this.$element, this.get_options());
}
},
get_options: function(options) {
@@ -125,7 +131,7 @@ openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog#
this.$element.html(this.render());
}
var o = this.get_options(options);
- this.$element.dialog(o).dialog('open');
+ openerp.web.dialog(this.$element, o).dialog('open');
if (o.height === 'auto' && o.max_height) {
this.$element.css({ 'max-height': o.max_height, 'overflow-y': 'auto' });
}
@@ -142,7 +148,7 @@ openerp.web.Dialog = openerp.web.OldWidget.extend(/** @lends openerp.web.Dialog#
on_resized: function() {
//openerp.log("Dialog resized to %d x %d", this.$element.width(), this.$element.height());
},
- stop: function () {
+ destroy: function () {
// Destroy widget
this.close();
this.$element.dialog('destroy');
@@ -166,7 +172,7 @@ openerp.web.CrashManager = openerp.web.CallbackEnabled.extend({
}
},
on_managed_error: function(error) {
- $('<div>' + QWeb.render('CrashManagerWarning', {error: error}) + '</div>').dialog({
+ openerp.web.dialog($('<div>' + QWeb.render('CrashManagerWarning', {error: error}) + '</div>'), {
title: "OpenERP " + _.str.capitalize(error.type),
buttons: [
{text: _t("Ok"), click: function() { $(this).dialog("close"); }}
@@ -234,7 +240,7 @@ openerp.web.Loading = openerp.web.OldWidget.extend(/** @lends openerp.web.Loadin
this.session.on_rpc_request.add_first(this.request_call);
this.session.on_rpc_response.add_last(this.response_call);
},
- stop: function() {
+ destroy: function() {
this.session.on_rpc_request.remove(this.request_call);
this.session.on_rpc_response.remove(this.response_call);
this.on_rpc_event(-this.count);
@@ -255,7 +261,7 @@ openerp.web.Loading = openerp.web.OldWidget.extend(/** @lends openerp.web.Loadin
$(".loading",this.$element).text(_.str.sprintf(
_t("Loading (%d)"), this.count));
$(".loading",this.$element).show();
- this.widget_parent.$element.addClass('loading');
+ this.getParent().$element.addClass('loading');
} else {
this.count = 0;
clearTimeout(this.long_running_timer);
@@ -265,7 +271,7 @@ openerp.web.Loading = openerp.web.OldWidget.extend(/** @lends openerp.web.Loadin
$.unblockUI();
}
$(".loading",this.$element).fadeOut();
- this.widget_parent.$element.removeClass('loading');
+ this.getParent().$element.removeClass('loading');
}
}
});
@@ -312,7 +318,7 @@ openerp.web.Database = openerp.web.OldWidget.extend(/** @lends openerp.web.Datab
self.hide();
});
},
- stop: function () {
+ destroy: function () {
this.hide();
this.$option_id.empty();
@@ -345,44 +351,6 @@ openerp.web.Database = openerp.web.OldWidget.extend(/** @lends openerp.web.Datab
return result;
},
/**
- * Waits until the new database is done creating, then unblocks the UI and
- * logs the user in as admin
- *
- * @param {Number} db_creation_id identifier for the db-creation operation, used to fetch the current installation progress
- * @param {Object} info info fields for this database creation
- * @param {String} info.db name of the database being created
- * @param {String} info.password super-admin password for the database
- */
- wait_for_newdb: function (db_creation_id, info) {
- var self = this;
- self.rpc('/web/database/progress', {
- id: db_creation_id,
- password: info.password
- }, function (result) {
- var progress = result[0];
- // I'd display a progress bar, but turns out the progress status
- // the server report kind-of blows goats: it's at 0 for ~75% of
- // the installation, then jumps to 75%, then jumps down to either
- // 0 or ~40%, then back up to 75%, then terminates. Let's keep that
- // mess hidden behind a not-very-useful but not overly weird
- // message instead.
- if (progress < 1) {
- setTimeout(function () {
- self.wait_for_newdb(db_creation_id, info);
- }, 500);
- return;
- }
-
- var admin = result[1][0];
- setTimeout(function () {
- self.widget_parent.do_login(
- info.db, admin.login, admin.password);
- self.stop();
- self.unblockUI();
- });
- });
- },
- /**
* Blocks UI and replaces $.unblockUI by a noop to prevent third parties
* from unblocking the UI
*/
@@ -407,7 +375,7 @@ openerp.web.Database = openerp.web.OldWidget.extend(/** @lends openerp.web.Datab
* @param {String} error.error message of the error dialog
*/
display_error: function (error) {
- return $('<div>').dialog({
+ return openerp.web.dialog($('<div>'), {
modal: true,
title: error.title,
buttons: [
@@ -421,23 +389,19 @@ openerp.web.Database = openerp.web.OldWidget.extend(/** @lends openerp.web.Datab
self.$option_id.find("form[name=create_db_form]").validate({
submitHandler: function (form) {
var fields = $(form).serializeArray();
- self.blockUI();
self.rpc("/web/database/create", {'fields': fields}, function(result) {
- if (result.error) {
- self.unblockUI();
- self.display_error(result);
- return;
- }
if (self.db_list) {
self.db_list.push(self.to_object(fields)['db_name']);
self.db_list.sort();
self.widget_parent.set_db_list(self.db_list);
}
+
var form_obj = self.to_object(fields);
- self.wait_for_newdb(result, {
- password: form_obj['super_admin_pwd'],
- db: form_obj['db_name']
- });
+ self.getParent().do_login(
+ form_obj['db_name'],
+ 'admin',
+ form_obj['create_admin_pwd']);
+ self.destroy();
});
}
});
@@ -449,7 +413,7 @@ openerp.web.Database = openerp.web.OldWidget.extend(/** @lends openerp.web.Datab
submitHandler: function (form) {
var $form = $(form),
fields = $form.serializeArray(),
- $db_list = $form.find('select[name=drop_db]'),
+ $db_list = $form.find('[name=drop_db]'),
db = $db_list.val();
if (!confirm("Do you really want to delete the database: " + db + " ?")) {
@@ -463,7 +427,7 @@ openerp.web.Database = openerp.web.OldWidget.extend(/** @lends openerp.web.Datab
$db_list.find(':selected').remove();
if (self.db_list) {
self.db_list.splice(_.indexOf(self.db_list, db, true), 1);
- self.widget_parent.set_db_list(self.db_list);
+ self.getParent().set_db_list(self.db_list);
}
self.do_notify("Dropping database", "The database '" + db + "' has been dropped");
});
@@ -660,58 +624,212 @@ openerp.web.Login = openerp.web.OldWidget.extend(/** @lends openerp.web.Login#
}
});
-openerp.web.Header = openerp.web.OldWidget.extend(/** @lends openerp.web.Header# */{
- template: "Header",
+openerp.web.Menu = openerp.web.Widget.extend(/** @lends openerp.web.Menu# */{
/**
- * @constructs openerp.web.Header
- * @extends openerp.web.OldWidget
+ * @constructs openerp.web.Menu
+ * @extends openerp.web.Widget
+ *
+ * @param parent
+ */
+ template: 'Menu',
+ init: function() {
+ this._super.apply(this, arguments);
+ this.has_been_loaded = $.Deferred();
+ },
+ start: function() {
+ this._super.apply(this, arguments);
+ this.$secondary_menus = this.getParent().$element.find('.oe_secondary_menus_container');
+ this.$secondary_menus.on('click', 'a[data-menu]', this.on_menu_click);
+ },
+ do_reload: function() {
+ var self = this;
+ return this.rpc("/web/menu/load", {}, this.on_loaded).then(function () {
+ if (self.current_menu) {
+ self.open_menu(self.current_menu);
+ }
+ });
+ },
+ on_loaded: function(data) {
+ this.data = data;
+ this.renderElement();
+ this.$element.on('click', 'a[data-menu]', this.on_menu_click);
+ this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this }));
+ // Hide second level submenus
+ this.$secondary_menus.find('.oe_menu_toggler').siblings('.oe_secondary_submenu').hide();
+ this.has_been_loaded.resolve();
+ },
+ /**
+ * Opens a given menu by id, as if a user had browsed to that menu by hand
+ * except does not trigger any event on the way
+ *
+ * @param {Number} id database id of the terminal menu to select
+ */
+ open_menu: function (id) {
+ var $clicked_menu, $sub_menu, $main_menu;
+ $clicked_menu = this.$element.add(this.$secondary_menus).find('a[data-menu=' + id + ']');
+
+ if (this.$secondary_menus.has($clicked_menu).length) {
+ $sub_menu = $clicked_menu.parents('.oe_secondary_menu');
+ $main_menu = this.$element.find('a[data-menu=' + $sub_menu.data('menu-parent') + ']');
+ } else {
+ $sub_menu = this.$secondary_menus.find('.oe_secondary_menu[data-menu-parent=' + $clicked_menu.attr('data-menu') + ']');
+ $main_menu = $clicked_menu;
+ }
+
+ // Activate current main menu
+ this.$element.find('.oe_active').removeClass('oe_active');
+ $main_menu.addClass('oe_active');
+
+ // Show current sub menu
+ this.$secondary_menus.find('.oe_secondary_menu').hide();
+ $sub_menu.show();
+
+ // Activate current menu item and show parents
+ this.$secondary_menus.find('.oe_active').removeClass('oe_active');
+ if ($main_menu !== $clicked_menu) {
+ $clicked_menu.parents().show();
+ if ($clicked_menu.is('.oe_menu_toggler')) {
+ $clicked_menu.toggleClass('oe_menu_opened').siblings('.oe_secondary_submenu:first').toggle();
+ } else {
+ $clicked_menu.parent().addClass('oe_active');
+ }
+ }
+ },
+ open_action: function (id) {
+ var menu_id, $menu = this.$element.add(this.$secondary_menus).find('a[data-action-id=' + id + ']');
+ if (menu_id = $menu.data('menu')) {
+ this.open_menu(menu_id);
+ }
+ },
+ on_menu_click: function(ev, id) {
+ id = id || 0;
+ var $clicked_menu, manual = false;
+
+ if (id) {
+ // We can manually activate a menu with it's id (for hash url mapping)
+ manual = true;
+ $clicked_menu = this.$element.find('a[data-menu=' + id + ']');
+ if (!$clicked_menu.length) {
+ $clicked_menu = this.$secondary_menus.find('a[data-menu=' + id + ']');
+ }
+ } else {
+ $clicked_menu = $(ev.currentTarget);
+ id = $clicked_menu.data('menu');
+ }
+
+ this.trigger('menuClicked', id, $clicked_menu);
+
+ if (id) {
+ this.open_menu(id);
+ this.current_menu = id;
+ this.session.active_id = id;
+ var action_id = $clicked_menu.data('action-id');
+ if (action_id) {
+ this.on_action(action_id);
+ }
+ }
+ if (ev) {
+ ev.stopPropagation();
+ }
+ return false;
+ },
+ do_show_secondary: function($sub_menu, $main_menu) {
+ var self = this;
+ this.$secondary_menus.show();
+ if (!arguments.length) {
+ return;
+ }
+ $sub_menu.show();
+ },
+ on_action: function(action) {
+ }
+});
+
+openerp.web.UserMenu = openerp.web.Widget.extend(/** @lends openerp.web.UserMenu# */{
+ template: "UserMenu",
+ /**
+ * @constructs openerp.web.UserMenu
+ * @extends openerp.web.Widget
*
* @param parent
*/
init: function(parent) {
this._super(parent);
- this.qs = "?" + jQuery.param.querystring();
- this.$content = $();
this.update_promise = $.Deferred().resolve();
},
start: function() {
- this._super();
+ var self = this;
+ this._super.apply(this, arguments);
+ $('html').bind('click', function() {
+ self.$element.find('.oe_dropdown_options').hide();
+ });
+ this.$element.find('.oe_dropdown_toggle').click(function() {
+ self.$element.find('.oe_dropdown_options').toggle();
+ return false;
+ });
+ this.$element.on('click', '.oe_dropdown_options li a[data-menu]', function() {
+ var f = self['on_menu_' + $(this).data('menu')];
+ f && f($(this));
+ self.$element.find('.oe_dropdown_options').hide();
+ return false;
+ });
+ },
+ change_password :function() {
+ var self = this;
+ this.dialog = new openerp.web.Dialog(this, {
+ title: _t("Change Password"),
+ width : 'auto'
+ }).open();
+ this.dialog.$element.html(QWeb.render("Change_Pwd", self));
+ this.dialog.$element.find("form[name=change_password_form]").validate({
+ submitHandler: function (form) {
+ self.rpc("/web/session/change_password",{
+ 'fields': $(form).serializeArray()
+ }, function(result) {
+ if (result.error) {
+ self.display_error(result);
+ return;
+ } else {
+ openerp.webclient.on_logout();
+ }
+ });
+ }
+ });
+ },
+ display_error: function (error) {
+ return openerp.web.dialog($('<div>'), {
+ modal: true,
+ title: error.title,
+ buttons: [
+ {text: _("Ok"), click: function() { $(this).dialog("close"); }}
+ ]
+ }).html(error.error);
},
do_update: function () {
var self = this;
var fct = function() {
- self.$content.remove();
+ var $avatar = self.$element.find('.oe_topbar_avatar');
+ $avatar.attr('src', $avatar.data('default-src'));
if (!self.session.uid)
return;
var func = new openerp.web.Model("res.users").get_func("read");
return func(self.session.uid, ["name", "company_id"]).pipe(function(res) {
- self.$content = $(QWeb.render("Header-content", {widget: self, user: res}));
- self.$content.appendTo(self.$element);
- self.$element.find(".logout").click(self.on_logout);
- self.$element.find("a.preferences").click(self.on_preferences);
- self.$element.find(".about").click(self.on_about);
+ // TODO: Only show company if multicompany in use
+ self.$element.find('.oe_topbar_name').text(res.name + '/' + res.company_id[1]);
return self.shortcut_load();
});
};
this.update_promise = this.update_promise.pipe(fct, fct);
},
- on_about: function() {
- var self = this;
- self.rpc("/web/webclient/version_info", {}).then(function(res) {
- var $help = $(QWeb.render("About-Page", {version_info: res}));
- $help.find('a.oe_activate_debug_mode').click(function (e) {
- e.preventDefault();
- window.location = $.param.querystring(
- window.location.href, 'debug');
- });
- $help.dialog({autoOpen: true,
- modal: true, width: 960, title: _t("About")});
- });
+ on_action: function() {
},
shortcut_load :function(){
var self = this,
sc = self.session.shortcuts,
shortcuts_ds = new openerp.web.DataSet(this, 'ir.ui.view_sc');
+ self.$element.find('.oe_dropdown_options a[data-menu=shortcut]').each(function() {
+ $(this).parent().remove();
+ });
// TODO: better way to communicate between sections.
// sc.bindings, because jquery does not bind/trigger on arrays...
if (!sc.binding) {
@@ -719,52 +837,41 @@ openerp.web.Header = openerp.web.OldWidget.extend(/** @lends openerp.web.Header
$(sc.binding).bind({
'add': function (e, attrs) {
shortcuts_ds.create(attrs, function (out) {
- $('<li>', {
- 'data-shortcut-id':out.result,
- 'data-id': attrs.res_id
- }).text(attrs.name)
- .appendTo(self.$element.find('.oe-shortcuts ul'));
+ var shortcut = QWeb.render('UserMenu.shortcut', {
+ shortcuts : [{
+ name : attrs.name,
+ id : out.result,
+ res_id : attrs.res_id
+ }]
+ });
+ $(shortcut).appendTo(self.$element.find('.oe_dropdown_options'));
attrs.id = out.result;
sc.push(attrs);
});
},
'remove-current': function () {
var menu_id = self.session.active_id;
- var $shortcut = self.$element
- .find('.oe-shortcuts li[data-id=' + menu_id + ']');
+ var $shortcut = self.$element.find('.oe_dropdown_options li a[data-id=' + menu_id + ']');
var shortcut_id = $shortcut.data('shortcut-id');
$shortcut.remove();
shortcuts_ds.unlink([shortcut_id]);
var sc_new = _.reject(sc, function(shortcut){ return shortcut_id === shortcut.id});
sc.splice(0, sc.length);
sc.push.apply(sc, sc_new);
- }
+ }
});
}
return this.rpc('/web/session/sc_list', {}, function(shortcuts) {
sc.splice(0, sc.length);
sc.push.apply(sc, shortcuts);
- self.$element.find('.oe-shortcuts')
- .html(QWeb.render('Shortcuts', {'shortcuts': shortcuts}))
- .undelegate('li', 'click')
-
- .delegate('li', 'click', function(e) {
- e.stopPropagation();
- var id = $(this).data('id');
- self.session.active_id = id;
- self.rpc('/web/menu/action', {'menu_id':id}, function(ir_menu_data) {
- if (ir_menu_data.action.length){
- self.on_action(ir_menu_data.action[0][2]);
- }
- });
- });
+ $(QWeb.render('UserMenu.shortcut', {'shortcuts': shortcuts}))
+ .appendTo(self.$element.find('.oe_dropdown_options'));
});
},
-
- on_action: function(action) {
+ on_menu_logout: function() {
},
- on_preferences: function(){
+ on_menu_settings: function() {
var self = this;
var action_manager = new openerp.web.ActionManager(this);
var dataset = new openerp.web.DataSet (this,'res.users',this.context);
@@ -793,7 +900,7 @@ openerp.web.Header = openerp.web.OldWidget.extend(/** @lends openerp.web.Header
var inner_viewmanager = action_manager.inner_viewmanager;
inner_viewmanager.views[inner_viewmanager.active_view].controller.do_save()
.then(function() {
- self.dialog.stop();
+ self.dialog.destroy();
// needs to refresh interface in case language changed
window.location.reload();
});
@@ -804,298 +911,66 @@ openerp.web.Header = openerp.web.OldWidget.extend(/** @lends openerp.web.Header
action_manager.appendTo(this.dialog);
action_manager.render(this.dialog);
},
-
- change_password :function() {
+ on_menu_about: function() {
var self = this;
- this.dialog = new openerp.web.Dialog(this, {
- title: _t("Change Password"),
- width : 'auto'
- }).open();
- this.dialog.$element.html(QWeb.render("Change_Pwd", self));
- this.dialog.$element.find("form[name=change_password_form]").validate({
- submitHandler: function (form) {
- self.rpc("/web/session/change_password",{
- 'fields': $(form).serializeArray()
- }, function(result) {
- if (result.error) {
- self.display_error(result);
- return;
- } else {
- openerp.webclient.on_logout();
- }
- });
- }
+ self.rpc("/web/webclient/version_info", {}).then(function(res) {
+ var $help = $(QWeb.render("About-Page", {version_info: res}));
+ $help.find('a.oe_activate_debug_mode').click(function (e) {
+ e.preventDefault();
+ window.location = $.param.querystring(
+ window.location.href, 'debug');
+ });
+ openerp.web.dialog($help, {autoOpen: true,
+ modal: true, width: 960, title: _t("About")});
});
},
- display_error: function (error) {
- return $('<div>').dialog({
- modal: true,
- title: error.title,
- buttons: [
- {text: _("Ok"), click: function() { $(this).dialog("close"); }}
- ]
- }).html(error.error);
- },
- on_logout: function() {
- }
-});
-
-openerp.web.Menu = openerp.web.OldWidget.extend(/** @lends openerp.web.Menu# */{
- /**
- * @constructs openerp.web.Menu
- * @extends openerp.web.OldWidget
- *
- * @param parent
- * @param element_id
- * @param secondary_menu_id
- */
- init: function(parent, element_id, secondary_menu_id) {
- this._super(parent, element_id);
- this.secondary_menu_id = secondary_menu_id;
- this.$secondary_menu = $("#" + secondary_menu_id);
- this.menu = false;
- this.folded = false;
- if (window.localStorage) {
- this.folded = localStorage.getItem('oe_menu_folded') === 'true';
- }
- this.float_timeout = 700;
- },
- start: function() {
- this.$secondary_menu.addClass(this.folded ? 'oe_folded' : 'oe_unfolded');
- },
- do_reload: function() {
- var self = this;
- return this.rpc("/web/menu/load", {}, this.on_loaded).then(function () {
- if (self.current_menu) {
- self.open_menu(self.current_menu);
+ on_menu_shortcut: function($link) {
+ var self = this,
+ id = $link.data('id');
+ self.session.active_id = id;
+ self.rpc('/web/menu/action', {'menu_id': id}, function(ir_menu_data) {
+ if (ir_menu_data.action.length){
+ self.on_action(ir_menu_data.action[0][2]);
}
});
- },
- on_loaded: function(data) {
- this.data = data;
- this.$element.html(QWeb.render("Menu", { widget : this }));
- this.$secondary_menu.html(QWeb.render("Menu.secondary", { widget : this }));
- this.$element.add(this.$secondary_menu).find("a").click(this.on_menu_click);
- this.$secondary_menu.find('.oe_toggle_secondary_menu').click(this.on_toggle_fold);
- },
- on_toggle_fold: function() {
- this.$secondary_menu.toggleClass('oe_folded').toggleClass('oe_unfolded');
- if (this.folded) {
- this.$secondary_menu.find('.oe_secondary_menu.active').show();
- } else {
- this.$secondary_menu.find('.oe_secondary_menu').hide();
- }
- this.folded = !this.folded;
- if (window.localStorage) {
- localStorage.setItem('oe_menu_folded', this.folded.toString());
- }
- },
- /**
- * Opens a given menu by id, as if a user had browsed to that menu by hand
- * except does not trigger any event on the way
- *
- * @param {Number} menu_id database id of the terminal menu to select
- */
- open_menu: function (menu_id) {
- this.$element.add(this.$secondary_menu).find('.active')
- .removeClass('active');
- this.$secondary_menu.find('> .oe_secondary_menu').hide();
-
- var $primary_menu;
- var $secondary_submenu = this.$secondary_menu.find(
- 'a[data-menu=' + menu_id +']');
- if ($secondary_submenu.length) {
- for(;;) {
- if ($secondary_submenu.hasClass('leaf')) {
- $secondary_submenu.addClass('active');
- } else if ($secondary_submenu.hasClass('submenu')) {
- $secondary_submenu.addClass('opened')
- }
- var $parent = $secondary_submenu.parent().show();
- if ($parent.hasClass('oe_secondary_menu')) {
- var primary_id = $parent.data('menu-parent');
- $primary_menu = this.$element.find(
- 'a[data-menu=' + primary_id + ']');
- break;
- }
- $secondary_submenu = $parent.prev();
- }
- } else {
- $primary_menu = this.$element.find('a[data-menu=' + menu_id + ']');
- }
- if (!$primary_menu.length) {
- return;
- }
- $primary_menu.addClass('active');
- this.$secondary_menu.find(
- 'div[data-menu-parent=' + $primary_menu.data('menu') + ']').addClass('active').toggle(!this.folded);
- },
- on_menu_click: function(ev, id) {
- id = id || 0;
- var $clicked_menu, manual = false;
-
- if (id) {
- // We can manually activate a menu with it's id (for hash url mapping)
- manual = true;
- $clicked_menu = this.$element.find('a[data-menu=' + id + ']');
- if (!$clicked_menu.length) {
- $clicked_menu = this.$secondary_menu.find('a[data-menu=' + id + ']');
- }
- } else {
- $clicked_menu = $(ev.currentTarget);
- id = $clicked_menu.data('menu');
- }
-
- if (this.do_menu_click($clicked_menu, manual) && id) {
- this.current_menu = id;
- this.session.active_id = id;
- this.rpc('/web/menu/action', {'menu_id': id}, this.on_menu_action_loaded);
- }
- if (ev) {
- ev.stopPropagation();
- }
- return false;
- },
- do_menu_click: function($clicked_menu, manual) {
- var $sub_menu, $main_menu,
- active = $clicked_menu.is('.active'),
- sub_menu_visible = false,
- has_submenu_items = false;
-
- if (this.$secondary_menu.has($clicked_menu).length) {
- $sub_menu = $clicked_menu.parents('.oe_secondary_menu');
- $main_menu = this.$element.find('a[data-menu=' + $sub_menu.data('menu-parent') + ']');
- } else {
- $sub_menu = this.$secondary_menu.find('.oe_secondary_menu[data-menu-parent=' + $clicked_menu.attr('data-menu') + ']');
- $main_menu = $clicked_menu;
- }
-
- sub_menu_visible = $sub_menu.is(':visible');
- has_submenu_items = !!$sub_menu.children().length;
- this.$secondary_menu.find('.oe_secondary_menu').hide();
-
- $('.active', this.$element.add(this.$secondary_menu)).removeClass('active');
- $main_menu.add($clicked_menu).add($sub_menu).addClass('active');
-
- if (has_submenu_items) {
- if (!(this.folded && manual)) {
- this.do_show_secondary($sub_menu, $main_menu);
- } else {
- this.do_show_secondary();
- }
- }
-
- if ($main_menu != $clicked_menu) {
- if ($clicked_menu.is('.submenu')) {
- $sub_menu.find('.submenu.opened').each(function() {
- if (!$(this).next().has($clicked_menu).length && !$(this).is($clicked_menu)) {
- $(this).removeClass('opened').next().hide();
- }
- });
- $clicked_menu.toggleClass('opened').next().toggle();
- } else if ($clicked_menu.is('.leaf')) {
- $sub_menu.toggle(!this.folded);
- return true;
- }
- } else if (this.folded) {
- if ((active && sub_menu_visible) || !has_submenu_items) {
- $sub_menu.hide();
- return true;
- }
- return manual;
- } else {
- return true;
- }
- return false;
- },
- do_hide_secondary: function() {
- this.$secondary_menu.hide();
- },
- do_show_secondary: function($sub_menu, $main_menu) {
- var self = this;
- this.$secondary_menu.show();
- if (!arguments.length) {
- return;
- }
- if (this.folded) {
- var css = $main_menu.position(),
- fold_width = this.$secondary_menu.width() + 2,
- window_width = $(window).width();
- css.top += 33;
- css.left -= Math.round(($sub_menu.width() - $main_menu.width()) / 2);
- css.left = css.left < fold_width ? fold_width : css.left;
- if ((css.left + $sub_menu.width()) > window_width) {
- delete(css.left);
- css.right = 1;
- }
- $sub_menu.css(css);
- $sub_menu.mouseenter(function() {
- clearTimeout($sub_menu.data('timeoutId'));
- $sub_menu.data('timeoutId', null);
- return false;
- }).mouseleave(function(evt) {
- var timeoutId = setTimeout(function() {
- if (self.folded && $sub_menu.data('timeoutId')) {
- $sub_menu.hide().unbind('mouseenter').unbind('mouseleave');
- }
- }, self.float_timeout);
- $sub_menu.data('timeoutId', timeoutId);
- return false;
- });
- }
- $sub_menu.show();
- },
- on_menu_action_loaded: function(data) {
- var self = this;
- if (data.action.length) {
- var action = data.action[0][2];
- action.from_menu = true;
- self.on_action(action);
- } else {
- self.on_action({type: 'null_action'});
- }
- },
- on_action: function(action) {
}
});
-openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebClient */{
+openerp.web.WebClient = openerp.web.Widget.extend(/** @lends openerp.web.WebClient */{
/**
* @constructs openerp.web.WebClient
- * @extends openerp.web.OldWidget
- *
- * @param element_id
+ * @extends openerp.web.Widget
*/
init: function(parent) {
var self = this;
this._super(parent);
openerp.webclient = this;
-
+ this.querystring = '?' + jQuery.param.querystring();
this._current_state = null;
},
start: function() {
var self = this;
- this.$element = $(document.body);
+ this.$element.addClass("openerp openerp2");
if (jQuery.param != undefined && jQuery.deparam(jQuery.param.querystring()).kitten != undefined) {
this.$element.addClass("kitten-mode-activated");
this.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {
self.$element.toggleClass('clark-gable');
});
}
- this.session.bind().then(function() {
+ this.session.bind_session().then(function() {
if (!self.session.session_is_valid()) {
self.show_login();
}
});
this.session.on_session_valid.add(function() {
self.show_application();
-
- self.header.do_update();
+
+ self.user_menu.do_update();
self.menu.do_reload();
if(self.action_manager)
- self.action_manager.stop();
+ self.action_manager.destroy();
self.action_manager = new openerp.web.ActionManager(self);
- self.action_manager.appendTo($("#oe_app"));
+ self.action_manager.appendTo(self.$element.find('.oe_application'));
self.bind_hashchange();
var version_label = _t("OpenERP - Unsupported/Community Version");
if (!self.session.openerp_entreprise) {
@@ -1103,6 +978,9 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC
document.title = version_label;
}
});
+ this.$element.on('mouseenter', '.oe_systray > div:not([data-tipsy=true])', function() {
+ $(this).attr('data-tipsy', 'true').tipsy().trigger('mouseenter');
+ });
},
show_login: function() {
var self = this;
@@ -1115,15 +993,15 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC
var self = this;
this.destroy_content();
this.show_common();
- self.$table = $(QWeb.render("Interface", {}));
+ self.$table = $(QWeb.render("WebClient", {}));
self.$element.append(self.$table);
- self.header = new openerp.web.Header(self);
- self.header.on_logout.add(this.proxy('on_logout'));
- self.header.on_action.add(this.proxy('on_menu_action'));
- self.header.appendTo($("#oe_header"));
- self.menu = new openerp.web.Menu(self, "oe_menu", "oe_secondary_menu");
+ self.menu = new openerp.web.Menu(self);
+ self.menu.replace(this.$element.find('.oe_menu_placeholder'));
self.menu.on_action.add(this.proxy('on_menu_action'));
- self.menu.start();
+ self.user_menu = new openerp.web.UserMenu(self);
+ self.user_menu.replace(this.$element.find('.oe_user_menu_placeholder'));
+ self.user_menu.on_menu_logout.add(this.proxy('on_logout'));
+ self.user_menu.on_action.add(this.proxy('on_menu_action'));
},
show_common: function() {
var self = this;
@@ -1144,8 +1022,8 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC
this.loading.appendTo(this.$element);
},
destroy_content: function() {
- _.each(_.clone(this.widget_children), function(el) {
- el.stop();
+ _.each(_.clone(this.getChildren()), function(el) {
+ el.destroy();
});
this.$element.children().remove();
},
@@ -1207,6 +1085,12 @@ openerp.web.WebClient = openerp.web.OldWidget.extend(/** @lends openerp.web.WebC
self.menu.on_menu_click(null, action.menu_id);
});
}
+ },
+ set_content_full_screen: function(fullscreen) {
+ if (fullscreen)
+ $(".oe_webclient", this.$element).addClass("oe_content_full_screen");
+ else
+ $(".oe_webclient", this.$element).removeClass("oe_content_full_screen");
}
});
@@ -1250,7 +1134,7 @@ openerp.web.embed = function (origin, dbname, login, key, action, options) {
var sc = document.getElementsByTagName('script');
currentScript = sc[sc.length-1];
}
- openerp.connection.bind(origin).then(function () {
+ openerp.connection.bind_session(origin).then(function () {
openerp.connection.session_authenticate(dbname, login, key, true).then(function () {
var client = new openerp.web.EmbeddedClient(action, options);
client.insertAfter(currentScript);
diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js
index a1d2d04f697..9bcf037fefc 100644
--- a/addons/web/static/src/js/core.js
+++ b/addons/web/static/src/js/core.js
@@ -10,110 +10,8 @@ if (!console.debug) {
}
openerp.web.core = function(openerp) {
-/**
- * John Resig Class with factory improvement
- */
-(function() {
- var initializing = false,
- fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/;
- // The web Class implementation (does nothing)
- /**
- * Extended version of John Resig's Class pattern
- *
- * @class
- */
- openerp.web.Class = function(){};
-
- /**
- * Subclass an existing class
- *
- * @param {Object} prop class-level properties (class attributes and instance methods) to set on the new class
- */
- openerp.web.Class.extend = function(prop) {
- var _super = this.prototype;
-
- // Instantiate a web class (but only create the instance,
- // don't run the init constructor)
- initializing = true;
- var prototype = new this();
- initializing = false;
-
- // Copy the properties over onto the new prototype
- for (var name in prop) {
- // Check if we're overwriting an existing function
- prototype[name] = typeof prop[name] == "function" &&
- typeof _super[name] == "function" &&
- fnTest.test(prop[name]) ?
- (function(name, fn) {
- return function() {
- var tmp = this._super;
-
- // Add a new ._super() method that is the same
- // method but on the super-class
- this._super = _super[name];
-
- // The method only need to be bound temporarily, so
- // we remove it when we're done executing
- var ret = fn.apply(this, arguments);
- this._super = tmp;
-
- return ret;
- };
- })(name, prop[name]) :
- prop[name];
- }
-
- // The dummy class constructor
- function Class() {
- // All construction is actually done in the init method
- if (!initializing && this.init) {
- var ret = this.init.apply(this, arguments);
- if (ret) { return ret; }
- }
- return this;
- }
- Class.include = function (properties) {
- for (var name in properties) {
- if (typeof properties[name] !== 'function'
- || !fnTest.test(properties[name])) {
- prototype[name] = properties[name];
- } else if (typeof prototype[name] === 'function'
- && prototype.hasOwnProperty(name)) {
- prototype[name] = (function (name, fn, previous) {
- return function () {
- var tmp = this._super;
- this._super = previous;
- var ret = fn.apply(this, arguments);
- this._super = tmp;
- return ret;
- }
- })(name, properties[name], prototype[name]);
- } else if (typeof _super[name] === 'function') {
- prototype[name] = (function (name, fn) {
- return function () {
- var tmp = this._super;
- this._super = _super[name];
- var ret = fn.apply(this, arguments);
- this._super = tmp;
- return ret;
- }
- })(name, properties[name]);
- }
- }
- };
-
- // Populate our constructed prototype object
- Class.prototype = prototype;
-
- // Enforce the constructor to be what we expect
- Class.constructor = Class;
- // And make this class extendable
- Class.extend = arguments.callee;
-
- return Class;
- };
-})();
+openerp.web.Class = nova.Class;
openerp.web.callback = function(obj, method) {
var callback = function() {
@@ -175,31 +73,6 @@ openerp.web.callback = function(obj, method) {
};
/**
- * Generates an inherited class that replaces all the methods by null methods (methods
- * that does nothing and always return undefined).
- *
- * @param {Class} claz
- * @param {Object} add Additional functions to override.
- * @return {Class}
- */
-openerp.web.generate_null_object_class = function(claz, add) {
- var newer = {};
- var copy_proto = function(prototype) {
- for (var name in prototype) {
- if(typeof prototype[name] == "function") {
- newer[name] = function() {};
- }
- }
- if (prototype.prototype)
- copy_proto(prototype.prototype);
- };
- copy_proto(claz.prototype);
- newer.init = openerp.web.Widget.prototype.init;
- var tmpclass = claz.extend(newer);
- return tmpclass.extend(add || {});
-};
-
-/**
* web error for lookup failure
*
* @class
@@ -362,11 +235,7 @@ openerp.web.Registry = openerp.web.Class.extend( /** @lends openerp.web.Registry
}
});
-openerp.web.CallbackEnabled = openerp.web.Class.extend(/** @lends openerp.web.CallbackEnabled# */{
- /**
- * @constructs openerp.web.CallbackEnabled
- * @extends openerp.web.Class
- */
+openerp.web.CallbackEnabledMixin = {
init: function() {
// Transform on_* method into openerp.web.callbacks
for (var name in this) {
@@ -404,7 +273,14 @@ openerp.web.CallbackEnabled = openerp.web.Class.extend(/** @lends openerp.web.Ca
return self[method_name].apply(self, arguments);
}
}
-});
+};
+
+openerp.web.CallbackEnabled = openerp.web.Class.extend(_.extend({}, nova.GetterSetterMixin, openerp.web.CallbackEnabledMixin, {
+ init: function() {
+ nova.GetterSetterMixin.init.call(this);
+ openerp.web.CallbackEnabledMixin.init.call(this);
+ }
+}));
openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.web.Connection# */{
/**
@@ -422,7 +298,7 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
this.name = openerp._session_id;
this.qweb_mutex = new $.Mutex();
},
- bind: function(origin) {
+ bind_session: function(origin) {
var window_origin = location.protocol+"//"+location.host, self=this;
this.origin = origin ? _.str.rtrim(origin,'/') : window_origin;
this.prefix = this.origin;
@@ -445,6 +321,269 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
this.active_id = null;
return this.session_init();
},
+ test_eval_get_context: function () {
+ var asJS = function (arg) {
+ if (arg instanceof py.object) {
+ return arg.toJSON();
+ }
+ return arg;
+ };
+
+ var datetime = new py.object();
+ datetime.datetime = new py.type(function datetime() {
+ throw new Error('datetime.datetime not implemented');
+ });
+ var date = datetime.date = new py.type(function date(y, m, d) {
+ if (y instanceof Array) {
+ d = y[2];
+ m = y[1];
+ y = y[0];
+ }
+ this.year = asJS(y);
+ this.month = asJS(m);
+ this.day = asJS(d);
+ }, py.object, {
+ strftime: function (args) {
+ var f = asJS(args[0]), self = this;
+ return new py.str(f.replace(/%([A-Za-z])/g, function (m, c) {
+ switch (c) {
+ case 'Y': return self.year;
+ case 'm': return _.str.sprintf('%02d', self.month);
+ case 'd': return _.str.sprintf('%02d', self.day);
+ }
+ throw new Error('ValueError: No known conversion for ' + m);
+ }));
+ }
+ });
+ date.__getattribute__ = function (name) {
+ if (name === 'today') {
+ return date.today;
+ }
+ throw new Error("AttributeError: object 'date' has no attribute '" + name +"'");
+ };
+ date.today = new py.def(function () {
+ var d = new Date();
+ return new date(d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate());
+ });
+ datetime.time = new py.type(function time() {
+ throw new Error('datetime.time not implemented');
+ });
+
+ var time = new py.object();
+ time.strftime = new py.def(function (args) {
+ return date.today.__call__().strftime(args);
+ });
+
+ var relativedelta = new py.type(function relativedelta(args, kwargs) {
+ if (!_.isEmpty(args)) {
+ throw new Error('Extraction of relative deltas from existing datetimes not supported');
+ }
+ this.ops = kwargs;
+ }, py.object, {
+ __add__: function (other) {
+ if (!(other instanceof datetime.date)) {
+ return py.NotImplemented;
+ }
+ // TODO: test this whole mess
+ var year = asJS(this.ops.year) || asJS(other.year);
+ if (asJS(this.ops.years)) {
+ year += asJS(this.ops.years);
+ }
+
+ var month = asJS(this.ops.month) || asJS(other.month);
+ if (asJS(this.ops.months)) {
+ month += asJS(this.ops.months);
+ // FIXME: no divmod in JS?
+ while (month < 1) {
+ year -= 1;
+ month += 12;
+ }
+ while (month > 12) {
+ year += 1;
+ month -= 12;
+ }
+ }
+
+ var lastMonthDay = new Date(year, month, 0).getDate();
+ var day = asJS(this.ops.day) || asJS(other.day);
+ if (day > lastMonthDay) { day = lastMonthDay; }
+ var days_offset = ((asJS(this.ops.weeks) || 0) * 7) + (asJS(this.ops.days) || 0);
+ if (days_offset) {
+ day = new Date(year, month-1, day + days_offset).getDate();
+ }
+ // TODO: leapdays?
+ // TODO: hours, minutes, seconds? Not used in XML domains
+ // TODO: weekday?
+ return new datetime.date(year, month, day);
+ },
+ __radd__: function (other) {
+ return this.__add__(other);
+ },
+
+ __sub__: function (other) {
+ if (!(other instanceof datetime.date)) {
+ return py.NotImplemented;
+ }
+ // TODO: test this whole mess
+ var year = asJS(this.ops.year) || asJS(other.year);
+ if (asJS(this.ops.years)) {
+ year -= asJS(this.ops.years);
+ }
+
+ var month = asJS(this.ops.month) || asJS(other.month);
+ if (asJS(this.ops.months)) {
+ month -= asJS(this.ops.months);
+ // FIXME: no divmod in JS?
+ while (month < 1) {
+ year -= 1;
+ month += 12;
+ }
+ while (month > 12) {
+ year += 1;
+ month -= 12;
+ }
+ }
+
+ var lastMonthDay = new Date(year, month, 0).getDate();
+ var day = asJS(this.ops.day) || asJS(other.day);
+ if (day > lastMonthDay) { day = lastMonthDay; }
+ var days_offset = ((asJS(this.ops.weeks) || 0) * 7) + (asJS(this.ops.days) || 0);
+ if (days_offset) {
+ day = new Date(year, month-1, day - days_offset).getDate();
+ }
+ // TODO: leapdays?
+ // TODO: hours, minutes, seconds? Not used in XML domains
+ // TODO: weekday?
+ return new datetime.date(year, month, day);
+ },
+ __rsub__: function (other) {
+ return this.__sub__(other);
+ }
+ });
+
+ return {
+ uid: new py.float(this.uid),
+ datetime: datetime,
+ time: time,
+ relativedelta: relativedelta
+ };
+ },
+ /**
+ * FIXME: Huge testing hack, especially the evaluation context, rewrite + test for real before switching
+ */
+ test_eval: function (source, expected) {
+ try {
+ var ctx = this.test_eval_contexts(source.contexts);
+ if (!_.isEqual(ctx, expected.context)) {
+ console.group('Local context does not match remote, nothing is broken but please report to R&D (xmo)');
+ console.warn('source', source.contexts);
+ console.warn('local', ctx);
+ console.warn('remote', expected.context);
+ console.groupEnd();
+ }
+ } catch (e) {
+ console.group('Failed to evaluate contexts, nothing is broken but please report to R&D (xmo)');
+ console.error(e);
+ console.log('source', source.contexts);
+ console.groupEnd();
+ }
+
+ try {
+ var dom = this.test_eval_domains(source.domains, this.test_eval_get_context());
+ if (!_.isEqual(dom, expected.domain)) {
+ console.group('Local domain does not match remote, nothing is broken but please report to R&D (xmo)');
+ console.warn('source', source.domains);
+ console.warn('local', dom);
+ console.warn('remote', expected.domain);
+ console.groupEnd();
+ }
+ } catch (e) {
+ console.group('Failed to evaluate domains, nothing is broken but please report to R&D (xmo)');
+ console.error(e);
+ console.log('source', source.domains);
+ console.groupEnd();
+ }
+
+ try {
+ var groups = this.test_eval_groupby(source.group_by_seq);
+ if (!_.isEqual(groups, expected.group_by)) {
+ console.group('Local groupby does not match remote, nothing is broken but please report to R&D (xmo)');
+ console.warn('source', source.group_by_seq);
+ console.warn('local', groups);
+ console.warn('remote', expected.group_by);
+ console.groupEnd();
+ }
+ } catch (e) {
+ console.group('Failed to evaluate groupby, nothing is broken but please report to R&D (xmo)');
+ console.error(e);
+ console.log('source', source.group_by_seq);
+ console.groupEnd();
+ }
+ },
+ test_eval_contexts: function (contexts) {
+ var result_context = _.extend({}, this.user_context),
+ self = this;
+ _(contexts).each(function (ctx) {
+ switch(ctx.__ref) {
+ case 'context':
+ _.extend(result_context, py.eval(ctx.__debug));
+ break;
+ case 'compound_context':
+ _.extend(
+ result_context, self.test_eval_contexts(ctx.__contexts));
+ break;
+ default:
+ _.extend(result_context, ctx);
+ }
+ });
+ return result_context;
+ },
+ test_eval_domains: function (domains, eval_context) {
+ var result_domain = [], self = this;
+ _(domains).each(function (dom) {
+ switch(dom.__ref) {
+ case 'domain':
+ result_domain.push.apply(
+ result_domain, py.eval(dom.__debug, eval_context));
+ break;
+ case 'compound_domain':
+ result_domain.push.apply(
+ result_domain, self.test_eval_domains(
+ dom.__domains, eval_context));
+ break;
+ default:
+ result_domain.push.apply(
+ result_domain, dom);
+ }
+ });
+ return result_domain;
+ },
+ test_eval_groupby: function (contexts) {
+ var result_group = [], self = this;
+ _(contexts).each(function (ctx) {
+ var group;
+ switch(ctx.__ref) {
+ case 'context':
+ group = py.eval(ctx.__debug).group_by;
+ break;
+ case 'compound_context':
+ group = self.test_eval_contexts(ctx.__contexts).group_by;
+ break;
+ default:
+ group = ctx.group_by
+ }
+ if (!group) { return; }
+ if (typeof group === 'string') {
+ result_group.push(group);
+ } else if (group instanceof Array) {
+ result_group.push.apply(result_group, group);
+ } else {
+ throw new Error('Got invalid groupby {{'
+ + JSON.stringify(group) + '}}');
+ }
+ });
+ return result_group;
+ },
/**
* Executes an RPC call, registering the provided callbacks.
*
@@ -480,6 +619,9 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
function (response, textStatus, jqXHR) {
self.on_rpc_response();
if (!response.error) {
+ if (url.url === '/web/session/eval_domain_and_context') {
+ self.test_eval(params, response.result);
+ }
deferred.resolve(response["result"], textStatus, jqXHR);
} else if (response.error.data.type === "session_invalid") {
self.uid = false;
@@ -733,6 +875,14 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
var file_list = ["/web/static/lib/datejs/globalization/" + lang.replace("_", "-") + ".js"];
return self.rpc('/web/webclient/jslist', {mods: to_load}).pipe(function(files) {
return self.do_load_js(file_list.concat(files));
+ }).then(function () {
+ if (!Date.CultureInfo.pmDesignator) {
+ // If no am/pm designator is specified but the openerp
+ // datetime format uses %i, date.js won't be able to
+ // correctly format a date. See bug#938497.
+ Date.CultureInfo.amDesignator = 'AM';
+ Date.CultureInfo.pmDesignator = 'PM';
+ }
});
}))
}
@@ -873,9 +1023,12 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
_(_.extend({}, options.data || {},
{session_id: this.session_id, token: token}))
.each(function (value, key) {
- $('<input type="hidden" name="' + key + '">')
- .val(value)
- .appendTo($form_data);
+ var $input = $form.find('[name=' + key +']');
+ if (!$input.length) {
+ $input = $('<input type="hidden" name="' + key + '">')
+ .appendTo($form_data);
+ }
+ $input.val(value)
});
$form
@@ -958,11 +1111,11 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
*
* And of course, when you don't need that widget anymore, just do:
*
- * my_widget.stop();
+ * my_widget.destroy();
*
* That will kill the widget in a clean way and erase its content from the dom.
*/
-openerp.web.Widget = openerp.web.CallbackEnabled.extend(/** @lends openerp.web.Widget# */{
+openerp.web.Widget = nova.Widget.extend(_.extend({}, openerp.web.CallbackEnabledMixin, {
/**
* The name of the QWeb template that will be used for rendering. Must be
* redefined in subclasses or the default render() method can not be used.
@@ -971,18 +1124,13 @@ openerp.web.Widget = openerp.web.CallbackEnabled.extend(/** @lends openerp.web.W
*/
template: null,
/**
- * Tag name when creating a default $element.
- * @type string
- */
- tag_name: 'div',
- /**
* Constructs the widget and sets its parent if a parent is given.
*
* @constructs openerp.web.Widget
* @extends openerp.web.CallbackEnabled
*
* @param {openerp.web.Widget} parent Binds the current instance to the given Widget instance.
- * When that widget is destroyed by calling stop(), the current instance will be
+ * When that widget is destroyed by calling destroy(), the current instance will be
* destroyed too. Can be null.
* @param {String} element_id Deprecated. Sets the element_id. Only useful when you want
* to bind the current Widget to an already existing part of the DOM, which is not compatible
@@ -990,132 +1138,24 @@ openerp.web.Widget = openerp.web.CallbackEnabled.extend(/** @lends openerp.web.W
* for new components this argument should not be provided any more.
*/
init: function(parent) {
- this._super();
+ this._super(parent);
+ openerp.web.CallbackEnabledMixin.init.call(this);
this.session = openerp.connection;
-
- this.$element = $(document.createElement(this.tag_name));
-
- this.widget_parent = parent;
- this.widget_children = [];
- if(parent && parent.widget_children) {
- parent.widget_children.push(this);
- }
- // useful to know if the widget was destroyed and should not be used anymore
- this.widget_is_stopped = false;
- },
- /**
- * Renders the current widget and appends it to the given jQuery object or Widget.
- *
- * @param target A jQuery object or a Widget instance.
- */
- appendTo: function(target) {
- var self = this;
- return this._render_and_insert(function(t) {
- self.$element.appendTo(t);
- }, target);
- },
- /**
- * Renders the current widget and prepends it to the given jQuery object or Widget.
- *
- * @param target A jQuery object or a Widget instance.
- */
- prependTo: function(target) {
- var self = this;
- return this._render_and_insert(function(t) {
- self.$element.prependTo(t);
- }, target);
},
/**
- * Renders the current widget and inserts it after to the given jQuery object or Widget.
- *
- * @param target A jQuery object or a Widget instance.
+ * Renders the element. The default implementation renders the widget using QWeb,
+ * `this.template` must be defined. The context given to QWeb contains the "widget"
+ * key that references `this`.
*/
- insertAfter: function(target) {
- var self = this;
- return this._render_and_insert(function(t) {
- self.$element.insertAfter(t);
- }, target);
- },
- /**
- * Renders the current widget and inserts it before to the given jQuery object or Widget.
- *
- * @param target A jQuery object or a Widget instance.
- */
- insertBefore: function(target) {
- var self = this;
- return this._render_and_insert(function(t) {
- self.$element.insertBefore(t);
- }, target);
- },
- /**
- * Renders the current widget and replaces the given jQuery object.
- *
- * @param target A jQuery object or a Widget instance.
- */
- replace: function(target) {
- return this._render_and_insert(_.bind(function(t) {
- this.$element.replaceAll(t);
- }, this), target);
- },
- _render_and_insert: function(insertion, target) {
- this.render_element();
- if (target instanceof openerp.web.Widget)
- target = target.$element;
- insertion(target);
- this.on_inserted(this.$element, this);
- return this.start();
- },
- on_inserted: function(element, widget) {},
- /**
- * Renders the element and insert the result of the render() method in this.$element.
- */
- render_element: function() {
- var rendered = this.render();
- if (rendered) {
+ renderElement: function() {
+ var rendered = null;
+ if (this.template)
+ rendered = openerp.web.qweb.render(this.template, {widget: this});
+ if (_.str.trim(rendered)) {
var elem = $(rendered);
this.$element.replaceWith(elem);
this.$element = elem;
}
- return this;
- },
- /**
- * Renders the widget using QWeb, `this.template` must be defined.
- * The context given to QWeb contains the "widget" key that references `this`.
- *
- * @param {Object} additional Additional context arguments to pass to the template.
- */
- render: function (additional) {
- if (this.template)
- return openerp.web.qweb.render(this.template, _.extend({widget: this}, additional || {}));
- return null;
- },
- /**
- * Method called after rendering. Mostly used to bind actions, perform asynchronous
- * calls, etc...
- *
- * By convention, the method should return a promise to inform the caller when
- * this widget has been initialized.
- *
- * @returns {jQuery.Deferred}
- */
- start: function() {
- return $.Deferred().done().promise();
- },
- /**
- * Destroys the current widget, also destroys all its children before destroying itself.
- */
- stop: function() {
- _.each(_.clone(this.widget_children), function(el) {
- el.stop();
- });
- if(this.$element != null) {
- this.$element.remove();
- }
- if (this.widget_parent && this.widget_parent.widget_children) {
- this.widget_parent.widget_children = _.without(this.widget_parent.widget_children, this);
- }
- this.widget_parent = null;
- this.widget_is_stopped = true;
},
/**
* Informs the action manager to do an action. This supposes that
@@ -1123,37 +1163,36 @@ openerp.web.Widget = openerp.web.CallbackEnabled.extend(/** @lends openerp.web.W
* If that's not the case this method will simply return `false`.
*/
do_action: function(action, on_finished) {
- if (this.widget_parent) {
- return this.widget_parent.do_action(action, on_finished);
+ if (this.getParent()) {
+ return this.getParent().do_action(action, on_finished);
}
return false;
},
do_notify: function() {
- if (this.widget_parent) {
- return this.widget_parent.do_notify.apply(this,arguments);
+ if (this.getParent()) {
+ return this.getParent().do_notify.apply(this,arguments);
}
return false;
},
do_warn: function() {
- if (this.widget_parent) {
- return this.widget_parent.do_warn.apply(this,arguments);
+ if (this.getParent()) {
+ return this.getParent().do_warn.apply(this,arguments);
}
return false;
},
-
rpc: function(url, data, success, error) {
var def = $.Deferred().then(success, error);
var self = this;
openerp.connection.rpc(url, data). then(function() {
- if (!self.widget_is_stopped)
+ if (!self.isDestroyed())
def.resolve.apply(def, arguments);
}, function() {
- if (!self.widget_is_stopped)
+ if (!self.isDestroyed())
def.reject.apply(def, arguments);
});
return def.promise();
}
-});
+}));
/**
* @deprecated use :class:`openerp.web.Widget`
@@ -1164,7 +1203,21 @@ openerp.web.OldWidget = openerp.web.Widget.extend({
this.element_id = element_id;
this.element_id = this.element_id || _.uniqueId('widget-');
var tmp = document.getElementById(this.element_id);
- this.$element = tmp ? $(tmp) : $(document.createElement(this.tag_name));
+ this.$element = tmp ? $(tmp) : $(document.createElement(this.tagName));
+ },
+ renderElement: function() {
+ var rendered = this.render();
+ if (rendered) {
+ var elem = $(rendered);
+ this.$element.replaceWith(elem);
+ this.$element = elem;
+ }
+ return this;
+ },
+ render: function (additional) {
+ if (this.template)
+ return openerp.web.qweb.render(this.template, _.extend({widget: this}, additional || {}));
+ return null;
}
});
@@ -1196,7 +1249,7 @@ openerp.web.TranslationDataBase = openerp.web.Class.extend(/** @lends openerp.we
if (translation_bundle.lang_parameters) {
this.parameters = translation_bundle.lang_parameters;
this.parameters.grouping = py.eval(
- this.parameters.grouping).toJSON();
+ this.parameters.grouping);
}
},
add_module_translation: function(mod) {
@@ -1244,7 +1297,7 @@ openerp.web._lt = function (s) {
return {toString: function () { return openerp.web._t(s); }}
};
openerp.web.qweb = new QWeb2.Engine();
-openerp.web.qweb.debug = (window.location.search.indexOf('?debug') !== -1);
+openerp.web.qweb.debug = ($.deparam($.param.querystring()).debug != undefined);
openerp.web.qweb.default_dict = {
'_' : _,
'_t' : openerp.web._t
@@ -1279,6 +1332,23 @@ openerp.web.qweb.preprocess_node = function() {
}
};
+/**
+ * A small utility function to check if a class implements correctly an interface, assuming that
+ * interface is simply specified using a dictionary containing methods and attributes with the
+ * correct type. It only performs the check when in debug mode and the only effect of an invalid
+ * check is messages in the console.
+ */
+openerp.web.check_interface = function(_class, _interface) {
+ if (! openerp.web.check_interface.debug)
+ return;
+ for (var member in _interface) {
+ if ( (typeof _class.prototype[member] != typeof _interface[member]) ) {
+ console.error("class failed to implement interface member '" + member + "'");
+ }
+ }
+}
+openerp.web.check_interface.debug = ($.deparam($.param.querystring()).debug != undefined);
+
/** Jquery extentions */
$.Mutex = (function() {
function Mutex() {
diff --git a/addons/web/static/src/js/data.js b/addons/web/static/src/js/data.js
index b3ed5b08280..a29a9c5ad36 100644
--- a/addons/web/static/src/js/data.js
+++ b/addons/web/static/src/js/data.js
@@ -1012,18 +1012,25 @@ openerp.web.BufferedDataSet = openerp.web.DataSetStatic.extend({
: (v1 > v2) ? 1
: 0;
};
- records.sort(function (a, b) {
- return _.reduce(sort_fields, function (acc, field) {
- if (acc) { return acc; }
-
- var sign = 1;
- if (field[0] === '-') {
- sign = -1;
- field = field.slice(1);
- }
- return sign * compare(a[field], b[field]);
- }, 0);
- });
+ // Array.sort is not necessarily stable. We must be careful with this because
+ // sorting an array where all items are considered equal is a worst-case that
+ // will randomize the array with an unstable sort! Therefore we must avoid
+ // sorting if there are no sort_fields (i.e. all items are considered equal)
+ // See also: http://ecma262-5.com/ELS5_Section_15.htm#Section_15.4.4.11
+ // http://code.google.com/p/v8/issues/detail?id=90
+ if (sort_fields.length) {
+ records.sort(function (a, b) {
+ return _.reduce(sort_fields, function (acc, field) {
+ if (acc) { return acc; }
+ var sign = 1;
+ if (field[0] === '-') {
+ sign = -1;
+ field = field.slice(1);
+ }
+ return sign * compare(a[field], b[field]);
+ }, 0);
+ });
+ }
completion.resolve(records);
};
if(to_get.length > 0) {
diff --git a/addons/web/static/src/js/data_import.js b/addons/web/static/src/js/data_import.js
index 83eea2cccbb..3054a7784c4 100644
--- a/addons/web/static/src/js/data_import.js
+++ b/addons/web/static/src/js/data_import.js
@@ -66,11 +66,11 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
this._super();
this.open({
buttons: [
- {text: _t("Close"), click: function() { self.stop(); }},
+ {text: _t("Close"), click: function() { self.destroy(); }},
{text: _t("Import File"), click: function() { self.do_import(); }, 'class': 'oe-dialog-import-button'}
],
close: function(event, ui) {
- self.stop();
+ self.destroy();
}
});
this.toggle_import_button(false);
@@ -151,7 +151,7 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
});
},
toggle_import_button: function (newstate) {
- this.$element.dialog('widget')
+ openerp.web.dialog(this.$element, 'widget')
.find('.oe-dialog-import-button')
.button('option', 'disabled', !newstate);
},
@@ -201,10 +201,10 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
return;
}
if (results['success']) {
- if (this.widget_parent.widget_parent.active_view == "list") {
- this.widget_parent.reload_content();
+ if (this.getParent().getParent().active_view == "list") {
+ this.getParent().reload_content();
}
- this.stop();
+ this.destroy();
return;
}
@@ -358,7 +358,7 @@ openerp.web.DataImport = openerp.web.Dialog.extend({
}
return true;
},
- stop: function() {
+ destroy: function() {
this.$element.remove();
this._super();
}
diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js
index 4fb576e4a90..53863e63e97 100644
--- a/addons/web/static/src/js/formats.js
+++ b/addons/web/static/src/js/formats.js
@@ -148,7 +148,7 @@ openerp.web.format_value = function (value, descriptor, value_if_empty) {
if (typeof(value) == "string")
value = openerp.web.auto_str_to_date(value);
return value.toString(normalize_format(l10n.time_format));
- case 'selection':
+ case 'selection': case 'statusbar':
// Each choice is [value, label]
if(_.isArray(value)) {
value = value[0]
@@ -336,7 +336,7 @@ openerp.web.format_cell = function (row_data, column, options) {
case 'progressbar':
return _.template(
'<progress value="<%-value%>" max="100"><%-value%>%</progress>', {
- value: row_data[column.id].value
+ value: _.str.sprintf("%.0f", row_data[column.id].value || 0)
});
}
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index b1ee33c4125..7263aa948e2 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -32,6 +32,8 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
this.hidden = !!hidden;
this.headless = this.hidden && !this.has_defaults;
+ this.filter_data = {};
+
this.ready = $.Deferred();
},
start: function() {
@@ -232,7 +234,7 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
context.add({"group_by": groupbys});
var dial_html = QWeb.render("SearchView.managed-filters.add");
var $dial = $(dial_html);
- $dial.dialog({
+ openerp.web.dialog($dial, {
modal: true,
title: _t("Filter Entry"),
buttons: [
@@ -263,10 +265,20 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
var filter = this.managed_filters[val];
this.do_clear(false).then(_.bind(function() {
select.val('get:' + val);
- var groupbys = _.map(filter.context.group_by.split(","), function(el) {
- return {"group_by": el};
- });
- this.on_search([filter.domain], [filter.context], groupbys);
+
+ var groupbys = [];
+ var group_by = filter.context.group_by;
+ if (group_by) {
+ groupbys = _.map(
+ group_by instanceof Array ? group_by : group_by.split(','),
+ function (el) { return { group_by: el }; });
+ }
+ this.filter_data = {
+ domains: [filter.domain],
+ contexts: [filter.context],
+ groupbys: groupbys
+ };
+ this.do_search();
}, this));
} else {
select.val('');
@@ -281,7 +293,7 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
selected_menu_id : menu.$element.find('a.active').data('menu')
}));
$dialog.find('input').val(this.fields_view.name);
- $dialog.dialog({
+ openerp.web.dialog($dialog, {
modal: true,
title: _t("Add to Dashboard"),
buttons: [
@@ -303,10 +315,10 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
});
self.rpc('/web/searchview/add_to_dashboard', {
menu_id: menu_id,
- action_id: self.widget_parent.action.id,
+ action_id: self.getParent().action.id,
context_to_save: context,
domain: domain,
- view_mode: self.widget_parent.active_view,
+ view_mode: self.getParent().active_view,
name: title
}, function(r) {
if (r === false) {
@@ -334,9 +346,6 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
if (this.headless && !this.has_defaults) {
return this.on_search([], [], []);
}
- // reset filters management
- var select = this.$element.find(".oe_search-view-filters-management");
- select.val("_filters");
if (e && e.preventDefault) { e.preventDefault(); }
@@ -380,6 +389,16 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
.map(function (filter) { return filter.get_context();})
.compact()
.value();
+
+ if (this.filter_data.contexts) {
+ contexts = this.filter_data.contexts.concat(contexts)
+ }
+ if (this.filter_data.domains) {
+ domains = this.filter_data.domains.concat(domains);
+ }
+ if (this.filter_data.groupbys) {
+ groupbys = this.filter_data.groupbys.concat(groupbys);
+ }
return {domains: domains, contexts: contexts, errors: errors, groupbys: groupbys};
},
/**
@@ -418,6 +437,9 @@ openerp.web.SearchView = openerp.web.OldWidget.extend(/** @lends openerp.web.Sea
* @param {Boolean} [reload_view=true]
*/
do_clear: function (reload_view) {
+ this.filter_data = {};
+ this.$element.find(".oe_search-view-filters-management").val('');
+
this.$element.find('.filter_label, .filter_icon').removeClass('enabled');
this.enabled_filters.splice(0);
var string = $('a.searchview_group_string');
@@ -552,7 +574,7 @@ openerp.web.search.Widget = openerp.web.OldWidget.extend( /** @lends openerp.web
* "Stops" the widgets. Called when the view destroys itself, this
* lets the widgets clean up after themselves.
*/
- stop: function () {
+ destroy: function () {
delete this.view;
this._super();
},
@@ -1114,7 +1136,7 @@ openerp.web.search.ExtendedSearch = openerp.web.search.Input.extend({
if(this.$element.closest("table.oe-searchview-render-line").css("display") == "none") {
return null;
}
- return _.reduce(this.widget_children,
+ return _.reduce(this.getChildren(),
function(mem, x) { return mem.concat(x.get_domain());}, []);
},
on_activate: function() {
@@ -1133,9 +1155,9 @@ openerp.web.search.ExtendedSearch = openerp.web.search.Input.extend({
}
},
check_last_element: function() {
- _.each(this.widget_children, function(x) {x.set_last_group(false);});
- if (this.widget_children.length >= 1) {
- this.widget_children[this.widget_children.length - 1].set_last_group(true);
+ _.each(this.getChildren(), function(x) {x.set_last_group(false);});
+ if (this.getChildren().length >= 1) {
+ this.getChildren()[this.getChildren().length - 1].set_last_group(true);
}
}
});
@@ -1148,7 +1170,7 @@ openerp.web.search.ExtendedSearchGroup = openerp.web.OldWidget.extend({
},
add_prop: function() {
var prop = new openerp.web.search.ExtendedSearchProposition(this, this.fields);
- var render = prop.render({'index': this.widget_children.length - 1});
+ var render = prop.render({'index': this.getChildren().length - 1});
this.$element.find('.searchview_extended_propositions_list').append(render);
prop.start();
},
@@ -1159,11 +1181,11 @@ openerp.web.search.ExtendedSearchGroup = openerp.web.OldWidget.extend({
_this.add_prop();
});
this.$element.find('.searchview_extended_delete_group').click(function () {
- _this.stop();
+ _this.destroy();
});
},
get_domain: function() {
- var props = _(this.widget_children).chain().map(function(x) {
+ var props = _(this.getChildren()).chain().map(function(x) {
return x.get_proposition();
}).compact().value();
var choice = this.$element.find(".searchview_extended_group_choice").val();
@@ -1172,10 +1194,10 @@ openerp.web.search.ExtendedSearchGroup = openerp.web.OldWidget.extend({
_.map(_.range(_.max([0,props.length - 1])), function() { return op; }),
props);
},
- stop: function() {
- var parent = this.widget_parent;
- if (this.widget_parent.widget_children.length == 1)
- this.widget_parent.hide();
+ destroy: function() {
+ var parent = this.getParent();
+ if (this.getParent().getChildren().length == 1)
+ this.getParent().hide();
this._super();
parent.check_last_element();
},
@@ -1210,16 +1232,16 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
_this.changed();
});
this.$element.find('.searchview_extended_delete_prop').click(function () {
- _this.stop();
+ _this.destroy();
});
},
- stop: function() {
+ destroy: function() {
var parent;
- if (this.widget_parent.widget_children.length == 1)
- parent = this.widget_parent;
+ if (this.getParent().getChildren().length == 1)
+ parent = this.getParent();
this._super();
if (parent)
- parent.stop();
+ parent.destroy();
},
changed: function() {
var nval = this.$element.find(".searchview_extended_prop_field").val();
@@ -1235,7 +1257,7 @@ openerp.web.search.ExtendedSearchProposition = openerp.web.OldWidget.extend(/**
select_field: function(field) {
var self = this;
if(this.attrs.selected != null) {
- this.value.stop();
+ this.value.destroy();
this.value = null;
this.$element.find('.searchview_extended_prop_op').html('');
}
diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js
index 0258509f172..2c0dc3d70b4 100644
--- a/addons/web/static/src/js/view_editor.js
+++ b/addons/web/static/src/js/view_editor.js
@@ -1002,10 +1002,10 @@ openerp.web.ViewEditor = openerp.web.OldWidget.extend({
$.when(action_manager.do_action(action)).then(function() {
var controller = action_manager.dialog_viewmanager.views['form'].controller;
controller.on_button_cancel.add_last(function(){
- action_manager.stop()
+ action_manager.destroy()
});
controller.do_save.add_last(function(){
- action_manager.stop();
+ action_manager.destroy();
var value =controller.fields.name.value;
self.add_node_dialog.$element.find('select[id=field_value]').append($("<option selected></option>").attr("value",value).text(value));
_.detect(self.add_widget,function(widget){
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 2a678bee393..7808c646a43 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -74,13 +74,13 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
}, this.on_loaded);
}
},
- stop: function() {
+ destroy: function() {
if (this.sidebar) {
- this.sidebar.attachments.stop();
- this.sidebar.stop();
+ this.sidebar.attachments.destroy();
+ this.sidebar.destroy();
}
_.each(this.widgets, function(w) {
- w.stop();
+ w.destroy();
});
this._super();
},
@@ -90,17 +90,23 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
},
on_loaded: function(data) {
var self = this;
- if (data) {
- this.fields_order = [];
- this.fields_view = data;
- var frame = new (this.registry.get_object('frame'))(this, this.fields_view.arch);
-
- this.rendered = QWeb.render(this.form_template, { 'frame': frame, 'widget': this });
+ if (!data) {
+ throw "No data provided.";
+ }
+ if (this.root_frame) {
+ throw "Form view does not support multiple calls to on_loaded";
}
+ this.fields_order = [];
+ this.fields_view = data;
+
+ this.rendered = QWeb.render(this.form_template, {'widget': this});
this.$element.html(this.rendered);
- _.each(this.widgets, function(w) {
- w.start();
- });
+
+ this.root_frame = instanciate_widget(this.registry.get_object('frame'), this, this.fields_view.arch);
+ var to_append = $(".oe_form_header", this.$element);
+ this.root_frame.appendTo(to_append.length > 0 ? to_append : this.$element);
+ this.root_frame.$element.children().unwrap();
+
this.$form_header = this.$element.find('.oe_form_header:first');
this.$form_header.find('div.oe_form_pager button[data-pager-action]').click(function() {
var action = $(this).data('pager-action');
@@ -205,7 +211,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
if (self.sidebar) {
self.sidebar.attachments.do_update();
}
- if (self.default_focus_field && !self.embedded_view) {
+ if (self.default_focus_field) {
self.default_focus_field.focus();
}
if (record.id) {
@@ -418,7 +424,7 @@ openerp.web.FormView = openerp.web.View.extend( /** @lends openerp.web.FormView#
this.on_form_changed();
}
if (!_.isEmpty(result.warning)) {
- $(QWeb.render("CrashManagerWarning", result.warning)).dialog({
+ openerp.web.dialog($(QWeb.render("CrashManagerWarning", result.warning)), {
modal: true,
buttons: [
{text: _t("Ok"), click: function() { $(this).dialog("close"); }}
@@ -879,7 +885,7 @@ openerp.web.form.compute_domain = function(expr, fields) {
};
openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.form.Widget# */{
- template: 'Widget',
+ form_template: 'Widget',
/**
* @constructs openerp.web.form.Widget
* @extends openerp.web.OldWidget
@@ -894,13 +900,9 @@ openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.fo
this.always_invisible = (this.modifiers.invisible && this.modifiers.invisible === true);
this.type = this.type || node.tag;
this.element_name = this.element_name || this.type;
- this.element_class = [
- 'formview', this.view.view_id, this.element_name,
- this.view.widgets_counter++].join("_");
this._super(view);
- this.view.widgets[this.element_class] = this;
this.children = node.children;
this.colspan = parseInt(node.attrs.colspan || 1, 10);
this.decrease_max_width = 0;
@@ -919,14 +921,9 @@ openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.fo
this.align = 'center';
}
-
this.width = this.node.attrs.width;
},
- start: function() {
- this.$element = this.view.$element.find(
- '.' + this.element_class.replace(/[^\r\n\f0-9A-Za-z_-]/g, "\\$&"));
- },
- stop: function() {
+ destroy: function() {
this._super.apply(this, arguments);
$.fn.tipsy.clear();
},
@@ -939,9 +936,8 @@ openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.fo
update_dom: function() {
this.$element.toggle(!this.invisible);
},
- render: function() {
- var template = this.template;
- return QWeb.render(template, { "widget": this });
+ renderElement: function() {
+ this.$element.html(QWeb.render(this.form_template, { "widget": this }));
},
do_attach_tooltip: function(widget, trigger, options) {
widget = widget || this;
@@ -951,7 +947,7 @@ openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.fo
delayOut: 0,
fade: true,
title: function() {
- var template = widget.template + '.tooltip';
+ var template = widget.form_template + '.tooltip';
if (!QWeb.has_template(template)) {
template = 'WidgetLabel.tooltip';
}
@@ -1016,7 +1012,7 @@ openerp.web.form.Widget = openerp.web.OldWidget.extend(/** @lends openerp.web.fo
});
openerp.web.form.WidgetFrame = openerp.web.form.Widget.extend({
- template: 'WidgetFrame',
+ form_template: 'WidgetFrame',
init: function(view, node) {
this._super(view, node);
this.columns = parseInt(node.attrs.col || 4, 10);
@@ -1034,6 +1030,23 @@ openerp.web.form.WidgetFrame = openerp.web.form.Widget.extend({
}
this.set_row_cells_with(this.table[this.table.length - 1]);
},
+ renderElement: function() {
+ this._super();
+ var self = this;
+ _.each(this.table, function(row) {
+ _.each(row, function(td) {
+ td.$element = self.$element.find('.' + td.element_class);
+ td.renderElement();
+ });
+ });
+ },
+ start: function() {
+ _.each(this.table, function(row) {
+ _.each(row, function(td) {
+ td.start();
+ });
+ });
+ },
add_row: function(){
if (this.table.length) {
this.set_row_cells_with(this.table[this.table.length - 1]);
@@ -1081,14 +1094,14 @@ openerp.web.form.WidgetFrame = openerp.web.form.Widget.extend({
node.attrs.nolabel = '1';
}
}
- var widget = new (this.view.registry.get_any(
- [node.attrs.widget, type.type, node.tag])) (this.view, node);
+ var widget = instanciate_widget(this.view.registry.get_any(
+ [node.attrs.widget, type.type, node.tag]), this.view, node);
if (node.tag == 'field') {
if (!this.view.default_focus_field || node.attrs.default_focus == '1') {
this.view.default_focus_field = widget;
}
if (node.attrs.nolabel != '1') {
- var label = new (this.view.registry.get_object('label')) (this.view, node);
+ var label = instanciate_widget(this.view.registry.get_object('label'), this.view, node);
label["for"] = widget;
this.add_widget(label, widget.colspan + 1);
}
@@ -1110,23 +1123,31 @@ openerp.web.form.WidgetFrame = openerp.web.form.Widget.extend({
});
openerp.web.form.WidgetGroup = openerp.web.form.WidgetFrame.extend({
- template: 'WidgetGroup'
+ form_template: 'WidgetGroup'
}),
openerp.web.form.WidgetNotebook = openerp.web.form.Widget.extend({
- template: 'WidgetNotebook',
+ form_template: 'WidgetNotebook',
init: function(view, node) {
this._super(view, node);
this.pages = [];
for (var i = 0; i < node.children.length; i++) {
var n = node.children[i];
if (n.tag == "page") {
- var page = new (this.view.registry.get_object('notebookpage'))(
+ var page = instanciate_widget(this.view.registry.get_object('notebookpage'),
this.view, n, this, this.pages.length);
this.pages.push(page);
}
}
},
+ renderElement: function() {
+ this._super();
+ var self = this;
+ _.each(this.pages, function(page) {
+ page.$element = self.$element.find('.' + page.element_class);
+ page.renderElement();
+ });
+ },
start: function() {
var self = this;
this._super.apply(this, arguments);
@@ -1146,6 +1167,9 @@ openerp.web.form.WidgetNotebook = openerp.web.form.Widget.extend({
gravity: 's'
});
}
+ _.each(this.pages, function(page) {
+ page.start();
+ });
},
do_select_first_visible_tab: function() {
for (var i = 0; i < this.pages.length; i++) {
@@ -1159,7 +1183,7 @@ openerp.web.form.WidgetNotebook = openerp.web.form.Widget.extend({
});
openerp.web.form.WidgetNotebookPage = openerp.web.form.WidgetFrame.extend({
- template: 'WidgetNotebookPage',
+ form_template: 'WidgetNotebookPage',
init: function(view, node, notebook, index) {
this.notebook = notebook;
this.index = index;
@@ -1181,7 +1205,7 @@ openerp.web.form.WidgetNotebookPage = openerp.web.form.WidgetFrame.extend({
});
openerp.web.form.WidgetSeparator = openerp.web.form.Widget.extend({
- template: 'WidgetSeparator',
+ form_template: 'WidgetSeparator',
init: function(view, node) {
this._super(view, node);
this.orientation = node.attrs.orientation || 'horizontal';
@@ -1193,7 +1217,7 @@ openerp.web.form.WidgetSeparator = openerp.web.form.Widget.extend({
});
openerp.web.form.WidgetButton = openerp.web.form.Widget.extend({
- template: 'WidgetButton',
+ form_template: 'WidgetButton',
init: function(view, node) {
this._super(view, node);
this.force_disabled = false;
@@ -1227,7 +1251,7 @@ openerp.web.form.WidgetButton = openerp.web.form.Widget.extend({
var exec_action = function() {
if (self.node.attrs.confirm) {
var def = $.Deferred();
- var dialog = $('<div>' + self.node.attrs.confirm + '</div>').dialog({
+ var dialog = openerp.web.dialog($('<div>' + self.node.attrs.confirm + '</div>'), {
title: _t('Confirm'),
modal: true,
buttons: [
@@ -1283,7 +1307,7 @@ openerp.web.form.WidgetButton = openerp.web.form.Widget.extend({
});
openerp.web.form.WidgetLabel = openerp.web.form.Widget.extend({
- template: 'WidgetLabel',
+ form_template: 'WidgetLabel',
init: function(view, node) {
this.element_name = 'label_' + node.attrs.name;
@@ -1295,7 +1319,7 @@ openerp.web.form.WidgetLabel = openerp.web.form.Widget.extend({
}
if (this.node.tag == 'label' && (this.align === 'left' || this.node.attrs.colspan || (this.string && this.string.length > 32))) {
- this.template = "WidgetParagraph";
+ this.form_template = "WidgetParagraph";
this.colspan = parseInt(this.node.attrs.colspan || 1, 10);
// Widgets default to right-aligned, but paragraph defaults to
// left-aligned
@@ -1311,12 +1335,15 @@ openerp.web.form.WidgetLabel = openerp.web.form.Widget.extend({
this.nowrap = true;
}
},
- render: function () {
+ renderElement: function() {
+ var rendered;
if (this['for'] && this.type !== 'label') {
- return QWeb.render(this.template, {widget: this['for']});
+ rendered = QWeb.render(this.form_template, {widget: this['for']});
+ } else {
+ // Actual label widgets should not have a false and have type label
+ rendered = QWeb.render(this.form_template, {widget: this});
}
- // Actual label widgets should not have a false and have type label
- return QWeb.render(this.template, {widget: this});
+ this.$element.html(rendered);
},
start: function() {
this._super();
@@ -1332,6 +1359,58 @@ openerp.web.form.WidgetLabel = openerp.web.form.Widget.extend({
}
});
+/**
+ * Interface to be implemented by fields.
+ *
+ * Novajs Attributes:
+ * - ...
+ *
+ * Novajs Events:
+ * - ...
+ *
+ */
+openerp.web.form.FieldInterface = {
+ /**
+ * Called by the form view to indicate the value of the field.
+ *
+ * set_value() may return an object that can be passed to $.when() that represents the moment when
+ * the field has finished all operations necessary before the user can effectively use the widget.
+ *
+ * Multiple calls to set_value() can occur at any time and must be handled correctly by the implementation,
+ * regardless of any asynchronous operation currently running and the status of any promise that a
+ * previous call to set_value() could have returned.
+ *
+ * set_value() must be able, at any moment, to handle the syntax returned by the "read" method of the
+ * osv class in the OpenERP server as well as the syntax used by the set_value() (see below). It must
+ * also be able to handle any other format commonly used in the _defaults key on the models in the addons
+ * as well as any format commonly returned in a on_change. It must be able to autodetect those formats as
+ * no information is ever given to know which format is used.
+ */
+ set_value: function(value) {},
+ /**
+ * Get the current value of the widget.
+ *
+ * Must always return a syntaxically correct value to be passed to the "write" method of the osv class in
+ * the OpenERP server, although it is not assumed to respect the constraints applied to the field.
+ * For example if the field is marqued as "required", a call to get_value() can return false.
+ *
+ * get_value() can also be called *before* a call to set_value() and, in that case, is supposed to
+ * return a defaut value according to the type of field.
+ *
+ * This method is always assumed to perform synchronously, it can not return a promise.
+ *
+ * If there was no user interaction to modify the value of the field, it is always assumed that
+ * get_value() return the same semantic value than the one passed in the last call to set_value(),
+ * altough the syntax can be different. This can be the case for type of fields that have a different
+ * syntax for "read" and "write" (example: m2o: set_value([0, "Administrator"]), get_value() => 0).
+ */
+ get_value: function() {},
+};
+
+/**
+ * Abstract class for classes implementing FieldInterface. Should be renamed to AbstractField some
+ * day.
+ */
openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.form.Field# */{
/**
* @constructs openerp.web.form.Field
@@ -1448,7 +1527,7 @@ openerp.web.form.Field = openerp.web.form.Widget.extend(/** @lends openerp.web.f
});
openerp.web.form.FieldChar = openerp.web.form.Field.extend({
- template: 'FieldChar',
+ form_template: 'FieldChar',
init: function (view, node) {
this._super(view, node);
this.password = this.node.attrs.password === 'True' || this.node.attrs.password === '1';
@@ -1493,7 +1572,7 @@ openerp.web.form.FieldID = openerp.web.form.FieldChar.extend({
});
openerp.web.form.FieldEmail = openerp.web.form.FieldChar.extend({
- template: 'FieldEmail',
+ form_template: 'FieldEmail',
start: function() {
this._super.apply(this, arguments);
this.$element.find('button').click(this.on_button_clicked);
@@ -1508,7 +1587,7 @@ openerp.web.form.FieldEmail = openerp.web.form.FieldChar.extend({
});
openerp.web.form.FieldUrl = openerp.web.form.FieldChar.extend({
- template: 'FieldUrl',
+ form_template: 'FieldUrl',
start: function() {
this._super.apply(this, arguments);
this.$element.find('button').click(this.on_button_clicked);
@@ -1526,16 +1605,11 @@ openerp.web.form.FieldFloat = openerp.web.form.FieldChar.extend({
init: function (view, node) {
this._super(view, node);
if (node.attrs.digits) {
- this.parse_digits(node.attrs.digits);
+ this.digits = py.eval(node.attrs.digits).toJSON();
} else {
this.digits = view.fields_view.fields[node.attrs.name].digits;
}
},
- parse_digits: function (digits_attr) {
- // could use a Python parser instead.
- var match = /^\s*[\(\[](\d+),\s*(\d+)/.exec(digits_attr);
- return [parseInt(match[1], 10), parseInt(match[2], 10)];
- },
set_value: function(value) {
if (value === false || value === undefined) {
// As in GTK client, floats default to 0
@@ -1631,7 +1705,7 @@ openerp.web.DateWidget = openerp.web.DateTimeWidget.extend({
});
openerp.web.form.FieldDatetime = openerp.web.form.Field.extend({
- template: "EmptyComponent",
+ form_template: "EmptyComponent",
build_widget: function() {
return new openerp.web.DateTimeWidget(this);
},
@@ -1668,7 +1742,7 @@ openerp.web.form.FieldDate = openerp.web.form.FieldDatetime.extend({
});
openerp.web.form.FieldText = openerp.web.form.Field.extend({
- template: 'FieldText',
+ form_template: 'FieldText',
start: function() {
this._super.apply(this, arguments);
this.$element.find('textarea').change(this.on_ui_change);
@@ -1729,7 +1803,7 @@ openerp.web.form.FieldText = openerp.web.form.Field.extend({
});
openerp.web.form.FieldBoolean = openerp.web.form.Field.extend({
- template: 'FieldBoolean',
+ form_template: 'FieldBoolean',
start: function() {
var self = this;
this._super.apply(this, arguments);
@@ -1753,7 +1827,7 @@ openerp.web.form.FieldBoolean = openerp.web.form.Field.extend({
});
openerp.web.form.FieldProgressBar = openerp.web.form.Field.extend({
- template: 'FieldProgressBar',
+ form_template: 'FieldProgressBar',
start: function() {
this._super.apply(this, arguments);
this.$element.find('div').progressbar({
@@ -1777,7 +1851,7 @@ openerp.web.form.FieldTextXml = openerp.web.form.Field.extend({
});
openerp.web.form.FieldSelection = openerp.web.form.Field.extend({
- template: 'FieldSelection',
+ form_template: 'FieldSelection',
init: function(view, node) {
var self = this;
this._super(view, node);
@@ -1883,7 +1957,7 @@ openerp.web.form.dialog = function(content, options) {
};
openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
- template: 'FieldMany2One',
+ form_template: 'FieldMany2One',
init: function(view, node) {
this._super(view, node);
this.limit = 7;
@@ -1912,9 +1986,13 @@ openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
$cmenu.append(QWeb.render("FieldMany2One.context_menu", {widget: self}));
var bindings = {};
bindings[self.cm_id + "_search"] = function() {
+ if (self.readonly)
+ return;
self._search_create_popup("search");
};
bindings[self.cm_id + "_create"] = function() {
+ if (self.readonly)
+ return;
self._search_create_popup("form");
};
bindings[self.cm_id + "_open"] = function() {
@@ -2019,6 +2097,7 @@ openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
minLength: 0,
delay: 0
});
+ this.$input.autocomplete("widget").addClass("openerp");
// used to correct a bug when selecting an element by pushing 'enter' in an editable list
this.$input.keyup(function(e) {
if (e.which === 13) {
@@ -2201,6 +2280,7 @@ openerp.web.form.FieldMany2One = openerp.web.form.Field.extend({
this.$input.prop('readonly', this.readonly);
}
});
+openerp.web.check_interface(openerp.web.form.FieldMany2One, openerp.web.form.FieldInterface);
/*
# Values: (0, 0, { fields }) create
@@ -2248,7 +2328,7 @@ var commands = {
}
};
openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
- template: 'FieldOne2Many',
+ form_template: 'FieldOne2Many',
multi_selection: false,
init: function(view, node) {
this._super(view, node);
@@ -2522,7 +2602,7 @@ openerp.web.form.FieldOne2Many = openerp.web.form.Field.extend({
this.previous_readonly = this.readonly;
if (this.viewmanager) {
this.is_loaded = this.is_loaded.pipe(function() {
- self.viewmanager.stop();
+ self.viewmanager.destroy();
return $.when(self.load_views()).then(function() {
self.reload_current_view();
});
@@ -2622,7 +2702,7 @@ openerp.web.form.One2ManyFormView = openerp.web.FormView.extend({
});
openerp.web.form.FieldMany2Many = openerp.web.form.Field.extend({
- template: 'FieldMany2Many',
+ form_template: 'FieldMany2Many',
multi_selection: false,
init: function(view, node) {
this._super(view, node);
@@ -2702,7 +2782,7 @@ openerp.web.form.FieldMany2Many = openerp.web.form.Field.extend({
this.previous_readonly = this.readonly;
if (this.list_view) {
this.is_loaded = this.is_loaded.pipe(function() {
- self.list_view.stop();
+ self.list_view.destroy();
return $.when(self.load_view()).then(function() {
self.reload_content();
});
@@ -2750,7 +2830,7 @@ openerp.web.form.Many2ManyListView = openerp.web.ListView.extend(/** @lends open
var pop = new openerp.web.form.FormOpenPopup(this);
pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {
title: _t("Open: ") + this.name,
- readonly: this.widget_parent.is_readonly()
+ readonly: this.getParent().is_readonly()
});
pop.on_write_completed.add_last(function() {
self.reload_content();
@@ -2787,7 +2867,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
}, read_function: null});
this.initial_ids = this.options.initial_ids;
this.created_elements = [];
- this.render_element();
+ this.renderElement();
openerp.web.form.dialog(this.$element, {
close: function() {
self.check_exit();
@@ -2831,10 +2911,14 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
this.new_object();
}
},
+ stop: function () {
+ this.$element.dialog('close');
+ this._super();
+ },
setup_search_view: function(search_defaults) {
var self = this;
if (this.searchview) {
- this.searchview.stop();
+ this.searchview.destroy();
}
this.searchview = new openerp.web.SearchView(this,
this.dataset, false, search_defaults);
@@ -2864,7 +2948,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
$buttons.prepend(QWeb.render("SelectCreatePopup.search.buttons"));
var $cbutton = $buttons.find(".oe_selectcreatepopup-search-close");
$cbutton.click(function() {
- self.stop();
+ self.destroy();
});
var $sbutton = $buttons.find(".oe_selectcreatepopup-search-select");
if(self.options.disable_multiple_selection) {
@@ -2872,7 +2956,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
}
$sbutton.click(function() {
self.on_select_elements(self.selected_ids);
- self.stop();
+ self.destroy();
});
});
});
@@ -2956,7 +3040,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
if (this.created_elements.length > 0) {
this.on_select_elements(this.created_elements);
}
- this.stop();
+ this.destroy();
},
on_default_get: function(res) {}
});
@@ -2967,7 +3051,7 @@ openerp.web.form.SelectCreateListView = openerp.web.ListView.extend({
},
select_record: function(index) {
this.popup.on_select_elements([this.dataset.ids[index]]);
- this.popup.stop();
+ this.popup.destroy();
},
do_select: function(ids, records) {
this._super(ids, records);
@@ -2996,8 +3080,8 @@ openerp.web.form.FormOpenPopup = openerp.web.OldWidget.extend(/** @lends openerp
this.row_id = row_id;
this.context = context || {};
this.options = _.defaults(options || {}, {"auto_write": true});
- this.render_element();
- this.$element.dialog({
+ this.renderElement();
+ openerp.web.dialog(this.$element, {
title: options.title || '',
modal: true,
width: 960,
@@ -3043,12 +3127,12 @@ openerp.web.form.FormOpenPopup = openerp.web.OldWidget.extend(/** @lends openerp
var $nbutton = $buttons.find(".oe_formopenpopup-form-save");
$nbutton.click(function() {
self.view_form.do_save().then(function() {
- self.stop();
+ self.destroy();
});
});
var $cbutton = $buttons.find(".oe_formopenpopup-form-close");
$cbutton.click(function() {
- self.stop();
+ self.destroy();
});
if (self.options.readonly) {
$nbutton.hide();
@@ -3071,7 +3155,7 @@ openerp.web.form.FormOpenDataset = openerp.web.ProxyDataSet.extend({
});
openerp.web.form.FieldReference = openerp.web.form.Field.extend({
- template: 'FieldReference',
+ form_template: 'FieldReference',
init: function(view, node) {
this._super(view, node);
this.fields_view = {
@@ -3086,7 +3170,7 @@ openerp.web.form.FieldReference = openerp.web.form.Field.extend({
};
this.get_fields_values = view.get_fields_values;
this.get_selected_ids = view.get_selected_ids;
- this.do_onchange = this.on_form_changed = this.on_nop;
+ this.do_onchange = this.on_form_changed = this.do_notify_change = this.on_nop;
this.dataset = this.view.dataset;
this.widgets_counter = 0;
this.view_id = 'reference_' + _.uniqueId();
@@ -3117,7 +3201,11 @@ openerp.web.form.FieldReference = openerp.web.form.Field.extend({
},
start: function() {
this._super();
+ this.selection.$element = $(".oe_form_view_reference_selection", this.$element);
+ this.selection.renderElement();
this.selection.start();
+ this.m2o.$element = $(".oe_form_view_reference_m2o", this.$element);
+ this.m2o.renderElement();
this.m2o.start();
},
is_valid: function() {
@@ -3226,7 +3314,7 @@ openerp.web.form.FieldBinary = openerp.web.form.Field.extend({
});
openerp.web.form.FieldBinaryFile = openerp.web.form.FieldBinary.extend({
- template: 'FieldBinaryFile',
+ form_template: 'FieldBinaryFile',
update_dom: function() {
this._super.apply(this, arguments);
this.$element.find('.oe-binary-file-set, .oe-binary-file-clear').toggle(!this.readonly);
@@ -3264,7 +3352,7 @@ openerp.web.form.FieldBinaryFile = openerp.web.form.FieldBinary.extend({
});
openerp.web.form.FieldBinaryImage = openerp.web.form.FieldBinary.extend({
- template: 'FieldBinaryImage',
+ form_template: 'FieldBinaryImage',
start: function() {
this._super.apply(this, arguments);
this.$image = this.$element.find('img.oe-binary-image');
@@ -3276,8 +3364,14 @@ openerp.web.form.FieldBinaryImage = openerp.web.form.FieldBinary.extend({
set_value: function(value) {
this._super.apply(this, arguments);
this.set_image_maxwidth();
- var url = '/web/binary/image?session_id=' + this.session.session_id + '&model=' +
- this.view.dataset.model +'&id=' + (this.view.datarecord.id || '') + '&field=' + this.name + '&t=' + (new Date().getTime());
+
+ var url;
+ if (value && value.substr(0, 10).indexOf(' ') == -1) {
+ url = 'data:image/png;base64,' + this.value;
+ } else {
+ url = '/web/binary/image?session_id=' + this.session.session_id + '&model=' +
+ this.view.dataset.model +'&id=' + (this.view.datarecord.id || '') + '&field=' + this.name + '&t=' + (new Date().getTime());
+ }
this.$image.attr('src', url);
},
set_image_maxwidth: function() {
@@ -3299,7 +3393,7 @@ openerp.web.form.FieldBinaryImage = openerp.web.form.FieldBinary.extend({
});
openerp.web.form.FieldStatus = openerp.web.form.Field.extend({
- template: "EmptyComponent",
+ form_template: "EmptyComponent",
start: function() {
this._super();
this.selected_value = null;
@@ -3364,10 +3458,11 @@ openerp.web.form.FieldStatus = openerp.web.form.Field.extend({
});
openerp.web.form.WidgetHtml = openerp.web.form.Widget.extend({
- render: function () {
+ renderElement: function () {
var $root = $('<div class="oe_form_html_view">');
this.render_children(this, $root);
- return $root.html();
+ var rendered = $root.html();
+ this.$element.html(rendered);
},
render_children: function (object, $into) {
var self = this,
@@ -3376,10 +3471,9 @@ openerp.web.form.WidgetHtml = openerp.web.form.Widget.extend({
if (typeof child === 'string') {
$into.text(child);
} else if (child.tag === 'field') {
- $into.append(
- new (self.view.registry.get_object('frame'))(
- self.view, {tag: 'ueule', attrs: {}, children: [child] })
- .render());
+ var widget = instanciate_widget(self.view.registry.get_object('frame'),
+ self.view, {tag: 'ueule', attrs: {}, children: [child] });
+ widget.appendTo($into);
} else {
var $child = $(document.createElement(child.tag))
.attr(child.attrs)
@@ -3426,6 +3520,14 @@ openerp.web.form.widgets = new openerp.web.Registry({
'html': 'openerp.web.form.WidgetHtml'
});
+var instanciate_widget = function(claz, view, node, o1, o2) {
+ var widget = new (claz)(view, node, o1, o2);
+ widget.element_class = (['formview', view.view_id, widget.element_name,
+ view.widgets_counter++].join("_")).replace(/[^\r\n\f0-9A-Za-z_-]/g, "_");
+ view.widgets[widget.element_class] = widget;
+ return widget;
+}
+
};
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 8d8e342370e..e8fff450c6e 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -96,7 +96,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
if (this._limit === undefined) {
this._limit = (this.options.limit
|| this.defaults.limit
- || (this.widget_parent.action || {}).limit
+ || (this.getParent().action || {}).limit
|| 80);
}
return this._limit;
@@ -158,7 +158,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
var pair = this.colors[i],
color = pair[0],
expression = pair[1];
- if (py.evaluate(expression, _.extend({bool: py.bool}, context))) {
+ if (py.evaluate(expression, context).toJSON()) {
return 'color: ' + color + ';';
}
// TODO: handle evaluation errors
@@ -291,7 +291,10 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
*/
configure_pager: function (dataset) {
this.dataset.ids = dataset.ids;
- this.dataset._length = dataset._length;
+ // Not exactly clean
+ if (dataset._length) {
+ this.dataset._length = dataset._length;
+ }
var limit = this.limit(),
total = dataset.size(),
@@ -360,7 +363,7 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
_(this.fields_view.arch.children).map(field_to_column));
if (grouped) {
this.columns.unshift({
- id: '_group', tag: '', string: "Group", meta: true,
+ id: '_group', tag: '', string: _t("Group"), meta: true,
modifiers_for: function () { return {}; }
}, {
id: '_count', tag: '', string: '#', meta: true,
@@ -541,19 +544,17 @@ openerp.web.ListView = openerp.web.View.extend( /** @lends openerp.web.ListView#
* @param {Array} records selected record values
*/
do_select: function (ids, records) {
- this.$element.find('.oe-list-delete')
- .attr('disabled', !ids.length);
- if (this.sidebar) {
- if (ids.length) {
- this.sidebar.do_unfold();
- } else {
- this.sidebar.do_fold();
- }
- }
- if (!records.length) {
+ this.$element.find('.oe-list-delete').attr('disabled', !ids.length);
+ if (!ids.length) {
+ this.dataset.index = 0;
+ if (this.sidebar) { this.sidebar.do_fold(); }
this.compute_aggregates();
return;
}
+
+ this.dataset.index = _(this.dataset.ids).indexOf(ids[0]);
+ if (this.sidebar) { this.sidebar.do_unfold(); }
+
this.compute_aggregates(_(records).map(function (record) {
return {count: 1, values: record};
}));
@@ -1260,9 +1261,11 @@ openerp.web.ListView.Groups = openerp.web.Class.extend( /** @lends openerp.web.L
if (column.meta) {
// do not do anything
} else if (column.id in group.aggregates) {
- var value = group.aggregates[column.id];
+ var r = {};
+ r[column.id] = {value: group.aggregates[column.id]};
$('<td class="oe-number">')
- .html(openerp.web.format_value(value, column))
+ .html(openerp.web.format_cell(
+ r, column, {process_modifiers: false}))
.appendTo($row);
} else {
$row.append('<td>');
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index c7222455889..b8699bcc006 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -139,7 +139,7 @@ openerp.web.list_editable = function (openerp) {
}
cancelled.then(function () {
self.view.unpad_columns();
- self.edition_form.stop();
+ self.edition_form.destroy();
self.edition_form.$element.remove();
delete self.edition_form;
delete self.edition_id;
@@ -235,26 +235,16 @@ openerp.web.list_editable = function (openerp) {
}
self.edition = true;
self.edition_id = record_id;
- self.edition_form = _.extend(new openerp.web.ListEditableFormView(self.view, self.dataset, false), {
- form_template: 'ListView.row.form',
- registry: openerp.web.list.form.widgets,
- $element: $new_row
- });
- // HA HA
- self.edition_form.appendTo();
+ self.edition_form = new openerp.web.ListEditableFormView(self.view, self.dataset, false);
+ self.edition_form.$element = $new_row;
+ self.edition_form.editable_list = self;
+ // HO HO
+ // empty
$.when(self.edition_form.on_loaded(self.get_form_fields_view())).then(function () {
// put in $.when just in case FormView.on_loaded becomes asynchronous
$new_row.find('> td')
- .addClass('oe-field-cell')
- .removeAttr('width')
.end()
.find('td:last').removeClass('oe-field-cell').end();
- if (self.options.selectable) {
- $new_row.prepend('<th>');
- }
- if (self.options.isClarkGable) {
- $new_row.prepend('<th>');
- }
// pad in case of groupby
_(self.columns).each(function (column) {
if (column.meta) {
@@ -383,7 +373,7 @@ openerp.web.list_editable = function (openerp) {
openerp.web.list.form = {};
}
openerp.web.list.form.WidgetFrame = openerp.web.form.WidgetFrame.extend({
- template: 'ListView.row.frame'
+ form_template: 'ListView.row.frame'
});
var form_widgets = openerp.web.form.widgets;
openerp.web.list.form.widgets = form_widgets.extend({
@@ -418,9 +408,10 @@ openerp.web.list_editable = function (openerp) {
});
openerp.web.ListEditableFormView = openerp.web.FormView.extend({
- init_view: function() {},
- _render_and_insert: function () {
- return this.start();
- }
+ form_template: 'ListView.row.form',
+ init: function() {
+ this._super.apply(this, arguments);
+ this.registry = openerp.web.list.form.widgets;
+ },
});
};
diff --git a/addons/web/static/src/js/view_page.js b/addons/web/static/src/js/view_page.js
index 33eabc63b3c..e3367f56b4a 100644
--- a/addons/web/static/src/js/view_page.js
+++ b/addons/web/static/src/js/view_page.js
@@ -68,13 +68,13 @@ openerp.web.page = function (openerp) {
openerp.web.page = {};
openerp.web.page.WidgetFrameReadonly = openerp.web.form.WidgetFrame.extend({
- template: 'WidgetFrame.readonly'
+ form_template: 'WidgetFrame.readonly'
});
openerp.web.page.FieldReadonly = openerp.web.form.Field.extend({
});
openerp.web.page.FieldCharReadonly = openerp.web.page.FieldReadonly.extend({
- template: 'FieldChar.readonly',
+ form_template: 'FieldChar.readonly',
init: function(view, node) {
this._super(view, node);
this.password = this.node.attrs.password === 'True' || this.node.attrs.password === '1';
@@ -89,13 +89,27 @@ openerp.web.page = function (openerp) {
return show_value;
}
});
+ openerp.web.page.FieldFloatReadonly = openerp.web.page.FieldCharReadonly.extend({
+ init: function (view, node) {
+ this._super(view, node);
+ if (node.attrs.digits) {
+ this.digits = py.eval(node.attrs.digits).toJSON();
+ } else {
+ this.digits = view.fields_view.fields[node.attrs.name].digits;
+ }
+ }
+ });
openerp.web.page.FieldURIReadonly = openerp.web.page.FieldCharReadonly.extend({
- template: 'FieldURI.readonly',
+ form_template: 'FieldURI.readonly',
scheme: null,
format_value: function (value) {
return value;
},
set_value: function (value) {
+ if (!value) {
+ this.$element.find('a').text('').attr('href', '#');
+ return;
+ }
this.$element.find('a')
.attr('href', this.scheme + ':' + value)
.text(this.format_value(value));
@@ -106,6 +120,10 @@ openerp.web.page = function (openerp) {
});
openerp.web.page.FieldUrlReadonly = openerp.web.page.FieldURIReadonly.extend({
set_value: function (value) {
+ if (!value) {
+ this.$element.find('a').text('').attr('href', '#');
+ return;
+ }
var s = /(\w+):(.+)/.exec(value);
if (!s) {
value = "http://" + value;
@@ -120,7 +138,7 @@ openerp.web.page = function (openerp) {
}
});
openerp.web.page.FieldSelectionReadonly = openerp.web.page.FieldReadonly.extend({
- template: 'FieldChar.readonly',
+ form_template: 'FieldChar.readonly',
init: function(view, node) {
// lifted straight from r/w version
var self = this;
@@ -225,7 +243,7 @@ openerp.web.page = function (openerp) {
}
});
openerp.web.page.FieldBinaryFileReadonly = openerp.web.form.FieldBinary.extend({
- template: 'FieldURI.readonly',
+ form_template: 'FieldURI.readonly',
start: function() {
this._super.apply(this, arguments);
var self = this;
@@ -261,7 +279,7 @@ openerp.web.page = function (openerp) {
'one2many_list' : 'openerp.web.page.FieldOne2ManyReadonly',
'reference': 'openerp.web.page.FieldReferenceReadonly',
'boolean': 'openerp.web.page.FieldBooleanReadonly',
- 'float': 'openerp.web.page.FieldCharReadonly',
+ 'float': 'openerp.web.page.FieldFloatReadonly',
'integer': 'openerp.web.page.FieldCharReadonly',
'float_time': 'openerp.web.page.FieldCharReadonly',
'binary': 'openerp.web.page.FieldBinaryFileReadonly',
diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js
index dea53793ffb..6039e4a0822 100644
--- a/addons/web/static/src/js/view_tree.js
+++ b/addons/web/static/src/js/view_tree.js
@@ -146,7 +146,7 @@ openerp.web.TreeView = openerp.web.View.extend(/** @lends openerp.web.TreeView#
var pair = this.colors[i],
color = pair[0],
expression = pair[1];
- if (py.evaluate(expression, _.extend({bool: py.bool}, context))) {
+ if (py.evaluate(expression, context).toJSON()) {
return 'color: ' + color + ';';
}
// TODO: handle evaluation errors
@@ -224,21 +224,25 @@ openerp.web.TreeView = openerp.web.View.extend(/** @lends openerp.web.TreeView#
active_model: self.dataset.model,
active_id: id,
active_ids: [id]};
- this.rpc('/web/treeview/action', {
+ return this.rpc('/web/treeview/action', {
id: id,
model: this.dataset.model,
context: new openerp.web.CompoundContext(
this.dataset.get_context(), local_context)
- }, function (actions) {
+ }).pipe(function (actions) {
if (!actions.length) { return; }
var action = actions[0][2];
var c = new openerp.web.CompoundContext(local_context);
if (action.context) {
c.add(action.context);
}
- action.context = c;
- self.do_action(action);
- });
+ return self.rpc('/web/session/eval_domain_and_context', {
+ contexts: [c], domains: []
+ }).pipe(function (res) {
+ action.context = res.context;
+ return self.do_action(action);
+ }, null);
+ }, null);
},
// show & hide the contents
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 56997190bc1..5be0fad74f0 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -30,31 +30,31 @@ session.web.ActionManager = session.web.OldWidget.extend({
},
dialog_stop: function () {
if (this.dialog) {
- this.dialog_viewmanager.stop();
+ this.dialog_viewmanager.destroy();
this.dialog_viewmanager = null;
- this.dialog.stop();
+ this.dialog.destroy();
this.dialog = null;
}
},
content_stop: function () {
if (this.inner_viewmanager) {
- this.inner_viewmanager.stop();
+ this.inner_viewmanager.destroy();
this.inner_viewmanager = null;
}
if (this.client_widget) {
- this.client_widget.stop();
+ this.client_widget.destroy();
this.client_widget = null;
}
},
do_push_state: function(state) {
- if (this.widget_parent && this.widget_parent.do_push_state) {
+ if (this.getParent() && this.getParent().do_push_state) {
if (this.inner_action) {
state['model'] = this.inner_action.res_model;
if (this.inner_action.id) {
state['action_id'] = this.inner_action.id;
}
}
- this.widget_parent.do_push_state(state);
+ this.getParent().do_push_state(state);
}
},
do_load_state: function(state, warm) {
@@ -65,6 +65,9 @@ session.web.ActionManager = session.web.OldWidget.extend({
if (run_action) {
this.null_action();
action_loaded = this.do_action(state.action_id);
+ session.webclient.menu.has_been_loaded.then(function() {
+ session.webclient.menu.open_action(state.action_id);
+ });
}
} else if (state.model && state.id) {
// TODO handle context & domain ?
@@ -142,7 +145,7 @@ session.web.ActionManager = session.web.OldWidget.extend({
if(on_close)
this.dialog.on_close.add(on_close);
} else {
- this.dialog_viewmanager.stop();
+ this.dialog_viewmanager.destroy();
}
this.dialog.dialog_title = action.name;
this.dialog_viewmanager = new session.web.ViewManagerAction(this, action);
@@ -150,7 +153,7 @@ session.web.ActionManager = session.web.OldWidget.extend({
this.dialog.open();
} else {
if(action.menu_id) {
- return this.widget_parent.do_action(action, function () {
+ return this.getParent().do_action(action, function () {
session.webclient.menu.open_menu(action.menu_id);
});
}
@@ -180,7 +183,7 @@ session.web.ActionManager = session.web.OldWidget.extend({
this.content_stop();
this.dialog_stop();
var ClientWidget = session.web.client_actions.get_object(action.tag);
- (this.client_widget = new ClientWidget(this, action.params)).appendTo(this);
+ (this.client_widget = new ClientWidget(this, action.params)).appendTo(this.$element);
},
ir_actions_report_xml: function(action, on_closed) {
var self = this;
@@ -209,7 +212,7 @@ session.web.ActionManager = session.web.OldWidget.extend({
window.open(action.url, action.target === 'self' ? '_self' : '_blank');
},
ir_ui_menu: function (action) {
- this.widget_parent.do_action(action);
+ this.getParent().do_action(action);
}
});
@@ -385,7 +388,7 @@ session.web.ViewManager = session.web.OldWidget.extend(/** @lends session.web.V
setup_search_view: function(view_id, search_defaults) {
var self = this;
if (this.searchview) {
- this.searchview.stop();
+ this.searchview.destroy();
}
this.searchview = new session.web.SearchView(
this, this.dataset,
@@ -408,6 +411,9 @@ session.web.ViewManager = session.web.OldWidget.extend(/** @lends session.web.V
var groupby = results.group_by.length
? results.group_by
: action_context.group_by;
+ if (_.isString(groupby)) {
+ groupby = [groupby];
+ }
controller.do_search(results.domain, results.context, groupby || []);
});
},
@@ -680,9 +686,9 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
});
},
do_push_state: function(state) {
- if (this.widget_parent && this.widget_parent.do_push_state) {
+ if (this.getParent() && this.getParent().do_push_state) {
state["view_type"] = this.active_view;
- this.widget_parent.do_push_state(state);
+ this.getParent().do_push_state(state);
}
},
do_load_state: function(state, warm) {
@@ -702,7 +708,7 @@ session.web.ViewManagerAction = session.web.ViewManager.extend(/** @lends oepner
},
shortcut_check : function(view) {
var self = this;
- var grandparent = this.widget_parent && this.widget_parent.widget_parent;
+ var grandparent = this.getParent() && this.getParent().getParent();
// display shortcuts if on the first view for the action
var $shortcut_toggle = this.$element.find('.oe-shortcut-toggle');
if (!this.action.name ||
@@ -796,8 +802,8 @@ session.web.Sidebar = session.web.OldWidget.extend({
},
add_default_sections: function() {
var self = this,
- view = this.widget_parent,
- view_manager = view.widget_parent,
+ view = this.getParent(),
+ view_manager = view.getParent(),
action = view_manager.action;
if (this.session.uid === 1) {
this.add_section(_t('Customize'), 'customize');
@@ -912,11 +918,11 @@ session.web.Sidebar = session.web.OldWidget.extend({
},
on_item_action_clicked: function(item) {
var self = this;
- self.widget_parent.sidebar_context().then(function (context) {
- var ids = self.widget_parent.get_selected_ids();
+ self.getParent().sidebar_context().then(function (context) {
+ var ids = self.getParent().get_selected_ids();
if (ids.length == 0) {
//TODO: make prettier warning?
- $("<div />").text(_t("You must choose at least one record.")).dialog({
+ openerp.web.dialog($("<div />").text(_t("You must choose at least one record.")), {
title: _t("Warning"),
modal: true
});
@@ -925,7 +931,7 @@ session.web.Sidebar = session.web.OldWidget.extend({
var additional_context = _.extend({
active_id: ids[0],
active_ids: ids,
- active_model: self.widget_parent.dataset.model
+ active_model: self.getParent().dataset.model
}, context);
self.rpc("/web/action/load", {
action_id: item.action.id,
@@ -937,7 +943,7 @@ session.web.Sidebar = session.web.OldWidget.extend({
result.result.flags.new_window = true;
self.do_action(result.result, function () {
// reload view
- self.widget_parent.reload();
+ self.getParent().reload();
});
});
});
@@ -1111,8 +1117,8 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
var self = this;
var result_handler = function () {
if (on_closed) { on_closed.apply(null, arguments); }
- if (self.widget_parent && self.widget_parent.on_action_executed) {
- return self.widget_parent.on_action_executed.apply(null, arguments);
+ if (self.getParent() && self.getParent().on_action_executed) {
+ return self.getParent().on_action_executed.apply(null, arguments);
}
};
var context = new session.web.CompoundContext(dataset.get_context(), action_data.context || {});
@@ -1184,8 +1190,8 @@ session.web.View = session.web.Widget.extend(/** @lends session.web.View# */{
this.$element.hide();
},
do_push_state: function(state) {
- if (this.widget_parent && this.widget_parent.do_push_state) {
- this.widget_parent.do_push_state(state);
+ if (this.getParent() && this.getParent().do_push_state) {
+ this.getParent().do_push_state(state);
}
},
do_load_state: function(state, warm) {
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 09ae4457221..c8a6762ab34 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -17,35 +17,24 @@
</div>
</div>
</t>
-<t t-name="Interface">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" class="main_table">
- <tr>
- <td colspan="2" valign="top">
- <div id="oe_header" class="header"></div>
- <div id="oe_menu" class="menu"></div>
- </td>
- </tr>
- <tr>
- <td colspan="2" valign="top" height="100%">
- <table cellspacing="0" cellpadding="0" border="0" height="100%" width="100%">
- <tr>
- <td valign="top" id="oe_secondary_menu" class="secondary_menu"></td>
- <td valign="top" class="oe-application-container">
- <div id="oe_app" class="oe-application">
- </div>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <div id="oe_footer" class="oe_footer">
- <p class="oe_footer_powered">Powered by <a href="http://www.openerp.com">OpenERP</a></p>
+<t t-name="WebClient">
+ <div class="oe_webclient">
+ <div class="oe_topbar">
+ <div class="oe_menu_placeholder"/>
+ <div class="oe_user_menu_placeholder"/>
+ <div class="oe_systray"/>
+ </div>
+ <div class="oe_leftbar">
+ <a href="#" class="oe_logo"><img t-att-src='_s + "/web/static/src/img/logo.png"'/></a>
+
+ <div class="oe_secondary_menus_container"/>
+
+ <div class="oe_footer">
+ Powered by <a href="http://www.openerp.com"><span>Open</span>ERP</a>
</div>
- </td>
- </tr>
- </table>
+ </div>
+ <div class="oe_application"/>
+ </div>
</t>
<t t-name="Loading">
<div id="oe_loading">
@@ -154,7 +143,7 @@
<option t-att-value="db"><t t-esc="db"/></option>
</t>
</select>
- <input t-if="!db_list" name="drop_db" class="required"
+ <input t-if="!db_list" name="backup_db" class="required"
type="text" autofocus="autofocus"/>
</td>
</tr>
@@ -335,81 +324,73 @@
<div id="oe_db_options" class="oe_db_options"></div>
</div>
</t>
-<t t-name="Header">
- <div>
- <a t-att-href="'/' + widget.qs" class="company_logo_link">
- <div class="company_logo" />
- </a>
- </div>
-</t>
-<t t-name="Header-content">
- <h1 class="header_title">
- <t t-esc="user.company_id[1]"/> (<t t-esc="widget.session.db"/>)<br/>
- <small class="username"><t t-esc="user.name"/></small>
- </h1>
- <div class="header_corner">
- <ul class="block">
- <li>
- <a t-att-href="'/' + widget.qs" title="Home" class="home"><img t-att-src='_s + "/web/static/src/img/header-home.png"' width="16" height="16" border="0"/></a>
- </li>
- <li class="preferences">
- <a href="javascript:void(0)" title="Preferences" class="preferences"><img t-att-src='_s + "/web/static/src/img/header-preferences.png"' width="16" height="16" border="0"/></a>
- </li>
- <li>
- <a href="javascript:void(0)" title="About" class="about"><img t-att-src='_s + "/web/static/src/img/header-about.png"' width="16" height="16" border="0"/></a>
- </li>
- </ul>
- <div class="block">
- <a href="javascript:void(0)" class="logout">LOGOUT</a>
- </div>
- </div>
- <div class="oe-shortcuts"> </div>
-</t>
-<ul t-name="Shortcuts">
- <li t-foreach="shortcuts" t-as="shortcut"
- t-att-data-id="shortcut.res_id"
- t-att-data-shortcut-id="shortcut.id"
- ><t t-esc="shortcut.name"/></li>
-</ul>
<t t-name="Menu">
- <table align="center">
- <tr>
- <td t-foreach="widget.data.data.children" t-as="menu">
- <a href="#" t-att-data-menu="menu.id">
- <t t-esc="menu.name"/>
- </a>
- </td>
- </tr>
- </table>
+ <ul class="oe_menu" t-if="widget.data">
+ <li t-foreach="widget.data.data.children" t-as="menu">
+ <t t-call="Menu.secondary.link"/>
+ </li>
+ </ul>
</t>
<t t-name="Menu.secondary">
- <div t-attf-class="oe_toggle_secondary_menu">
- <span class="oe_menu_fold" title="Fold menu"><t t-raw="'&amp;laquo;'"/></span>
- <span class="oe_menu_unfold" title="Unfold menu"><t t-raw="'&amp;raquo;'"/></span>
- </div>
<div t-foreach="widget.data.data.children" t-as="menu" style="display: none" class="oe_secondary_menu" t-att-data-menu-parent="menu.id">
<t t-foreach="menu.children" t-as="menu">
- <t t-set="classname" t-translation="off">oe_secondary_menu_item</t>
- <t t-set="level" t-value="0"/>
- <t t-call="Menu.secondary.children"/>
+ <div class="oe_secondary_menu_section">
+ <t t-esc="menu.name"/>
+ <!--
+ Shall the section be still clickable ?
+ <t t-call="Menu.secondary.link"/>
+ -->
+ </div>
+ <t t-call="Menu.secondary.submenu"/>
</t>
</div>
</t>
-<t t-name="Menu.secondary.children">
- <t t-set="level" t-value="level + 1"/>
- <a href="#" t-att-id="menu.children.length ? 'menu_' + menu.id : undefined"
- t-att-class="classname + (menu.children.length ? ' submenu' : ' leaf') + (menu_first and level == 1 ? ' opened' : '')"
- t-att-data-menu="menu.children.length ? undefined : menu.id">
- <span t-attf-style="padding-left: #{(level - 2) * 20}px"> <t t-esc="menu.name"/></span>
+<t t-name="Menu.secondary.submenu">
+ <ul t-if="menu.children.length" class="oe_secondary_submenu">
+ <li t-foreach="menu.children" t-as="menu">
+ <t t-call="Menu.secondary.link"/>
+ <!--<span class="oe_menu_label">8</span>-->
+ <t t-call="Menu.secondary.submenu"/>
+ </li>
+ </ul>
+</t>
+<t t-name="Menu.secondary.link">
+ <a href="#"
+ t-att-class="menu.children.length ? 'oe_menu_toggler' : 'oe_menu_leaf'"
+ t-att-data-menu="menu.id"
+ t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''"
+ t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''">
+ <t t-esc="menu.name"/>
</a>
- <div t-attf-class="oe_secondary_submenu" t-if="menu.children.length" t-att-style="menu_first and level == 1 ? undefined : 'display: none'">
- <t t-foreach="menu.children" t-as="menu">
- <t t-set="classname" t-translation="off">oe_secondary_submenu_item</t>
- <t t-call="Menu.secondary.children"/>
- </t>
- </div>
</t>
+
+<t t-name="UserMenu">
+ <ul class="oe_user_menu oe_topbar_item">
+ <li class="oe_dropdown">
+ <a href="#" class="oe_dropdown_toggle">
+ <img class="oe_topbar_avatar" t-att-data-default-src="_s + '/web/static/src/img/topbar-avatar.png'"/>
+ <span class="oe_topbar_name"/>
+ </a>
+ <ul class="oe_dropdown_options">
+ <!--<li><a href="#" data-menu="profile">Profile</a></li>-->
+ <li><a href="#" data-menu="settings">Settings</a></li>
+ <li><a href="#" data-menu="logout">Log out</a></li>
+ <li><hr/></li>
+ <li><a href="#" data-menu="about">About OpenERP</a></li>
+ <li><hr/></li>
+ </ul>
+ </li>
+ </ul>
+</t>
+<t t-name="UserMenu.shortcut">
+ <li t-foreach="shortcuts" t-as="shortcut">
+ <a href="#" data-menu="shortcut" t-att-data-id="shortcut.res_id" t-att-data-shortcut-id="shortcut.id">
+ <t t-esc="shortcut.name"/>
+ </a>
+ </li>
+</t>
+
<t t-name="ViewManager">
<table class="view-manager-main-table" cellpadding="0" cellspacing="0">
<tbody>
@@ -728,7 +709,8 @@
</td>
</tr>
<t t-name="ListView.row.form">
- <t t-raw="frame.render()"/>
+ <th t-if="widget.editable_list.options.selectable"></th>
+ <th t-if="widget.editable_list.options.isClarkGable"></th>
</t>
<t t-name="FormView">
@@ -743,7 +725,6 @@
</t>
</div>
</div>
- <t t-raw="frame.render()"/>
</t>
<t t-name="One2Many.formview" t-extend="FormView">
<t t-jquery=".oe_form_buttons" t-operation="inner">
@@ -892,7 +873,8 @@
</li>
</ul>
<t t-foreach="widget.pages" t-as="page">
- <t t-raw="page.render()"/>
+ <div t-att-class="page.element_class">
+ </div>
</t>
</t>
<t t-name="WidgetNotebook.tooltip">
@@ -909,9 +891,7 @@
</t>
</t>
<t t-name="WidgetNotebookPage">
- <div>
- <t t-call="WidgetFrame"/>
- </div>
+ <t t-call="WidgetFrame"/>
</t>
<t t-name="WidgetSeparator">
<div t-if="widget.orientation !== 'vertical'" t-att-class="'separator ' + widget.orientation">
@@ -1107,11 +1087,9 @@
<t t-name="FieldReference">
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="oe_frame oe_forms">
<tr>
- <td t-attf-class="oe_form_frame_cell oe_form_selection #{widget.selection.element_class}">
- <t t-raw="widget.selection.render()"/>
+ <td t-attf-class="oe_form_frame_cell oe_form_selection oe_form_view_reference_selection">
</td>
- <td t-attf-class="oe_form_frame_cell oe_form_many2one #{widget.m2o.element_class}" nowrap="true" style="display: none">
- <t t-raw="widget.m2o.render()"/>
+ <td t-attf-class="oe_form_frame_cell oe_form_many2one oe_form_view_reference_m2o" nowrap="true" style="display: none">
</td>
</tr>
</table>
@@ -1128,7 +1106,7 @@
</div>
</t>
<t t-name="FieldBinaryImage">
- <table cellpadding="0" cellspacing="0" border="0">
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="center">
<img t-att-src='_s + "/web/static/src/img/placeholder.png"' class="oe-binary-image"
@@ -1523,21 +1501,20 @@
<td t-if="edited and !options.deletable" class="oe-listview-padding"/>
</t>
</t>
-<t t-name="ListView.row.frame" t-extend="WidgetFrame">
- <t t-jquery="tr">
- $(document.createElement('t'))
- .append(this.contents())
- .attr({
- 't-foreach': this.attr('t-foreach'),
- 't-as': this.attr('t-as')
- })
- .replaceAll(this)
- .after($(document.createElement('td')).append(
- $(document.createElement('button')).attr({
- 'class': 'oe-edit-row-save', 'type': 'button'})
- .html(' ')))
- .unwrap();
+<t t-name="ListView.row.frame">
+ <t t-foreach="widget.table" t-as="row">
+ <t t-foreach="row" t-as="td">
+ <td t-att-colspan="td.colspan gt 1 ? td.colspan : undefined"
+ t-att-valign="td.table ? 'top' : undefined"
+ t-attf-class="oe_form_frame_cell #{td.classname} #{td.element_class} oe-field-cell"
+ >
+ <t t-raw="td.render()"/>
+ </td>
+ </t>
</t>
+ <td>
+ <button class="oe-edit-row-save" type="button"> </button>
+ </td>
</t>
<t t-name="view_editor">
<table class="oe_view_editor">