summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-07-11 13:29:59 +0200
committerXavier Morel <xmo@openerp.com>2012-07-11 13:29:59 +0200
commite431cda2d34f3ff066722232c52bd3987e973b7b (patch)
tree5dfe24e9dfd9f351aea9fcb67d7b92670950b2f3 /addons/web/static/src
parent3efc9c033a7f9b2a1d032951785ff5a94ecdbe6c (diff)
parentf419cb8e024ea6a8713091714f940f2ffddf150e (diff)
[MERGE} from trunk
bzr revid: xmo@openerp.com-20120711112959-tcb9epdfc9frt6ux
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css329
-rw-r--r--addons/web/static/src/css/base.sass227
-rw-r--r--addons/web/static/src/css/data_export.css2
-rw-r--r--addons/web/static/src/css/data_import.css12
-rw-r--r--addons/web/static/src/js/chrome.js98
-rw-r--r--addons/web/static/src/js/corelib.js6
-rw-r--r--addons/web/static/src/js/coresetup.js47
-rw-r--r--addons/web/static/src/js/data_import.js14
-rw-r--r--addons/web/static/src/js/formats.js2
-rw-r--r--addons/web/static/src/js/search.js149
-rw-r--r--addons/web/static/src/js/view_editor.js27
-rw-r--r--addons/web/static/src/js/view_form.js171
-rw-r--r--addons/web/static/src/js/view_list.js71
-rw-r--r--addons/web/static/src/js/view_tree.js9
-rw-r--r--addons/web/static/src/js/views.js11
-rw-r--r--addons/web/static/src/xml/base.xml180
16 files changed, 925 insertions, 430 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 8a2020cba47..7ea01bf3bee 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -20,7 +20,7 @@
font-style: normal;
}
-.openerp.openerp-web-client-container {
+.openerp.openerp_webclient_container {
height: 100%;
position: relative;
}
@@ -91,11 +91,12 @@
list-style-type: none;
}
.openerp input, .openerp textarea, .openerp select {
- padding: 4px;
+ padding: 2px 4px;
border: 1px solid #cccccc;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
+ background: white;
}
.openerp img {
vertical-align: middle;
@@ -185,6 +186,99 @@
.openerp .ui-menu .ui-menu-item a.ui-state-active {
background: #f0f0fa;
}
+.openerp.ui-dialog {
+ display: none;
+ position: fixed;
+ padding: 6px;
+ top: 50%;
+ left: 50%;
+ z-index: 1050;
+ width: 560px;
+ margin: -150px 0 0 -280px;
+ background-color: rgba(60, 60, 60, 0.7);
+ border: 1px solid;
+ border-color: #888888 #555555 #444444;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ border-radius: 8px;
+ -moz-box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
+ -webkit-box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
+ box-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.openerp.ui-dialog .ui-dialog-titlebar, .openerp.ui-dialog .ui-dialog-content, .openerp.ui-dialog .ui-dialog-buttonpane {
+ padding: 16px;
+}
+.openerp.ui-dialog .ui-dialog-titlebar {
+ border-bottom: 1px solid #cacaca;
+ -moz-border-radius: 2px 2px 0 0;
+ -webkit-border-radius: 2px 2px 0 0;
+ border-radius: 2px 2px 0 0;
+ background-color: #fcfcfc;
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#dedede));
+ background-image: -webkit-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -moz-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -ms-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: -o-linear-gradient(top, #fcfcfc, #dedede);
+ background-image: linear-gradient(to bottom, #fcfcfc, #dedede);
+}
+.openerp.ui-dialog .ui-dialog-titlebar .ui-dialog-title {
+ margin: 0;
+ padding: 0;
+}
+.openerp.ui-dialog .ui-widget-header {
+ border: none;
+}
+.openerp.ui-dialog .ui-dialog-content {
+ background: white;
+}
+.openerp.ui-dialog .ui-dialog-buttonpane {
+ border-top: 1px solid #e0e0e0;
+ background: #f5f7f9;
+ padding: 8px;
+ margin: 0;
+ -moz-border-radius: 0 0 2px 2px;
+ -webkit-border-radius: 0 0 2px 2px;
+ border-radius: 0 0 2px 2px;
+}
+.openerp.ui-dialog .ui-dialog-buttonpane button {
+ margin-left: 8px;
+}
+.openerp.ui-dialog .ui-dialog-titlebar-close {
+ padding: 0;
+}
+.openerp.ui-dialog .ui-dialog-titlebar-close .ui-icon-closethick {
+ display: none;
+}
+.openerp.ui-dialog .ui-dialog-titlebar-close:before {
+ content: "×";
+ font-size: 18px;
+ font-weight: bold;
+ line-height: 16px;
+ color: black;
+ text-shadow: 0 1px 0 white;
+ padding: 0;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+}
+.openerp.ui-dialog .ui-dialog-titlebar-close:before:hover {
+ color: black;
+ text-decoration: none;
+}
+.openerp .modal-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1040;
+ background-color: black;
+ filter: alpha(opacity=30);
+ opacity: 0.3;
+}
.openerp .oe_i {
font-family: "mnmliconsRegular" !important;
font-size: 21px;
@@ -282,7 +376,7 @@
background: #ed6f6a;
}
.openerp .oe_title {
- width: 55%;
+ width: 60%;
}
.openerp .oe_title:after {
content: ".";
@@ -292,8 +386,11 @@
visibility: hidden;
}
.openerp .oe_button_box {
- width: 200px;
- text-align: center;
+ width: 38%;
+ text-align: right;
+}
+.openerp .oe_button_box button {
+ margin: 4px;
}
.openerp .oe_avatar {
margin: 0 16px 0 0;
@@ -308,6 +405,51 @@
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
border: none;
}
+.openerp .oe_button.oe_link {
+ border: none;
+ padding: 0;
+ margin: 0;
+ background: none;
+ -moz-border-radius: none;
+ -webkit-border-radius: none;
+ border-radius: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.openerp .oe_button.oe_link img {
+ display: none;
+}
+.openerp .oe_button.oe_link span {
+ border: none;
+ padding: 0;
+ margin: 0;
+ background: none;
+ -moz-border-radius: none;
+ -webkit-border-radius: none;
+ border-radius: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ color: #8a89ba;
+ font-weight: bold;
+}
+.openerp .oe_button.oe_link span:hover {
+ text-decoration: underline;
+}
+.openerp .oe_webclient .oe_star_on, .openerp .oe_webclient .oe_star_off {
+ color: #cccccc;
+ text-shadow: 0 0 2px black;
+ vertical-align: top;
+ position: relative;
+ top: -5px;
+}
+.openerp .oe_webclient .oe_star_on:hover, .openerp .oe_webclient .oe_star_off:hover {
+ text-decoration: none;
+}
+.openerp .oe_webclient .oe_star_on {
+ color: gold;
+}
.openerp.oe_tooltip {
font-size: 12px;
}
@@ -335,6 +477,11 @@
list-style: none;
zoom: 1;
}
+.openerp .oe_notebook.ui-corner-all {
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ border-radius: 0;
+}
.openerp .oe_notebook:before, .openerp .oe_notebook:after {
display: table;
content: "";
@@ -391,18 +538,23 @@
position: relative;
cursor: pointer;
}
+.openerp .oe_dropdown_toggle {
+ color: #404040;
+ font-weight: normal;
+}
.openerp .oe_dropdown_hover:hover .oe_dropdown_menu, .openerp .oe_dropdown_menu.oe_opened {
display: block;
}
.openerp .oe_dropdown_menu {
display: none;
position: absolute;
- top: 28px;
+ top: 26px;
+ left: 0;
z-index: 1;
border: 1px solid #afafb6;
background: white;
- padding: 8px;
- min-width: 120px;
+ padding: 6px 0;
+ min-width: 140px;
text-align: left;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
@@ -432,7 +584,7 @@
.openerp .oe_dropdown_menu > li > a {
white-space: nowrap;
display: block;
- padding: 3px 6px;
+ padding: 4px 15px;
color: #4c4c4c;
text-decoration: none;
}
@@ -746,6 +898,7 @@
border-top: 4px solid white;
}
.openerp .oe_topbar .oe_dropdown_menu {
+ top: 32px;
background: #333333;
background: rgba(37, 37, 37, 0.9);
border-color: #999999;
@@ -1128,10 +1281,10 @@
.openerp .oe_view_manager .oe_view_manager_switch .oe_vm_switch_diagram:after {
content: "f";
}
-.openerp .oe_view_manager_global {
+.openerp .oe_view_manager_current {
height: 100%;
}
-.openerp .oe_view_manager_global > .oe_view_manager_header {
+.openerp .oe_view_manager_current > .oe_view_manager_header {
border-top: 1px solid #cacaca;
border-bottom: 1px solid #cacaca;
background-color: #fcfcfc;
@@ -1145,13 +1298,19 @@
-webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
}
-.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row td {
+.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row td {
padding: 8px;
}
-.openerp .oe_view_manager_global > .oe_view_manager_header .oe_header_row:first-child td {
+.openerp .oe_view_manager_current > .oe_view_manager_header .oe_header_row:first-child td {
padding-top: 8px;
}
-.openerp .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager {
+.openerp .oe_view_manager_inline {
+ height: 100%;
+}
+.openerp .oe_view_manager_inline > .oe_view_manager_header {
+ display: none;
+}
+.openerp .oe_popup_form > .oe_formview > .oe_form_pager {
display: none !important;
}
.openerp .oe_searchview {
@@ -1173,7 +1332,7 @@
.openerp .oe_searchview input, .openerp .oe_searchview textarea {
padding: 3px;
height: 14px;
- font-size: 11px;
+ font-size: 12px;
line-height: 18px;
}
.openerp .oe_searchview.oe_focused {
@@ -1440,6 +1599,10 @@
top: 0;
right: 5px;
}
+.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_dashboard form {
+ display: none;
+ margin-top: 2px;
+}
.openerp .oe_searchview .oe_searchview_drawer .oe_searchview_advanced form {
display: none;
margin-top: 8px;
@@ -1528,11 +1691,11 @@
background-color: #ff6666 !important;
border: 1px solid #dd0000 !important;
}
-.openerp .oe_form_editable .oe_highlight {
+.openerp .oe_view_manager_current .oe_form_editable .oe_highlight {
color: #404040;
background: none;
}
-.openerp .oe_form_editable button.oe_highlight {
+.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight {
background-color: #efefef;
background-image: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#d8d8d8));
background-image: -webkit-linear-gradient(top, #efefef, #d8d8d8);
@@ -1544,7 +1707,7 @@
-webkit-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;
}
-.openerp .oe_form_editable button.oe_highlight:active {
+.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight:active {
background-color: #e3e3e3;
background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6));
background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6);
@@ -1556,7 +1719,7 @@
-webkit-box-shadow: none;
box-shadow: none;
}
-.openerp .oe_form_editable button.oe_highlight:hover {
+.openerp .oe_view_manager_current .oe_form_editable button.oe_highlight:hover {
background-color: #f6f6f6;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
@@ -1574,9 +1737,16 @@
.openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty {
display: none !important;
}
-.openerp .oe_form_nosheet > *:not(header) {
- margin-left: 10px !important;
- margin-right: 10px !important;
+.openerp .oe_form_readonly .oe_form .oe_form_field_date {
+ width: auto;
+}
+.openerp .oe_form_nosheet {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+.openerp .oe_form_nosheet > header {
+ margin-left: -10px;
+ margin-right: -10px;
}
.openerp .oe_form header {
position: relative;
@@ -1597,7 +1767,7 @@
}
.openerp .oe_form footer {
min-width: 650px;
- max-width: 960px;
+ max-width: 860px;
margin: 0 auto;
}
.openerp ul.oe_form_steps {
@@ -1666,7 +1836,7 @@
}
.openerp .oe_application .oe_form_sheet_width {
min-width: 650px;
- max-width: 960px;
+ max-width: 860px;
margin: 0 auto;
}
.openerp .oe_application .oe_form_sheet {
@@ -1691,19 +1861,22 @@
.openerp .oe_form td.oe_form_group_cell_label label {
line-height: 18px;
display: block;
- min-width: 120px;
+ min-width: 110px;
}
.openerp .oe_form td.oe_form_group_cell + .oe_form_group_cell {
- padding-left: 8px;
+ padding-left: 6px;
}
.openerp .oe_form .oe_form_group {
width: 100%;
margin: 4px 0 4px 0;
}
+.openerp .oe_form .oe_form_group .oe_group_right > tbody > tr > td:first-child {
+ padding-left: 18px;
+}
.openerp .oe_form .oe_form_label_help[for], .openerp .oe_form .oe_form_label[for] {
font-weight: bold;
white-space: nowrap;
- padding-right: 8px;
+ padding-right: 6px;
}
.openerp .oe_form .oe_form_label_help[for] span, .openerp .oe_form .oe_form_label[for] span {
font-size: 80%;
@@ -1760,9 +1933,10 @@
}
.openerp .oe_form .oe_form_field_char input,
.openerp .oe_form .oe_form_field_url input,
+.openerp .oe_form .oe_form_field_email input,
.openerp .oe_form .oe_form_field_text textarea,
.openerp .oe_form .oe_form_field_selection select {
- width: inherit;
+ width: 100%;
}
.openerp .oe_form .oe_form_field_text.oe_inline, .openerp .oe_form .oe_form_field_text.oe_inline > textarea {
width: 500px;
@@ -1799,7 +1973,7 @@
width: 180px;
}
.openerp .oe_form .oe_form_field_date {
- width: 7em;
+ width: 7.5em;
}
.openerp .oe_form .oe_form_field_datetime {
width: 11em;
@@ -1832,15 +2006,6 @@
-webkit-border-radius: 0px;
border-radius: 0px;
}
-.openerp .oe_form .oe_form_field_many2one input, .openerp .oe_form .oe_form_field_binary input, .openerp .oe_form .oe_form_field_binary input, .openerp .oe_form .oe_form_field_url input {
- 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_form .oe_form_field_url button img {
vertical-align: top;
}
@@ -1904,10 +2069,19 @@
right: 5px;
top: 3px;
}
-.openerp .oe_form .oe_form_field_with_button input {
- width: 100%;
+.openerp .oe_form .oe_form_field_with_button.oe_no_button > .oe_button {
+ display: none;
}
-.openerp .oe_form .oe_form_field_with_button > .oe_button {
+.openerp .oe_form .oe_form_field_with_button:not(.oe_no_button) input {
+ 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_form .oe_form_field_with_button:not(.oe_no_button) > .oe_button {
float: right;
-moz-border-radius: 0;
-webkit-border-radius: 0;
@@ -1915,6 +2089,9 @@
border-bottom-left-radius: 0px;
height: 22px;
}
+.openerp .oe_form .oe_form_field_with_button input {
+ width: 100%;
+}
.openerp .oe_form .oe_form_field_with_button > div {
position: relative;
overflow: hidden;
@@ -1926,7 +2103,7 @@
width: 45px;
height: 30px;
}
-.openerp .oe_hidden_input_file input.oe-binary-file {
+.openerp .oe_hidden_input_file input.oe_form_binary_file {
z-index: 0;
line-height: 0;
font-size: 12px;
@@ -1967,16 +2144,19 @@
.openerp .oe_form_field_many2one td:first-child {
position: relative;
}
-.openerp .oe_form_field_many2one span.oe-m2o-drop-down-button {
+.openerp .oe_form_field_many2one span.oe_m2o_drop_down_button {
position: absolute;
- top: 3px;
- right: 2px;
+ top: 1px;
+ right: 0px;
}
.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
display: none;
}
-.openerp .oe_form_field_one2many .oe-listview .oe-edit-row-save {
- background-image: url(/web/static/src/img/iconset-b-remove.png);
+.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save {
+ background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat;
+}
+.openerp .oe_form_field_one2many .oe_list .oe_list_edit_row_save:before {
+ visibility: hidden;
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_header_row_top {
display: none;
@@ -1996,7 +2176,7 @@
height: auto;
line-height: 16px;
}
-.openerp .oe_form .oe_form_field_many2many > .oe-listview .oe_list_pager_single_page {
+.openerp .oe_form .oe_form_field_many2many > .oe_list .oe_list_pager_single_page {
display: none;
}
.openerp .oe_list_buttons .oe_list_save {
@@ -2008,34 +2188,34 @@
.openerp .oe_list_buttons.oe_editing .oe_list_save {
display: inline-block;
}
-.openerp .oe-listview {
+.openerp .oe_list {
position: relative;
}
-.openerp .oe-listview .oe_form .oe_form_field {
+.openerp .oe_list .oe_form .oe_form_field {
width: auto;
position: absolute;
margin: 0 !important;
padding: 0;
}
-.openerp .oe-listview-content {
+.openerp .oe_list_content {
width: 100%;
}
-.openerp .oe-listview-content td:first-child:after, .openerp .oe-listview-content th:first-child:after {
+.openerp .oe_list_content td:first-child:after, .openerp .oe_list_content th:first-child:after {
border-width: 0;
}
-.openerp .oe-listview-content > thead {
+.openerp .oe_list_content > thead {
border-bottom: 2px solid #cacaca;
background: #eeeeee;
vertical-align: top;
}
-.openerp .oe-listview-content > thead th {
+.openerp .oe_list_content > thead th {
position: relative;
}
-.openerp .oe-listview-content td, .openerp .oe-listview-content th {
+.openerp .oe_list_content td, .openerp .oe_list_content th {
padding: 3px 6px;
line-height: 18px;
}
-.openerp .oe-listview-content th:after {
+.openerp .oe_list_content th:after {
position: absolute;
right: 6px;
content: "";
@@ -2045,12 +2225,12 @@
border-color: black transparent;
visibility: hidden;
}
-.openerp .oe-listview-content th.sortup:after {
+.openerp .oe_list_content th.sortup:after {
visibility: visible;
filter: alpha(opacity=60);
opacity: 0.6;
}
-.openerp .oe-listview-content th.sortdown:after {
+.openerp .oe_list_content th.sortdown:after {
border-bottom: none;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
@@ -2062,20 +2242,19 @@
filter: alpha(opacity=60);
opacity: 0.6;
}
-.openerp .oe-listview-content > tbody {
+.openerp .oe_list_content > tbody {
cursor: pointer;
- background: white;
}
-.openerp .oe-listview-content > tbody > tr {
+.openerp .oe_list_content > tbody > tr {
border-top: 1px solid #dddddd;
}
-.openerp .oe-listview-content > tbody > tr > td.oe-field-cell {
+.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell {
padding: 3px 6px;
}
-.openerp .oe-listview-content > tbody > tr > td, .openerp .oe-listview-content > tbody > tr > th {
+.openerp .oe_list_content > tbody > tr > td, .openerp .oe_list_content > tbody > tr > th {
line-height: 18px;
}
-.openerp .oe-listview-content > tbody > tr > td > button, .openerp .oe-listview-content > tbody > tr > th > button {
+.openerp .oe_list_content > tbody > tr > td > button, .openerp .oe_list_content > tbody > tr > th > button {
border: none;
background: transparent;
padding: 0;
@@ -2083,16 +2262,16 @@
-webkit-box-shadow: none;
box-shadow: none;
}
-.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child {
+.openerp .oe_list_content > tbody > tr > td.oe_list_checkbox:first-child, .openerp .oe_list_content > tbody > tr th.oe_list_checkbox:first-child {
width: 17px;
}
-.openerp .oe-listview-content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe-listview-content > tbody > tr th.oe_list_checkbox:first-child:after {
+.openerp .oe_list_content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe_list_content > tbody > tr th.oe_list_checkbox:first-child:after {
border-width: 0;
}
-.openerp .oe-listview-content > tbody > tr > td.oe_number {
+.openerp .oe_list_content > tbody > tr > td.oe_number {
text-align: right !important;
}
-.openerp .oe-listview-content > tbody > tr:nth-child(odd) {
+.openerp .oe_list_content > tbody > tr:nth-child(odd) {
background-color: #f0f0fa;
background-color: #f0f0fa;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
@@ -2102,13 +2281,13 @@
background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6);
background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);
}
-.openerp .oe-listview-content > tfoot {
+.openerp .oe_list_content > tfoot {
border-top: 2px solid #cacaca;
border-bottom: 1px solid #cacaca;
background: #eeeeee;
font-weight: bold;
}
-.openerp .oe-listview-content > tbody tr:hover td, .openerp .oe-listview-content tbody tr:hover th {
+.openerp .oe_list_content > tbody tr:hover td, .openerp .oe_list_content tbody tr:hover th {
background-color: #eeeeee;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dedede));
background-image: -webkit-linear-gradient(top, #eeeeee, #dedede);
@@ -2117,11 +2296,11 @@
background-image: -o-linear-gradient(top, #eeeeee, #dedede);
background-image: linear-gradient(to bottom, #eeeeee, #dedede);
}
-.openerp .oe-listview-content .numeric {
+.openerp .oe_list_content .numeric {
text-align: right;
width: 82px;
}
-.openerp .oe-listview-content .numeric input {
+.openerp .oe_list_content .numeric input {
text-align: right;
}
.openerp .oe_trad_field.touched {
@@ -2197,3 +2376,9 @@
.kitten-mode-activated > * {
opacity: 0.7;
}
+
+div.ui-widget-overlay {
+ background: black;
+ filter: alpha(opacity=30);
+ opacity: 0.3;
+}
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index 9377c11e2c2..0472aa34710 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -6,6 +6,7 @@ $facets-border: #afafb6
$facets-border-selected: #a6a6fe
$hover-background: #f0f0fa
$colour4: #8a89ba
+$sheet-max-width: 860px
// }}}
// Mixins {{{
@font-face
@@ -27,6 +28,14 @@ $colour4: #8a89ba
font-weight: normal
font-style: normal
+@mixin reset()
+ border: none
+ padding: 0
+ margin: 0
+ background: none
+ @include radius(none)
+ @include box-shadow(none)
+
@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 */
@@ -89,7 +98,7 @@ $colour4: #8a89ba
// }}}
-.openerp.openerp-web-client-container
+.openerp.openerp_webclient_container
height: 100%
position: relative
@@ -134,9 +143,10 @@ $colour4: #8a89ba
li
list-style-type: none
input, textarea, select
- padding: 4px
+ padding: 2px 4px
border: 1px solid #ccc
@include radius(3px)
+ background: white
img
vertical-align: middle
h4
@@ -190,6 +200,75 @@ $colour4: #8a89ba
width: auto
a.ui-state-active
background: #f0f0fa
+
+ // Modal box
+ &.ui-dialog
+ display: none
+ position: fixed
+ padding: 6px
+ top: 50%
+ left: 50%
+ z-index: 1050
+ width: 560px
+ margin: -150px 0 0 -280px
+ //overflow: hidden
+ background-color: rgba(60,60,60,0.7)
+ border: 1px solid
+ border-color: #888 #555 #444
+ //overflow: hidden
+ @include radius(8px)
+ @include box-shadow(0 1px 12px rgba(0, 0, 0, 0.6))
+ @include background-clip()
+ .ui-dialog-titlebar, .ui-dialog-content, .ui-dialog-buttonpane
+ padding: 16px
+ .ui-dialog-titlebar
+ border-bottom: 1px solid #cacaca
+ @include radius(2px 2px 0 0)
+ @include vertical-gradient(#FCFCFC, #DEDEDE)
+ .ui-dialog-title
+ margin: 0
+ padding: 0
+ .ui-widget-header
+ border: none
+ .ui-dialog-content
+ background: white
+ .ui-dialog-buttonpane
+ border-top: 1px solid #e0e0e0
+ background: #f5f7f9
+ padding: 8px
+ margin: 0
+ @include radius(0 0 2px 2px)
+ button
+ margin-left: 8px
+ .ui-dialog-titlebar-close
+ padding: 0
+ .ui-icon-closethick
+ display: none
+ &:before
+ content: "×"
+ font-size: 18px
+ font-weight: bold
+ line-height: 16px
+ color: black
+ text-shadow: 0 1px 0 white
+ padding: 0
+ cursor: pointer
+ background: transparent
+ border: 0
+ &:hover
+ color: black
+ text-decoration: none
+
+ .modal-backdrop
+ position: fixed
+ top: 0
+ right: 0
+ bottom: 0
+ left: 0
+ z-index: 1040
+ background-color: black
+ @include opacity(.3)
+
// }}}
// Generic classes {{{
.oe_i
@@ -242,7 +321,7 @@ $colour4: #8a89ba
&:hover
background: #ED6F6A
.oe_title
- width: 55%
+ width: 60%
.oe_title:after
content: "."
display: block
@@ -250,8 +329,10 @@ $colour4: #8a89ba
clear: both
visibility: hidden
.oe_button_box
- width: 200px
- text-align: center
+ width: 38%
+ text-align: right
+ button
+ margin: 4px
.oe_avatar
margin: 0 16px 0 0
img
@@ -259,6 +340,28 @@ $colour4: #8a89ba
@include radius(3px)
@include box-shadow(0 1px 3px rgba(0, 0, 0, 0.3))
border: none
+ .oe_button.oe_link
+ @include reset()
+ img
+ display: none
+ span
+ @include reset()
+ color: #8A89BA
+ font-weight: bold
+ &:hover
+ text-decoration: underline
+ .oe_webclient
+ .oe_star_on, .oe_star_off
+ color: #cccccc
+ text-shadow: 0 0 2px black
+ vertical-align: top
+ position: relative
+ top: -5px
+ .oe_star_on:hover, .oe_star_off:hover
+ text-decoration: none
+ .oe_star_on
+ color: gold
+
//.oe_edit_only 
// }}}
// Tooltips {{{
@@ -284,6 +387,8 @@ $colour4: #8a89ba
padding: 0 16px
list-style: none
zoom: 1
+ .oe_notebook.ui-corner-all
+ @include radius(0)
.oe_notebook:before, .oe_notebook:after
display: table
content: ""
@@ -327,17 +432,21 @@ $colour4: #8a89ba
.oe_dropdown, .oe_dropdown_hover, .oe_dropdown_toggle
position: relative
cursor: pointer
+ .oe_dropdown_toggle
+ color: #404040
+ font-weight: normal
.oe_dropdown_hover:hover .oe_dropdown_menu, .oe_dropdown_menu.oe_opened
display: block
.oe_dropdown_menu
display: none
position: absolute
- top: 28px
+ top: 26px
+ left: 0
z-index: 1
border: 1px solid #afafb6
background: white
- padding: 8px
- min-width: 120px
+ padding: 6px 0
+ min-width: 140px
text-align: left
@include radius(3px)
@include box-shadow(0 1px 4px rgba(0,0,0,0.3))
@@ -352,7 +461,7 @@ $colour4: #8a89ba
> a
white-space: nowrap
display: block
- padding: 3px 6px
+ padding: 4px 15px
color: #4c4c4c
text-decoration: none
&:hover
@@ -370,7 +479,6 @@ $colour4: #8a89ba
border-right: 4px solid transparent
border-top: 4px solid#404040
@include opacity(0.5)
-
.oe_sidebar
white-space: nowrap
.oe_dropdown_menu
@@ -591,6 +699,7 @@ $colour4: #8a89ba
.oe_dropdown_arrow:after
border-top: 4px solid white
.oe_dropdown_menu
+ top: 32px
background: #333
background: rgba(37,37,37,0.9)
border-color: #999
@@ -606,6 +715,7 @@ $colour4: #8a89ba
&:hover
@include vertical-gradient(#292929, #191919)
@include box-shadow(none)
+
// }}}
// Webclient.leftbar {{{
.oe_leftbar
@@ -891,7 +1001,7 @@ $colour4: #8a89ba
content: "f"
// }}}
// ViewManager application {{{
- .oe_view_manager_global
+ .oe_view_manager_current
height: 100%
> .oe_view_manager_header
border-top: 1px solid #cacaca
@@ -905,8 +1015,14 @@ $colour4: #8a89ba
td
padding-top: 8px
// }}}
+ // ViewManager inline {{{
+ .oe_view_manager_inline
+ height: 100%
+ > .oe_view_manager_header
+ display: none
+ // }}}
// Viewmanager popup {{{
- .oe-select-create-popup-view-form > .oe_formview > .oe_form_pager
+ .oe_popup_form > .oe_formview > .oe_form_pager
display: none !important
// }}}
// SearchView {{{
@@ -924,7 +1040,7 @@ $colour4: #8a89ba
input, textarea
padding: 3px
height: 14px
- font-size: 11px
+ font-size: 12px
line-height: 18px
&.oe_focused
border-color: $facets-border-selected
@@ -1129,6 +1245,11 @@ $colour4: #8a89ba
position: absolute
top: 0
right: 5px
+ .oe_searchview_dashboard
+ form
+ display: none
+ margin-top: 2px
+
.oe_searchview_advanced
form
display: none
@@ -1214,7 +1335,7 @@ $colour4: #8a89ba
input, select, textarea
background-color: #F66 !important
border: 1px solid #D00 !important
- .oe_form_editable
+ .oe_view_manager_current .oe_form_editable
.oe_highlight
color: #404040
background: none
@@ -1232,9 +1353,14 @@ $colour4: #8a89ba
.oe_form_readonly
.oe_edit_only, .oe_form_field:empty
display: none !important
- .oe_form_nosheet > *:not(header)
- margin-left: 10px !important
- margin-right: 10px !important
+ .oe_form .oe_form_field_date
+ width: auto
+ .oe_form_nosheet
+ margin-left: 10px
+ margin-right: 10px
+ .oe_form_nosheet > header
+ margin-left: -10px
+ margin-right: -10px
// }}}
// FormView.custom tags and classes {{{
.oe_form
@@ -1249,7 +1375,7 @@ $colour4: #8a89ba
float: right
footer
min-width: 650px
- max-width: 960px
+ max-width: $sheet-max-width
margin: 0 auto
ul.oe_form_steps
height: 30px
@@ -1304,7 +1430,7 @@ $colour4: #8a89ba
border-bottom: 1px solid #ddd
.oe_form_sheet_width
min-width: 650px
- max-width: 960px
+ max-width: $sheet-max-width
margin: 0 auto
.oe_form_sheet
background: white
@@ -1325,19 +1451,22 @@ $colour4: #8a89ba
label
line-height: 18px
display: block
- min-width: 120px
+ min-width: 110px
td.oe_form_group_cell + .oe_form_group_cell
- padding-left: 8px
+ padding-left: 6px
.oe_form_group
width: 100%
margin: 4px 0 4px 0
+ .oe_group_right
+ > tbody > tr > td:first-child
+ padding-left: 18px
// }}}
// FormView.label {{{
.oe_form
.oe_form_label_help[for], .oe_form_label[for]
font-weight: bold
white-space: nowrap
- padding-right: 8px
+ padding-right: 6px
span
font-size: 80%
color: darkGreen
@@ -1385,9 +1514,10 @@ $colour4: #8a89ba
width: 100%
.oe_form_field_char input,
.oe_form_field_url input,
+ .oe_form_field_email input,
.oe_form_field_text textarea,
.oe_form_field_selection select
- width: inherit
+ width: 100%
.oe_form_field_text.oe_inline, .oe_form_field_text.oe_inline > textarea
width: 500px
.oe_form_field_float input
@@ -1413,7 +1543,7 @@ $colour4: #8a89ba
.oe_form_field_float
width: 180px
.oe_form_field_date
- width: 7em
+ width: 7.5em
.oe_form_field_datetime
width: 11em
input[type="text"], input[type="password"], input[type="file"], select
@@ -1433,14 +1563,6 @@ $colour4: #8a89ba
padding-left: 8px
@include box-shadow(none)
@include radius(0px)
- .oe_form_field_many2one input, .oe_form_field_binary input, .oe_form_field_binary input, .oe_form_field_url input
- 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
.oe_form_field_url button img
vertical-align: top
.oe_form_field_date,
@@ -1491,14 +1613,25 @@ $colour4: #8a89ba
filter: alpha(opacity=50)
right: 5px
top: 3px
- .oe_form_field_with_button
+ .oe_form_field_with_button.oe_no_button > .oe_button
+ display: none
+ .oe_form_field_with_button:not(.oe_no_button)
input
- width: 100%
+ 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
> .oe_button
float: right
@include radius(0)
border-bottom-left-radius: 0px
height: 22px
+ .oe_form_field_with_button
+ input
+ width: 100%
> div
position: relative
overflow: hidden
@@ -1513,7 +1646,7 @@ $colour4: #8a89ba
display: inline-block
width: 45px
height: 30px
- input.oe-binary-file
+ input.oe_form_binary_file
z-index: 0
line-height: 0
font-size: 12px
@@ -1551,10 +1684,10 @@ $colour4: #8a89ba
.oe_form_field_many2one
td:first-child
position: relative
- span.oe-m2o-drop-down-button
+ span.oe_m2o_drop_down_button
position: absolute
- top: 3px
- right: 2px
+ top: 1px
+ right: 0px
// }}}
// FormView.one2many {{{
.oe_form .oe_form_field_one2many > .oe_view_manager
@@ -1562,8 +1695,10 @@ $colour4: #8a89ba
display: none
.oe_form_field_one2many
// TODO: oe_form_field_one2many_list?
- .oe-listview .oe-edit-row-save
- background-image: url(/web/static/src/img/iconset-b-remove.png)
+ .oe_list .oe_list_edit_row_save
+ background: url(/web/static/src/img/iconset-b-remove.png) 50% 50% no-repeat
+ &:before
+ visibility: hidden
&> .oe_view_manager
.oe_header_row_top
@@ -1582,7 +1717,7 @@ $colour4: #8a89ba
line-height: 16px
// }}}
// FormView.many2many {{{
- .oe_form .oe_form_field_many2many > .oe-listview
+ .oe_form .oe_form_field_many2many > .oe_list
.oe_list_pager_single_page
display: none
// }}}
@@ -1596,7 +1731,7 @@ $colour4: #8a89ba
.oe_list_save
display: inline-block
- .oe-listview
+ .oe_list
position: relative
.oe_form .oe_form_field
width: auto
@@ -1604,7 +1739,7 @@ $colour4: #8a89ba
margin: 0 !important // dammit
padding: 0
- .oe-listview-content
+ .oe_list_content
width: 100%
td:first-child, th:first-child
&:after
@@ -1640,10 +1775,9 @@ $colour4: #8a89ba
@include opacity(0.6)
> tbody
cursor: pointer
- background: white
> tr
border-top: 1px solid #ddd
- > td.oe-field-cell
+ > td.oe_list_field_cell
padding: 3px 6px
> td, > th
line-height: 18px
@@ -1742,5 +1876,8 @@ $colour4: #8a89ba
opacity: 0.70
// }}}
+div.ui-widget-overlay
+ background: black
+ @include opacity(0.3)
// 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/data_export.css b/addons/web/static/src/css/data_export.css
index 149fcea81e6..3fa24265b45 100644
--- a/addons/web/static/src/css/data_export.css
+++ b/addons/web/static/src/css/data_export.css
@@ -1,4 +1,4 @@
-.openerp .oe-export {
+.openerp .oe_export {
width: 100%;
}
.openerp .oe_export_row tr{
diff --git a/addons/web/static/src/css/data_import.css b/addons/web/static/src/css/data_import.css
index a63a52802f0..47cd52aa081 100644
--- a/addons/web/static/src/css/data_import.css
+++ b/addons/web/static/src/css/data_import.css
@@ -12,22 +12,22 @@
border-bottom: 1px solid #E3E3E3;
}
-.openerp .oe-import-no-result .oe-import-result {
+.openerp .oe_import_no_result .oe_import_result {
display: none;
}
-.openerp .oe-import fieldset {
+.openerp .oe_import fieldset {
cursor: pointer;
}
-.openerp .oe-import fieldset legend:before {
+.openerp .oe_import fieldset legend:before {
content: '\25BC ';
}
-.openerp .oe-import fieldset.oe-closed legend:before {
+.openerp .oe_import fieldset.oe_closed legend:before {
content: '\25B6 ';
}
-.openerp .oe-import fieldset.oe-closed table {
+.openerp .oe_import fieldset.oe_closed table {
display: none;
}
-.openerp .oe-import .separator.horizontal {
+.openerp .oe_import .separator.horizontal {
font-weight: bold;
border-bottom-width: 1px;
margin: 6px 4px 6px 1px;
diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js
index a398ceb67d9..b87ebe56856 100644
--- a/addons/web/static/src/js/chrome.js
+++ b/addons/web/static/src/js/chrome.js
@@ -136,14 +136,18 @@ instance.web.Dialog = instance.web.Widget.extend({
},
on_close: function() {
if (this.dialog_options.destroy_on_close) {
- this.$element.dialog('destroy');
+ this.destroy();
}
},
on_resized: function() {
},
destroy: function () {
- this.close();
- this.$element.dialog('destroy');
+ _.each(this.getChildren(), function(el) {
+ el.destroy();
+ });
+ if (! this.isDestroyed()) {
+ this.$element.dialog('destroy');
+ }
this._super();
}
});
@@ -401,7 +405,14 @@ instance.web.DatabaseManager = instance.web.Widget.extend({
success: function () {
self.do_notify(_t("Backed"), _t("Database backed up successfully"));
},
- error: instance.webclient.crashmanager.on_rpc_error,
+ error: function(error){
+ if(error){
+ self.display_error({
+ title: 'Backup Database',
+ error: 'AccessDenied'
+ });
+ }
+ },
complete: function() {
self.unblockUI();
}
@@ -538,6 +549,7 @@ instance.web.Login = instance.web.Widget.extend({
do_login: function (db, login, password) {
var self = this;
this.$element.removeClass('oe_login_invalid');
+ self.$(".oe_login_pane").fadeOut("slow");
return this.session.session_authenticate(db, login, password).pipe(function() {
if (self.has_local_storage) {
if(self.remember_credentials) {
@@ -552,9 +564,9 @@ instance.web.Login = instance.web.Widget.extend({
localStorage.setItem('last_password_login_success', '');
}
}
- self.$(".oe_login_pane").fadeOut("slow");
self.trigger("login");
},function () {
+ self.$(".oe_login_pane").fadeIn("fast");
self.$element.addClass("oe_login_invalid");
});
}
@@ -571,6 +583,7 @@ instance.web.Menu = instance.web.Widget.extend({
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);
return this.do_reload();
},
do_reload: function() {
@@ -583,7 +596,6 @@ instance.web.Menu = instance.web.Widget.extend({
this.limit_entries();
this.$secondary_menus.html(QWeb.render("Menu.secondary", { widget : this }));
this.$element.on('click', 'a[data-menu]', this.on_menu_click);
- this.$secondary_menus.on('click', 'a[data-menu]', this.on_menu_click);
// Hide second level submenus
this.$secondary_menus.find('.oe_menu_toggler').siblings('.oe_secondary_submenu').hide();
if (self.current_menu) {
@@ -665,32 +677,37 @@ instance.web.Menu = instance.web.Widget.extend({
* Process a click on a menu item
*
* @param {Number} id the menu_id
+ * @param {Boolean} [needaction=false] whether the triggered action should execute in a `needs action` context
*/
- menu_click: function(id) {
- if (id) {
- // find back the menuitem in dom to get the action
- var $item = this.$element.find('a[data-menu=' + id + ']');
- if (!$item.length) {
- $item = this.$secondary_menus.find('a[data-menu=' + id + ']');
- }
- var action_id = $item.data('action-id');
- // If first level menu doesnt have action trigger first leaf
- if (!action_id) {
- if(this.$element.has($item).length) {
- $sub_menu = this.$secondary_menus.find('.oe_secondary_menu[data-menu-parent=' + id + ']');
- $items = $sub_menu.find('a[data-action-id]').filter('[data-action-id!=""]');
- if($items.length) {
- action_id = $items.data('action-id');
- id = $items.data('menu');
- }
+ menu_click: function(id, needaction) {
+ if (!id) { return; }
+
+ // find back the menuitem in dom to get the action
+ var $item = this.$element.find('a[data-menu=' + id + ']');
+ if (!$item.length) {
+ $item = this.$secondary_menus.find('a[data-menu=' + id + ']');
+ }
+ var action_id = $item.data('action-id');
+ // If first level menu doesnt have action trigger first leaf
+ if (!action_id) {
+ if(this.$element.has($item).length) {
+ var $sub_menu = this.$secondary_menus.find('.oe_secondary_menu[data-menu-parent=' + id + ']');
+ var $items = $sub_menu.find('a[data-action-id]').filter('[data-action-id!=""]');
+ if($items.length) {
+ action_id = $items.data('action-id');
+ id = $items.data('menu');
}
}
- this.open_menu(id);
- this.current_menu = id;
- this.session.active_id = id;
- if (action_id) {
- this.trigger('menu_click', action_id, id, $item);
- }
+ }
+ this.open_menu(id);
+ this.current_menu = id;
+ this.session.active_id = id;
+ if (action_id) {
+ this.trigger('menu_click', {
+ action_id: action_id,
+ needaction: needaction,
+ id: id
+ }, $item);
}
},
/**
@@ -700,7 +717,8 @@ instance.web.Menu = instance.web.Widget.extend({
*/
on_menu_click: function(ev) {
ev.preventDefault();
- this.menu_click($(ev.currentTarget).data('menu'));
+ var needaction = $(ev.target).is('div.oe_menu_counter');
+ this.menu_click($(ev.currentTarget).data('menu'), needaction);
},
});
@@ -855,12 +873,12 @@ instance.web.WebClient = instance.web.Widget.extend({
},
start: function() {
var self = this;
- this.$element.addClass("openerp openerp-web-client-container");
+ this.$element.addClass("openerp openerp_webclient_container");
if (jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined) {
$("body").addClass("kitten-mode-activated");
- self.$element.delegate('img.oe-record-edit-link-img', 'hover', function(e) {
- self.$element.toggleClass('clark-gable');
- });
+ if ($.blockUI) {
+ $.blockUI.defaults.message = '<img src="http://www.amigrave.com/kitten.gif">';
+ }
}
this.session.session_bind().then(function() {
self.destroy_content();
@@ -1010,8 +1028,16 @@ instance.web.WebClient = instance.web.Widget.extend({
this._current_state = _.clone(state);
$.bbq.pushState(url);
},
- on_menu_action: function(action) {
- this.action_manager.do_action(action);
+ on_menu_action: function(options) {
+ var self = this;
+ this.rpc("/web/action/load", { action_id: options.action_id })
+ .then(function (result) {
+ var action = result.result;
+ if (options.needaction) {
+ action.context.search_default_needaction_pending = true;
+ }
+ self.action_manager.do_action(action);
+ });
},
do_action: function(action) {
var self = this;
diff --git a/addons/web/static/src/js/corelib.js b/addons/web/static/src/js/corelib.js
index 5af51fa519a..1ed4c4788e3 100644
--- a/addons/web/static/src/js/corelib.js
+++ b/addons/web/static/src/js/corelib.js
@@ -1307,19 +1307,19 @@ instance.web.JsonRPC = instance.web.CallbackEnabled.extend({
} else {
// Indirect jsonp request
var ifid = _.uniqueId('oe_rpc_iframe');
- var display = options.openerp.debug ? 'block' : 'none';
+ var display = self.debug ? 'block' : 'none';
var $iframe = $(_.str.sprintf("<iframe src='javascript:false;' name='%s' id='%s' style='display:%s'></iframe>", ifid, ifid, display));
var $form = $('<form>')
.attr('method', 'POST')
.attr('target', ifid)
.attr('enctype', "multipart/form-data")
- .attr('action', ajax.url + '?' + $.param(data))
+ .attr('action', ajax.url + '?jsonp=1&' + $.param(data))
.append($('<input type="hidden" name="r" />').attr('value', payload_str))
.hide()
.appendTo($('body'));
var cleanUp = function() {
if ($iframe) {
- $iframe.unbind("load").attr("src", "javascript:false;").remove();
+ $iframe.unbind("load").remove();
}
$form.remove();
};
diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js
index 99e134e7bd4..a00ca4002e5 100644
--- a/addons/web/static/src/js/coresetup.js
+++ b/addons/web/static/src/js/coresetup.js
@@ -334,11 +334,14 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess
.appendTo(document.body)
.load(function () {
try {
- if (options.error) {
- options.error(JSON.parse(
- this.contentDocument.body.childNodes[1].textContent
- ));
- }
+ if (options.error) {
+ if (!this.contentDocument.body.childNodes[1]) {
+ options.error(this.contentDocument.body.childNodes);
+ }
+ else {
+ options.error(JSON.parse(this.contentDocument.body.childNodes[1].textContent));
+ }
+ }
} finally {
complete();
}
@@ -595,7 +598,7 @@ instance.web.qweb.preprocess_node = function() {
break;
case 1:
// Element
- var attr, attrs = ['label', 'title', 'alt'];
+ var attr, attrs = ['label', 'title', 'alt', 'placeholder'];
while (attr = attrs.pop()) {
if (this.attributes[attr]) {
this.attributes[attr] = instance.web._t(this.attributes[attr]);
@@ -605,15 +608,31 @@ instance.web.qweb.preprocess_node = function() {
};
/** Setup jQuery timeago */
-var timeago_setup = function () {
- var s = $.timeago.settings.strings;
- _.each(s, function(v,k) {
- if(_.isString(v)) {
- s[k] = instance.web._t(v);
- }
- });
+var _t = instance.web._t;
+/*
+ * Strings in timeago are "composed" with prefixes, words and suffixes. This
+ * makes their detection by our translating system impossible. Use all literal
+ * strings we're using with a translation mark here so the extractor can do its
+ * job.
+ */
+{
+ _t('less than a minute ago');
+ _t('about a minute ago');
+ _t('%d minutes ago');
+ _t('about an hour ago');
+ _t('%d hours ago');
+ _t('a day ago');
+ _t('%d days ago');
+ _t('about a month ago');
+ _t('%d months ago');
+ _t('about a year ago');
+ _t('%d years ago');
}
-instance.connection.on('module_loaded', this, timeago_setup);
+
+instance.connection.on('module_loaded', this, function () {
+ // provide timeago.js with our own translator method
+ $.timeago.settings.translator = instance.web._t;
+});
/**
* Registry for all the client actions key: tag value: widget
diff --git a/addons/web/static/src/js/data_import.js b/addons/web/static/src/js/data_import.js
index bc98d8a1c10..6059f292df9 100644
--- a/addons/web/static/src/js/data_import.js
+++ b/addons/web/static/src/js/data_import.js
@@ -68,7 +68,7 @@ instance.web.DataImport = instance.web.Dialog.extend({
this.open({
buttons: [
{text: _t("Close"), click: function() { self.destroy(); }},
- {text: _t("Import File"), click: function() { self.do_import(); }, 'class': 'oe-dialog-import-button'}
+ {text: _t("Import File"), click: function() { self.do_import(); }, 'class': 'oe_import_dialog_button'}
],
close: function(event, ui) {
self.destroy();
@@ -78,7 +78,7 @@ instance.web.DataImport = instance.web.Dialog.extend({
this.$element.find('#csvfile').change(this.on_autodetect_data);
this.$element.find('fieldset').change(this.on_autodetect_data);
this.$element.delegate('fieldset legend', 'click', function() {
- $(this).parent().toggleClass('oe-closed');
+ $(this).parent().toggleClass('oe_closed');
});
this.ready.push(new instance.web.DataSet(this, this.model).call(
'fields_get', [], function (fields) {
@@ -157,7 +157,7 @@ instance.web.DataImport = instance.web.Dialog.extend({
},
toggle_import_button: function (newstate) {
instance.web.dialog(this.$element, 'widget')
- .find('.oe-dialog-import-button')
+ .find('.oe_import_dialog_button')
.button('option', 'disabled', !newstate);
},
do_import: function() {
@@ -202,7 +202,7 @@ instance.web.DataImport = instance.web.Dialog.extend({
if (results['error']) {
result_node.append(QWeb.render('ImportView.error', {
'error': results['error']}));
- this.$element.find('fieldset').removeClass('oe-closed');
+ this.$element.find('fieldset').removeClass('oe_closed');
return;
}
if (results['success']) {
@@ -224,11 +224,11 @@ instance.web.DataImport = instance.web.Dialog.extend({
: with_headers ? results.records.slice(1)
: results.records
}));
- this.$element.find('fieldset').addClass('oe-closed');
+ this.$element.find('fieldset').addClass('oe_closed');
}
- this.$element.find('form').removeClass('oe-import-no-result');
+ this.$element.find('form').removeClass('oe_import_no_result');
- this.$element.delegate('.oe-m2o-drop-down-button', 'click', function () {
+ this.$element.delegate('.oe_m2o_drop_down_button', 'click', function () {
$(this).prev('input').focus();
});
diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js
index e0ee3359091..6ceb7090e44 100644
--- a/addons/web/static/src/js/formats.js
+++ b/addons/web/static/src/js/formats.js
@@ -309,7 +309,7 @@ instance.web.format_cell = function (row_data, column, options) {
'</button>', {
title: column.string || '',
additional_attributes: isNaN(row_data["id"].value) && instance.web.BufferedDataSet.virtual_id_regex.test(row_data["id"].value) ?
- 'disabled="disabled" class="oe-listview-button-disabled"' : '',
+ 'disabled="disabled" class="oe_list_button_disabled"' : '',
prefix: instance.connection.prefix,
icon: column.icon,
alt: column.string || ''
diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js
index 85521a14651..c8b6f797dba 100644
--- a/addons/web/static/src/js/search.js
+++ b/addons/web/static/src/js/search.js
@@ -352,6 +352,11 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
e.stopImmediatePropagation();
self.$element.toggleClass('oe_searchview_open_drawer');
});
+ instance.web.bus.on('click', this, function(ev) {
+ if ($(ev.target).parents('.oe_searchview').length === 0) {
+ self.$element.removeClass('oe_searchview_open_drawer');
+ }
+ });
// Focus last input if the view itself is clicked (empty section of
// facets element)
this.$element.on('click', function (e) {
@@ -640,6 +645,8 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
var drawer_started = $.when.apply(
null, _(this.select_for_drawer()).invoke(
'appendTo', this.$element.find('.oe_searchview_drawer')));
+
+ new instance.web.search.AddToDashboard(this).appendTo($('.oe_searchview_drawer', this.$element));
// load defaults
var defaults_fetched = $.when.apply(null, _(this.inputs).invoke(
@@ -692,53 +699,6 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
select.val('');
}
},
- on_add_to_dashboard: function() {
- this.$element.find(".oe_search-view-filters-management")[0].selectedIndex = 0;
- var self = this,
- menu = instance.webclient.menu,
- $dialog = $(QWeb.render("SearchView.add_to_dashboard", {
- dashboards : menu.data.data.children,
- selected_menu_id : menu.$element.find('a.active').data('menu')
- }));
- $dialog.find('input').val(this.fields_view.name);
- instance.web.dialog($dialog, {
- modal: true,
- title: _t("Add to Dashboard"),
- buttons: [
- {text: _t("Cancel"), click: function() {
- $(this).dialog("close");
- }},
- {text: _t("OK"), click: function() {
- $(this).dialog("close");
- var menu_id = $(this).find("select").val(),
- title = $(this).find("input").val(),
- data = self.build_search_data(),
- context = new instance.web.CompoundContext(),
- domain = new instance.web.CompoundDomain();
- _.each(data.contexts, function(x) {
- context.add(x);
- });
- _.each(data.domains, function(x) {
- domain.add(x);
- });
- self.rpc('/web/searchview/add_to_dashboard', {
- menu_id: menu_id,
- action_id: self.getParent().action.id,
- context_to_save: context,
- domain: domain,
- view_mode: self.getParent().active_view,
- name: title
- }, function(r) {
- if (r === false) {
- self.do_warn("Could not add filter to dashboard");
- } else {
- self.do_notify("Filter added to dashboard", '');
- }
- });
- }}
- ]
- });
- },
/**
* Extract search data from the view's facets.
*
@@ -1234,7 +1194,7 @@ instance.web.search.Field = instance.web.search.Input.extend( /** @lends instanc
var self = this;
// A field needs a context to send when active
var context = this.attrs.context;
- if (!context || !facet.values.length) {
+ if (_.isEmpty(context) || !facet.values.length) {
return;
}
var contexts = facet.values.map(function (facetValue) {
@@ -1530,6 +1490,15 @@ instance.web.search.ManyToOneField = instance.web.search.CharField.extend({
return [[name, '=', facetValue.get('value')]];
}
return this._super(name, operator, facetValue);
+ },
+ get_context: function (facet) {
+ var values = facet.values;
+ if (_.isEmpty(this.attrs.context) && values.length === 1) {
+ var c = {};
+ c['default_' + this.attrs.name] = values.at(0).get('value');
+ return c;
+ }
+ return this._super(facet);
}
});
@@ -1540,6 +1509,14 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
var self = this;
this.model = new instance.web.Model('ir.filters');
this.filters = {};
+ this.view.query
+ .on('remove', function (facet) {
+ if (!facet.get('is_custom_filter')) {
+ return;
+ }
+ self.clear_selection();
+ })
+ .on('reset', this.proxy('clear_selection'));
this.$element.on('submit', 'form', this.proxy('save_current'));
this.$element.on('click', 'h4', function () {
self.$element.toggleClass('oe_opened');
@@ -1549,6 +1526,9 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
model: this.view.model
}).pipe(this.proxy('set_filters'));
},
+ clear_selection: function () {
+ this.$element.find('li.oe_selected').removeClass('oe_selected');
+ },
append_filter: function (filter) {
var self = this;
var key = _.str.sprintf('(%s)%s', filter.user_id, filter.name);
@@ -1583,8 +1563,10 @@ instance.web.search.CustomFilters = instance.web.search.Input.extend({
get_groupby: function () { return [filter.context]; },
get_domain: function () { return filter.domain; }
},
+ is_custom_filter: true,
values: [{label: filter.name, value: null}]
}]);
+ $filter.addClass('oe_selected');
});
},
set_filters: function (filters) {
@@ -1671,6 +1653,77 @@ instance.web.search.Filters = instance.web.search.Input.extend({
}));
}
});
+instance.web.search.AddToDashboard = instance.web.Widget.extend({
+ template: 'SearchView.addtodashboard',
+ _in_drawer: true,
+ start: function () {
+ var self = this;
+ this.data_loaded = $.Deferred();
+ this.dashboard_data =[];
+ this.$element
+ .on('click', 'h4', this.proxy('show_option'))
+ .on('submit', 'form', function (e) {
+ e.preventDefault();
+ self.add_dashboard();
+ });
+ return $.when(this.load_data(),this.data_loaded).pipe(this.proxy("render_data"));
+ },
+ load_data:function(){
+ var self = this,dashboard_menu = instance.webclient.menu.data.data.children;
+ var ir_model_data = new instance.web.Model('ir.model.data',{},[['name','=','menu_reporting_dashboard']]).query(['res_id']);
+ var map_data = function(result){
+ _.detect(dashboard_menu, function(dash){
+ var id = _.pluck(dash.children, "id"),indexof = _.indexOf(id, result.res_id);
+ if(indexof !== -1){
+ self.dashboard_data = dash.children[indexof].children
+ self.data_loaded.resolve();
+ return;
+ }
+ });
+ };
+ return ir_model_data._execute().done(function(result){map_data(result[0])});
+ },
+
+ render_data: function(){
+ var self = this;
+ var selection = instance.web.qweb.render("SearchView.addtodashboard.selection",{selections:this.dashboard_data});
+ this.$element.find("input").before(selection)
+ },
+ add_dashboard:function(){
+ var self = this;
+ var getParent = this.getParent();
+ var view_parent = this.getParent().getParent();
+ if (! view_parent.action || ! this.$element.find("select").val())
+ return this.do_warn("Can't find dashboard action");
+ data = getParent.build_search_data(),
+ context = new instance.web.CompoundContext(getParent.dataset.get_context() || []),
+ domain = new instance.web.CompoundDomain(getParent.dataset.get_domain() || []);
+ _.each(data.contexts, function(x) {context.add(x);});
+ _.each(data.domains, function(x) {domain.add(x);});
+ this.rpc('/web/searchview/add_to_dashboard', {
+ menu_id: this.$element.find("select").val(),
+ action_id: view_parent.action.id,
+ context_to_save: context,
+ domain: domain,
+ view_mode: view_parent.active_view,
+ name: this.$element.find("input").val()
+ }, function(r) {
+ if (r === false) {
+ self.do_warn("Could not add filter to dashboard");
+ } else {
+ self.$element.toggleClass('oe_opened');
+ self.do_notify("Filter added to dashboard", '');
+ }
+ });
+ },
+ show_option:function(){
+ this.$element.toggleClass('oe_opened');
+ if (! this.$element.hasClass('oe_opened'))
+ return;
+ this.$element.find("input").val(this.getParent().fields_view.name || "" );
+ }
+});
+
instance.web.search.Advanced = instance.web.search.Input.extend({
template: 'SearchView.advanced',
_in_drawer: true,
diff --git a/addons/web/static/src/js/view_editor.js b/addons/web/static/src/js/view_editor.js
index 9fdd4f0bca1..8733a191b21 100644
--- a/addons/web/static/src/js/view_editor.js
+++ b/addons/web/static/src/js/view_editor.js
@@ -515,21 +515,18 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
}
},
do_node_add: function(side){
- var self = this;
+ var self = this,property_to_check = [];
var tr = self.get_object_by_id(this.one_object.clicked_tr_id, this.one_object['main_object'], [])[0].att_list[0];
var parent_tr = ($(side).prevAll("tr[level=" + String(this.one_object.clicked_tr_level - 1) + "]"))[0];
var field_dataset = new instance.web.DataSetSearch(this, this.model, null, null);
- parent_tr = $(parent_tr).find('a').text();
+ parent_tr = self.get_object_by_id(parseInt($(parent_tr).attr('id').replace(/[^0-9]+/g, '')), this.one_object['main_object'], [])[0].att_list[0];
+ _.each([tr, parent_tr],function(element) {
+ var value = _.has(_CHILDREN, element) ? element : _.str.include(html_tag, element)?"html_tag":false;
+ property_to_check.push(value);
+ });
field_dataset.call( 'fields_get', [], function(result) {
var fields = _.keys(result);
fields.push(" "),fields.sort();
- var property_to_check = [];
- _.each([tr, parent_tr],function(element) {
- property_to_check.push(
- _.detect(_.keys(_CHILDREN),function(res){
- return _.str.include(element, res);
- }));
- });
self.on_add_node(property_to_check, fields);
});
},
@@ -990,7 +987,7 @@ instance.web.ViewEditor = instance.web.OldWidget.extend({
render_new_field :function( result ) {
var self = this;
var action = {
- context: {'default_model_id': result.id, 'manual': true, 'module' : result.modules},
+ context: {'default_model_id': result.id, 'manual': true, 'module' : result.model},
res_model: "ir.model.fields",
views: [[false, 'form']],
type: 'ir.actions.act_window',
@@ -1168,8 +1165,16 @@ var _CHILDREN = {
'label': [],
'button' : [],
'newline': [],
- 'separator': []
+ 'separator': [],
+ 'sheet' :['group','field','notebook','label','separator','div','page'],
+ 'kanban' : ['field'],
+ 'html_tag':['notebook', 'group', 'field', 'label', 'button','board', 'newline', 'separator']
+//e.g.:xyz 'td' : ['field']
};
+// Generic html_tag list and can be added html tag in future. It's support above _CHILDREN dict's *html_tag* by default.
+// For specific child node one has to define tag above and specify children tag in list. Like above xyz example.
+var html_tag = ['div','h1','h2','h3','h4','h5','h6','td','tr'];
+
var _ICONS = ['','STOCK_ABOUT', 'STOCK_ADD', 'STOCK_APPLY', 'STOCK_BOLD',
'STOCK_CANCEL', 'STOCK_CDROM', 'STOCK_CLEAR', 'STOCK_CLOSE', 'STOCK_COLOR_PICKER',
'STOCK_CONNECT', 'STOCK_CONVERT', 'STOCK_COPY', 'STOCK_CUT', 'STOCK_DELETE',
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index bb020f8db49..0211b934a4e 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -330,9 +330,6 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
if (self.sidebar) {
self.sidebar.do_attachement_update(self.dataset, self.datarecord.id);
}
- if (self.default_focus_field) {
- self.default_focus_field.focus();
- }
if (record.id) {
self.do_push_state({id:record.id});
}
@@ -581,6 +578,16 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
_.each(this.fields,function(field){
field.set({"force_readonly": false});
});
+ var fields_order = self.fields_order.slice(0);
+ if (self.default_focus_field) {
+ fields_order.unshift(self.default_focus_field);
+ }
+ for (var i = 0; i < fields_order.length; i += 1) {
+ var field = self.fields[fields_order[i]];
+ if (!field.get('effective_invisible') && !field.get('effective_readonly') && field.focus() !== false) {
+ break;
+ }
+ }
}
},
on_button_save: function() {
@@ -721,7 +728,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
.filter(function (f) { return !f.is_valid(); })
.map(function (f) {
return _.str.sprintf('<li>%s</li>',
- _.escape(f.node.attrs.string || f.field.string));
+ _.escape(f.string));
}).value();
warnings.unshift('<ul>');
warnings.push('</ul>');
@@ -865,7 +872,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
return {
name: name,
- string: field.node.attrs.string || field.field.string,
+ string: field.string,
value: value,
displayed: displayed,
// convert undefined to false
@@ -914,6 +921,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
register_field: function(field, name) {
this.fields[name] = field;
this.fields_order.push(name);
+ if (field.node.attrs.default_focus == '1') {
+ this.default_focus_field = field;
+ }
field.on('focused', null, this.proxy('widgetFocused'))
.on('blurred', null, this.proxy('widgetBlurred'));
@@ -1176,6 +1186,10 @@ instance.web.form.FormRenderingEngine = instance.web.form.FormRenderingEngineInt
if (!$tr || row_cols < colspan) {
$tr = $('<tr/>').addClass('oe_form_group_row').appendTo($table);
row_cols = cols;
+ } else if (tagName==='group') {
+ // When <group> <group/><group/> </group>, we need a spacing between the two groups
+ $child.addClass('oe_group_right')
+
}
row_cols -= colspan;
@@ -1520,7 +1534,9 @@ instance.web.form.FormWidget = instance.web.Widget.extend(instance.web.form.Invi
this._super.apply(this, arguments);
},
/**
- * Sets up blur/focus forwarding from DOM elements to a widget (`this`)
+ * Sets up blur/focus forwarding from DOM elements to a widget (`this`).
+ *
+ * This method is an utility method that is meant to be called by child classes.
*
* @param {jQuery} $e jQuery object of elements to bind focus/blur on
*/
@@ -1770,7 +1786,7 @@ instance.web.form.FieldInterface = {
*/
is_syntax_valid: function() {},
/**
- * Must set the focus on the field.
+ * Must set the focus on the field. Return false if field is not focusable.
*/
focus: function() {},
};
@@ -1799,8 +1815,10 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
this._super(field_manager, node);
this.field_manager = field_manager;
this.name = this.node.attrs.name;
- this.set({'value': false});
this.field = this.field_manager.get_field(this.name);
+ this.widget = this.node.attrs.widget;
+ this.string = this.node.attrs.string || this.field.string || this.name;
+ this.set({'value': false});
this.set({required: this.modifiers['required'] === true});
// some events to make the property "effective_readonly" sync automatically with "readonly" and
@@ -1872,7 +1890,7 @@ instance.web.form.AbstractField = instance.web.form.FormWidget.extend(instance.w
is_false: function() {
return this.get('value') === false;
},
- _check_css_flags: function(show_invalid) {
+ _check_css_flags: function() {
if (this.field.translate) {
this.$element.find('.oe_field_translate').toggle(!this.field_manager.is_create_mode());
}
@@ -2011,7 +2029,7 @@ instance.web.form.FieldEmail = instance.web.form.FieldChar.extend({
} else {
this.$element.find('a')
.attr('href', 'mailto:' + this.get('value'))
- .text(this.get('value'));
+ .text(this.get('value') || '');
}
},
on_button_clicked: function() {
@@ -2040,7 +2058,7 @@ instance.web.form.FieldUrl = instance.web.form.FieldChar.extend({
if (!s) {
tmp = "http://" + this.get('value');
}
- this.$element.find('a').attr('href', tmp).text(tmp);
+ this.$element.find('a').attr('href', tmp).text(this.get('value') ? tmp : '');
}
},
on_button_clicked: function() {
@@ -2455,15 +2473,16 @@ instance.web.form.CompletionFieldMixin = {
return this.orderer.add(dataset.name_search(
search_val, new instance.web.CompoundDomain(self.build_domain(), [["id", "not in", blacklist]]),
- 'ilike', this.limit + 1)).pipe(function(data) {
+ 'ilike', this.limit + 1, self.build_context())).pipe(function(data) {
self.last_search = data;
// possible selections for the m2o
var values = _.map(data, function(x) {
+ x[1] = x[1].split("\n")[0];
return {
label: _.str.escapeHTML(x[1]),
- value:x[1],
- name:x[1],
- id:x[0]
+ value: x[1],
+ name: x[1],
+ id: x[0],
};
});
@@ -2519,7 +2538,7 @@ instance.web.form.CompletionFieldMixin = {
pop.select_element(
self.field.relation,
{
- title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + (this.string || this.name),
+ title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + this.string,
initial_ids: ids ? _.map(ids, function(x) {return x[0]}) : undefined,
initial_view: view,
disable_multiple_selection: true
@@ -2548,6 +2567,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
this.last_search = [];
this.floating = false;
this.inhibit_on_change = false;
+ this.current_display = null;
},
start: function() {
this._super();
@@ -2574,8 +2594,8 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
fade: true,
});
- this.$drop_down = this.$element.find(".oe-m2o-drop-down-button");
- this.$follow_button = $(".oe-m2o-cm-button", this.$element);
+ this.$drop_down = this.$element.find(".oe_m2o_drop_down_button");
+ this.$follow_button = $(".oe_m2o_cm_button", this.$element);
this.$follow_button.click(function() {
if (!self.get('value')) {
@@ -2588,7 +2608,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
self.get("value"),
self.build_context(),
{
- title: _t("Open: ") + (self.string || self.name)
+ title: _t("Open: ") + self.string
}
);
pop.on_write_completed.add_last(function() {
@@ -2599,11 +2619,15 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
});
// some behavior for input
- this.$input.keyup(function() {
- if (self.$input.val() === "") {
- self.set({value: false});
- } else {
- self.floating = true;
+ this.$input.keydown(function() {
+ if (self.current_display !== self.$input.val()) {
+ self.current_display = self.$input.val();
+ if (self.$input.val() === "") {
+ self.set({value: false});
+ self.floating = false;
+ } else {
+ self.floating = true;
+ }
}
});
this.$drop_down.click(function() {
@@ -2641,7 +2665,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
}
self.floating = false;
}
- if (used) {
+ if (used && self.get("value") === false) {
tip_def.reject();
untip_def.reject();
tip_def = $.Deferred();
@@ -2696,7 +2720,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
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) {
+ if (e.which === 13) { // ENTER
if (isSelecting)
e.stopPropagation();
}
@@ -2717,7 +2741,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
return;
}
if (! no_recurse) {
- var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.view.dataset.get_context());
+ var dataset = new instance.web.DataSetStatic(this, this.field.relation, self.build_context());
dataset.name_get([self.get("value")], function(data) {
self.display_value["" + self.get("value")] = data[0][1];
self.render_value(true);
@@ -2727,11 +2751,13 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
display_string: function(str) {
var self = this;
if (!this.get("effective_readonly")) {
- this.$input.val(str);
+ this.$input.val(str.split("\n")[0]);
+ this.current_display = this.$input.val();
} else {
+ str = _.escape(str).split("\n").join("<br />");
this.$element.find('a')
.unbind('click')
- .text(str)
+ .html(str)
.click(function () {
self.do_action({
type: 'ir.actions.act_window',
@@ -2749,7 +2775,9 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
var self = this;
if (value_ instanceof Array) {
this.display_value = {};
- this.display_value["" + value_[0]] = value_[1];
+ if (! this.get_definition_options().always_reload) {
+ this.display_value["" + value_[0]] = value_[1];
+ }
value_ = value_[0];
}
value_ = value_ || false;
@@ -2883,25 +2911,36 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
view.embedded_view = self.field.views[mode];
}
if(view.view_type === "list") {
- view.options.selectable = self.multi_selection;
- view.options.sortable = false;
+ _.extend(view.options, {
+ selectable: self.multi_selection,
+ sortable: false,
+ import_enabled: false,
+ });
if (self.get("effective_readonly")) {
- view.options.addable = null;
- view.options.deletable = null;
- view.options.reorderable = false;
+ _.extend(view.options, {
+ addable: null,
+ deletable: null,
+ reorderable: false,
+ });
}
} else if (view.view_type === "form") {
if (self.get("effective_readonly")) {
view.view_type = 'form';
}
- view.options.not_interactible_on_create = true;
+ _.extend(view.options, {
+ not_interactible_on_create: true,
+ });
} else if (view.view_type === "kanban") {
- view.options.confirm_on_delete = false;
+ _.extend(view.options, {
+ confirm_on_delete: false,
+ });
if (self.get("effective_readonly")) {
- view.options.action_buttons = false;
- view.options.quick_creatable = false;
- view.options.creatable = false;
- view.options.read_only_mode = true;
+ _.extend(view.options, {
+ action_buttons: false,
+ quick_creatable: false,
+ creatable: false,
+ read_only_mode: true,
+ });
}
}
views.push(view);
@@ -3115,7 +3154,7 @@ instance.web.form.One2ManyViewManager = instance.web.ViewManager.extend({
var id = self.o2m.dataset.index !== null ? self.o2m.dataset.ids[self.o2m.dataset.index] : null;
var pop = new instance.web.form.FormOpenPopup(self.o2m.view);
pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(), {
- title: _t("Open: ") + self.name,
+ title: _t("Open: ") + self.o2m.string,
create_function: function(data) {
return self.o2m.dataset.create(data).then(function(r) {
self.o2m.dataset.set_ids(self.o2m.dataset.ids.concat([r.result]));
@@ -3193,7 +3232,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
pop.select_element(
self.o2m.field.relation,
{
- title: _t("Create: ") + self.name,
+ title: _t("Create: ") + self.o2m.string,
initial_view: "form",
alternative_form_view: self.o2m.field.views ? self.o2m.field.views["form"] : undefined,
create_function: function(data, callback, error_callback) {
@@ -3221,7 +3260,7 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
var self = this;
var pop = new instance.web.form.FormOpenPopup(self.o2m.view);
pop.show_element(self.o2m.field.relation, id, self.o2m.build_context(), {
- title: _t("Open: ") + self.name,
+ title: _t("Open: ") + self.o2m.string,
write_function: function(id, data) {
return self.o2m.dataset.write(id, data, {}, function(r) {
self.o2m.reload_current_view();
@@ -3495,6 +3534,7 @@ instance.web.form.FieldMany2Many = instance.web.form.AbstractField.extend({
'selectable': self.multi_selection,
'sortable': false,
'reorderable': false,
+ 'import_enabled': false,
});
var embedded = (this.field.views || {}).tree;
if (embedded) {
@@ -3539,7 +3579,7 @@ instance.web.form.Many2ManyListView = instance.web.ListView.extend(/** @lends in
pop.select_element(
this.model,
{
- title: _t("Add: ") + this.name
+ title: _t("Add: ") + this.m2m_field.string
},
new instance.web.CompoundDomain(this.m2m_field.build_domain(), ["!", ["id", "in", this.m2m_field.dataset.ids]]),
this.m2m_field.build_context()
@@ -3559,7 +3599,7 @@ instance.web.form.Many2ManyListView = instance.web.ListView.extend(/** @lends in
var self = this;
var pop = new instance.web.form.FormOpenPopup(this);
pop.show_element(this.dataset.model, id, this.m2m_field.build_context(), {
- title: _t("Open: ") + this.name,
+ title: _t("Open: ") + this.m2m_field.string,
readonly: this.getParent().get("effective_readonly")
});
pop.on_write_completed.add_last(function() {
@@ -3657,7 +3697,7 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(
pop.select_element(
this.field.relation,
{
- title: _t("Add: ") + this.name
+ title: _t("Add: ") + this.string
},
new instance.web.CompoundDomain(this.build_domain(), ["!", ["id", "in", this.dataset.ids]]),
this.build_context()
@@ -3675,7 +3715,7 @@ instance.web.form.FieldMany2ManyKanban = instance.web.form.AbstractField.extend(
var id = self.dataset.ids[self.dataset.index];
var pop = new instance.web.form.FormOpenPopup(self.view);
pop.show_element(self.field.relation, id, self.build_context(), {
- title: _t("Open: ") + self.name,
+ title: _t("Open: ") + self.string,
write_function: function(id, data, options) {
return self.dataset.write(id, data, {}).then(function() {
self.reload_content();
@@ -3846,7 +3886,7 @@ instance.web.form.AbstractFormPopup = instance.web.OldWidget.extend({
if (this.options.alternative_form_view) {
this.view_form.set_embedded_view(this.options.alternative_form_view);
}
- this.view_form.appendTo(this.$element.find(".oe-form-view-popup-form-placeholder"));
+ this.view_form.appendTo(this.$element.find(".oe_popup_form"));
this.view_form.on_loaded.add_last(function() {
var $buttons = self.view_form.$element.find(".oe_form_buttons");
var multi_select = self.row_id === null && ! self.options.disable_multiple_selection;
@@ -3975,9 +4015,10 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
_.extend({'deletable': false,
'selectable': !self.options.disable_multiple_selection,
'read_only': true,
+ 'import_enabled': false,
}, self.options.list_view_options || {}));
self.view_list.popup = self;
- self.view_list.appendTo($(".oe-select-create-popup-view-list", self.$element)).pipe(function() {
+ self.view_list.appendTo($(".oe_popup_list", self.$element)).pipe(function() {
self.view_list.do_show();
}).pipe(function() {
self.searchview.do_search();
@@ -3999,7 +4040,7 @@ instance.web.form.SelectCreatePopup = instance.web.form.AbstractFormPopup.extend
});
});
});
- this.searchview.appendTo($(".oe-select-create-popup-view-list", self.$element));
+ this.searchview.appendTo($(".oe_popup_list", self.$element));
},
do_search: function(domains, contexts, groupbys) {
var self = this;
@@ -4161,9 +4202,9 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this._super.apply(this, arguments);
},
initialize_content: function() {
- this.$element.find('input.oe-binary-file').change(this.on_file_change);
- this.$element.find('button.oe_binary_file_save').click(this.on_save_as);
- this.$element.find('.oe-binary-file-clear').click(this.on_clear);
+ this.$element.find('input.oe_form_binary_file').change(this.on_file_change);
+ this.$element.find('button.oe_form_binary_file_save').click(this.on_save_as);
+ this.$element.find('.oe_form_binary_file_clear').click(this.on_clear);
},
human_filesize : function(size) {
var units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
@@ -4180,10 +4221,10 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
// http://deepliquid.com/projects/Jcrop/demos.php?demo=handler
if ($(e.target).val() !== '') {
- this.$element.find('form.oe-binary-form input[name=session_id]').val(this.session.session_id);
- this.$element.find('form.oe-binary-form').submit();
- this.$element.find('.oe-binary-progress').show();
- this.$element.find('.oe-binary').hide();
+ this.$element.find('form.oe_form_binary_form input[name=session_id]').val(this.session.session_id);
+ this.$element.find('form.oe_form_binary_form').submit();
+ this.$element.find('.oe_form_binary_progress').show();
+ this.$element.find('.oe_form_binary').hide();
}
},
on_file_uploaded: function(size, name, content_type, file_base64) {
@@ -4195,8 +4236,8 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this.filename = name;
this.on_file_uploaded_and_valid.apply(this, arguments);
}
- this.$element.find('.oe-binary-progress').hide();
- this.$element.find('.oe-binary').show();
+ this.$element.find('.oe_form_binary_progress').hide();
+ this.$element.find('.oe_form_binary').show();
},
on_file_uploaded_and_valid: function(size, name, content_type, file_base64) {
},
@@ -4206,7 +4247,7 @@ instance.web.form.FieldBinary = instance.web.form.AbstractField.extend(instance.
this.do_warn(_t("Save As..."), _t("The field is empty, there's nothing to save !"));
ev.stopPropagation();
} else if (this._dirty_flag) {
- var link = this.$('.oe_binary_file_save_data')[0];
+ var link = this.$('.oe_form_binary_file_save_data')[0];
link.download = this.filename || "download.bin"; // Works on only on Google Chrome
//link.target = '_blank';
link.href = "data:application/octet-stream;base64," + value;
@@ -4335,10 +4376,13 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
});
instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
- tagName: "span",
+ template: "FieldStatus",
start: function() {
this._super();
this.selected_value = null;
+ if (this.$element.parent().is('header')) {
+ this.$element.after('<div class="oe_clear"/>');
+ }
// preview in start only for selection fields, because of the dynamic behavior of many2one fields.
if (this.field.type in ['selection']) {
this.render_list();
@@ -4450,6 +4494,9 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
elem.css("color", color);
}
},
+ focus: function() {
+ return false;
+ },
});
/**
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 92b633bf54d..4d2d1b4245f 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -24,6 +24,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
// if true, the view can't be editable, ignoring the view's and the context's
// instructions
'read_only': false,
+ // if true, the 'Import', 'Export', etc... buttons will be shown
+ 'import_enabled': true,
},
/**
* Core class for list-type displays.
@@ -140,13 +142,13 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
});
},
/**
- * View startup method, the default behavior is to set the ``oe-listview``
+ * View startup method, the default behavior is to set the ``oe_list``
* class on its root element and to perform an RPC load call.
*
* @returns {$.Deferred} loading promise
*/
start: function() {
- this.$element.addClass('oe-listview').css('position: relative');
+ this.$element.addClass('oe_list');
return this.reload_view(null, null, true);
},
/**
@@ -250,18 +252,19 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
this.setup_columns(this.fields_view.fields, grouped);
this.$element.html(QWeb.render(this._template, this));
+ this.$element.addClass(this.fields_view.arch.attrs['class']);
// Head hook
// Selecting records
- this.$element.find('.all-record-selector').click(function(){
- self.$element.find('.oe-record-selector input').prop('checked',
- self.$element.find('.all-record-selector').prop('checked') || false);
+ this.$element.find('.oe_list_record_selector').click(function(){
+ self.$element.find('.oe_list_record_selector input').prop('checked',
+ self.$element.find('.oe_list_record_selector').prop('checked') || false);
var selection = self.groups.get_selection();
$(self.groups).trigger(
'selected', [selection.ids, selection.records]);
});
// Sorting columns
- this.$element.find('thead').delegate('th.oe-sortable[data-id]', 'click', function (e) {
+ this.$element.find('thead').delegate('th.oe_sortable[data-id]', 'click', function (e) {
e.stopPropagation();
var $this = $(this);
self.dataset.sort($this.data('id'));
@@ -270,7 +273,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
} else {
$this.toggleClass("sortdown");
}
- $this.siblings('.oe-sortable').removeClass("sortup sortdown");
+ $this.siblings('.oe_sortable').removeClass("sortup sortdown");
self.reload_content();
});
@@ -322,7 +325,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
self.page = 0;
}
self.reload_content();
- }).find('.oe-pager-state')
+ }).find('.oe_list_pager_state')
.click(function (e) {
e.stopPropagation();
var $this = $(this);
@@ -340,6 +343,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
self._limit = (isNaN(val) ? null : val);
self.page = 0;
self.reload_content();
+ }).blur(function() {
+ $(this).trigger('change');
})
.val(self._limit || 'NaN');
});
@@ -372,18 +377,19 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
}
var total = dataset.size();
- this.$pager.toggleClass('oe_list_pager_single_page', (total <= this.limit()));
+ var limit = this.limit() || total;
+ this.$pager.toggleClass('oe_list_pager_single_page', (total <= limit));
var spager = '-';
if (total) {
- var range_start = this.page * this.limit() + 1;
- var range_stop = range_start - 1 + this.limit();
+ var range_start = this.page * limit + 1;
+ var range_stop = range_start - 1 + limit;
if (range_stop > total) {
range_stop = total;
}
spager = _.str.sprintf('%d-%d of %d', range_start, range_stop, total);
}
- this.$pager.find('.oe-pager-state').text(spager);
+ this.$pager.find('.oe_list_pager_state').text(spager);
},
/**
* Sets up the listview's columns: merges view and fields data, move
@@ -542,10 +548,10 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
*/
reload_content: function () {
var self = this;
- self.$element.find('.all-record-selector').prop('checked', false);
+ self.$element.find('.oe_list_record_selector').prop('checked', false);
this.records.reset();
var reloaded = $.Deferred();
- this.$element.find('.oe-listview-content').append(
+ this.$element.find('.oe_list_content').append(
this.groups.render(function () {
if (self.dataset.index == null) {
var has_one = false;
@@ -810,7 +816,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
},
display_aggregates: function (aggregation) {
var self = this;
- var $footer_cells = this.$element.find('.oe-list-footer');
+ var $footer_cells = this.$element.find('.oe_list_footer');
_(this.aggregate_columns).each(function (column) {
if (!column['function']) {
return;
@@ -848,9 +854,9 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
}
// Padding for column titles, footer and data rows
var $rows = this.$element
- .find('.oe-listview-header-columns, tr:not(thead tr)')
+ .find('.oe_list_header_columns, tr:not(thead tr)')
.not(options['except']);
- var newcols = new Array(count+1).join('<td class="oe-listview-padding"></td>');
+ var newcols = new Array(count+1).join('<td class="oe_list_padding"></td>');
if (options.position === 'before') {
$rows.prepend(newcols);
} else {
@@ -861,7 +867,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
* Removes all padding columns of the table
*/
unpad_columns: function () {
- this.$element.find('.oe-listview-padding').remove();
+ this.$element.find('.oe_list_padding').remove();
if (this.previous_colspan) {
this.$element
.find('thead tr:first th')
@@ -976,18 +982,18 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
this.$_element = $('<tbody>')
.appendTo(document.body)
- .delegate('th.oe-record-selector', 'click', function (e) {
+ .delegate('th.oe_list_record_selector', 'click', function (e) {
e.stopPropagation();
var selection = self.get_selection();
$(self).trigger(
'selected', [selection.ids, selection.records]);
})
- .delegate('td.oe-record-delete button', 'click', function (e) {
+ .delegate('td.oe_list_record_delete button', 'click', function (e) {
e.stopPropagation();
var $row = $(e.target).closest('tr');
$(self).trigger('deleted', [[self.row_id($row)]]);
})
- .delegate('td.oe-field-cell button', 'click', function (e) {
+ .delegate('td.oe_list_field_cell button', 'click', function (e) {
e.stopPropagation();
var $target = $(e.currentTarget),
field = $target.closest('td').data('field'),
@@ -1085,20 +1091,20 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
}
var cells = [];
if (this.options.selectable) {
- cells.push('<th class="oe-record-selector"></td>');
+ cells.push('<th class="oe_list_record_selector"></td>');
}
_(this.columns).each(function(column) {
if (column.invisible === '1') {
return;
}
if (column.tag === 'button') {
- cells.push('<td class="oe-button" title="' + column.string + '">&nbsp;</td>');
+ cells.push('<td class="oe_button" title="' + column.string + '">&nbsp;</td>');
} else {
cells.push('<td title="' + column.string + '">&nbsp;</td>');
}
});
if (this.options.deletable) {
- cells.push('<td class="oe-record-delete"><button type="button" style="visibility: hidden"> </button></td>');
+ cells.push('<td class="oe_list_record_delete"><button type="button" style="visibility: hidden"> </button></td>');
}
cells.unshift('<tr>');
cells.push('</tr>');
@@ -1119,7 +1125,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
return result;
}
var records = this.records;
- this.$current.find('th.oe-record-selector input:checked')
+ this.$current.find('th.oe_list_record_selector input:checked')
.closest('tr').each(function () {
var record = records.get($(this).data('id'));
result.ids.push(record.get('id'));
@@ -1287,7 +1293,7 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
});
this.$row.children().last()
.append($prev)
- .append('<span class="oe-pager-state"></span>')
+ .append('<span class="oe_list_pager_state"></span>')
.append($next);
},
open: function (point_insertion) {
@@ -1353,13 +1359,18 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
}
placeholder.appendChild($row[0]);
- var $group_column = $('<th class="oe-group-name">').appendTo($row);
+ var $group_column = $('<th class="oe_list_group_name">').appendTo($row);
// Don't fill this if group_by_no_leaf but no group_by
if (group.grouped_on) {
var row_data = {};
row_data[group.grouped_on] = group;
var group_column = _(self.columns).detect(function (column) {
return column.id === group.grouped_on; });
+ if (! group_column) {
+ throw new Error(_.str.sprintf(
+ _t("Grouping on field '%s' is not possible because that field does not appear in the list view."),
+ group.grouped_on));
+ }
try {
$group_column.html(instance.web.format_cell(
row_data, group_column, {
@@ -1403,7 +1414,7 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
}
});
if (self.options.deletable) {
- $row.append('<td class="oe-group-pagination">');
+ $row.append('<td class="oe_list_group_pagination">');
}
});
return placeholder;
@@ -1454,11 +1465,11 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
} else {
if (dataset.size() == records.length) {
// only one page
- self.$row.find('td.oe-group-pagination').empty();
+ self.$row.find('td.oe_list_group_pagination').empty();
} else {
var pages = Math.ceil(dataset.size() / limit);
self.$row
- .find('.oe-pager-state')
+ .find('.oe_list_pager_state')
.text(_.str.sprintf(_t("%(page)d/%(page_count)d"), {
page: page + 1,
page_count: pages
diff --git a/addons/web/static/src/js/view_tree.js b/addons/web/static/src/js/view_tree.js
index 9e938fe293a..e8bd7351f1f 100644
--- a/addons/web/static/src/js/view_tree.js
+++ b/addons/web/static/src/js/view_tree.js
@@ -84,6 +84,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
'fields': this.fields,
'toolbar': has_toolbar
}));
+ this.$element.addClass(this.fields_view.arch.attrs['class']);
this.dataset.read_slice(this.fields_list()).then(function(records) {
if (!has_toolbar) {
@@ -179,7 +180,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
}
});
if (is_loaded === 0) {
- if (!$this.parent().hasClass('oe-open')) {
+ if (!$this.parent().hasClass('oe_open')) {
self.getdata(record_id, children_ids);
}
} else {
@@ -208,7 +209,7 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
});
if ($curr_node.length) {
- $curr_node.addClass('oe-open');
+ $curr_node.addClass('oe_open');
$curr_node.after(children_rows);
} else {
self.$element.find('tbody').html(children_rows);
@@ -247,11 +248,11 @@ instance.web.TreeView = instance.web.View.extend(/** @lends instance.web.TreeVie
// show & hide the contents
showcontent: function (record_id, show) {
this.$element.find('#treerow_' + record_id)
- .toggleClass('oe-open', show);
+ .toggleClass('oe_open', show);
_(this.records[record_id][this.children_field]).each(function (child_id) {
var $child_row = this.$element.find('#treerow_' + child_id);
- if ($child_row.hasClass('oe-open')) {
+ if ($child_row.hasClass('oe_open')) {
this.showcontent(child_id, false);
}
$child_row.toggle(show);
diff --git a/addons/web/static/src/js/views.js b/addons/web/static/src/js/views.js
index 35901e90165..cd2ccb72c49 100644
--- a/addons/web/static/src/js/views.js
+++ b/addons/web/static/src/js/views.js
@@ -136,7 +136,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
};
}
if (action.target === 'new') {
- if (this.dialog == null) {
+ if (this.dialog === null) {
this.dialog = new instance.web.Dialog(this, { width: '80%' });
if(on_close)
this.dialog.on_close.add(on_close);
@@ -144,8 +144,9 @@ instance.web.ActionManager = instance.web.Widget.extend({
this.dialog_viewmanager.destroy();
}
this.dialog.dialog_title = action.name;
- this.dialog_viewmanager = new instance.web.ViewManagerAction(this, action);
+ this.dialog_viewmanager = new instance.web.ViewManagerAction(this.dialog, action);
this.dialog_viewmanager.appendTo(this.dialog.$element);
+ this.dialog_viewmanager.$element.addClass("oe_view_manager_" + (action.target || 'current'));
this.dialog.open();
} else {
this.dialog_stop();
@@ -158,7 +159,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
this.inner_action = action;
this.inner_viewmanager = new instance.web.ViewManagerAction(this, action);
this.inner_viewmanager.appendTo(this.$element);
- this.inner_viewmanager.$element.addClass("oe_view_manager_global");
+ this.inner_viewmanager.$element.addClass("oe_view_manager_" + (action.target || 'current'));
}
},
ir_actions_act_window_close: function (action, on_closed) {
@@ -862,13 +863,13 @@ instance.web.Sidebar = instance.web.Widget.extend({
});
self.items['files'] = attachments;
self.redraw();
- this.$('.oe_sidebar_add_attachment .oe-binary-file').change(this.on_attachment_changed);
+ this.$('.oe_sidebar_add_attachment .oe_form_binary_file').change(this.on_attachment_changed);
this.$element.find('.oe_sidebar_delete_item').click(this.on_attachment_delete);
},
on_attachment_changed: function(e) {
var $e = $(e.target);
if ($e.val() !== '') {
- this.$element.find('form.oe-binary-form').submit();
+ this.$element.find('form.oe_form_binary_form').submit();
$e.parent().find('input[type=file]').prop('disabled', true);
$e.parent().find('button').prop('disabled', true).find('img, span').toggle();
this.$('.oe_sidebar_add_attachment span').text(_t('Uploading...'));
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 8eee2bcc6bb..a85e8817ad8 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -27,9 +27,9 @@
</t>
<t t-name="CrashManager.warning">
- <table cellspacing="0" cellpadding="0" border="0" class="oe-dialog-warning">
+ <table cellspacing="0" cellpadding="0" border="0" class="oe_dialog_warning">
<tr>
- <td><img t-att-src='_s + "/web/static/src/img/warning.png"' class="oe-dialog-icon"/></td>
+ <td><img t-att-src='_s + "/web/static/src/img/warning.png"' class="oe_dialog_icon"/></td>
<td>
<p>
<t t-js="d">
@@ -537,7 +537,7 @@
<t t-name="TreeView">
<select t-if="toolbar" style="width: 30%">
</select>
- <table class="oe-treeview-table">
+ <table class="oe_tree_table">
<thead>
<tr>
<th t-foreach="fields_view" t-as="field"
@@ -557,7 +557,7 @@
t-att-data-id="record.id" t-att-data-level="level + 1">
<t t-set="children" t-value="record[children_field]"/>
<t t-set="class" t-value="children and children.length ? 'treeview-tr' : 'treeview-td'"/>
- <t t-set="rank" t-value="'oe-treeview-first'"/>
+ <t t-set="rank" t-value="'oe_tree_first'"/>
<t t-set="style" t-value="'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;'"/>
<td t-foreach="fields_view" t-as="field"
@@ -576,7 +576,7 @@
</td>
</tr>
-<table t-name="ListView" class="oe-listview-content">
+<table t-name="ListView" class="oe_list_content">
<t t-set="columns_count" t-value="visible_columns.length + (options.selectable ? 1 : 0) + (options.deletable ? 1 : 0)"/>
<thead>
<tr t-if="(!!options.action_buttons and !options.$buttons) or (!!options.pager and !options.$pager)">
@@ -586,18 +586,18 @@
<div class="oe_list_pager"/>
</th>
</tr>
- <tr t-if="options.header" class="oe-listview-header-columns">
+ <tr t-if="options.header" class="oe_list_header_columns">
<t t-foreach="columns" t-as="column">
<th t-if="column.meta">
<t t-esc="column.string"/>
</th>
</t>
<th t-if="options.selectable" width="1" >
- <input type="checkbox" class="all-record-selector"/>
+ <input type="checkbox" class="oe_list_record_selector"/>
</th>
<t t-foreach="columns" t-as="column">
<th t-if="!column.meta and column.invisible !== '1'" t-att-data-id="column.id"
- t-att-class="((options.sortable and column.tag !== 'button') ? 'oe-sortable' : null)">
+ t-att-class="((options.sortable and column.tag !== 'button') ? 'oe_sortable' : null)">
<t t-if="column.tag !== 'button'"><t t-esc="column.string"/></t>
</th>
</t>
@@ -607,7 +607,7 @@
<tfoot>
<tr>
<td t-if="options.selectable"/>
- <td t-foreach="aggregate_columns" t-as="column" class="oe-list-footer oe_number"
+ <td t-foreach="aggregate_columns" t-as="column" class="oe_list_footer oe_number"
t-att-data-field="column.id" t-att-title="column.label">
</td>
<td t-if="options.deletable"/>
@@ -619,7 +619,7 @@
<button type="button" class="oe_button oe_list_add oe_highlight">
<t t-esc="widget.options.addable"/>
</button>
- <span class="oe_alternative">
+ <span class="oe_alternative" t-if="widget.options.import_enabled">
<span class="oe_fade">or</span> <a href="#" class="oe_bold oe_list_button_import">Import</a>
</span>
</t>
@@ -627,7 +627,7 @@
<t t-name="ListView.pager">
<div class="oe_list_pager" t-att-colspan="widget.columns_count">
<t t-if="!widget.no_leaf and widget.options.pager !== false" t-call="ViewPager">
- <span class="oe-pager-state">
+ <span class="oe_list_pager_state">
</span>
</t>
</div>
@@ -647,8 +647,8 @@
</td>
</t>
- <th t-if="options.selectable" class="oe-record-selector" width="1">
- <t t-set="checked" t-value="(options.select_view_id and options.select_view_id == record.get('id')) ? 'checked' : null"/>
+ <th t-if="options.selectable" class="oe_list_record_selector" width="1">
+ <t t-set="checked" t-value="options.select_view_id == record.get('id') ? 'checked' : null"/>
<input t-if="options.radio" type="radio" name="radiogroup" t-att-checked="checked"/>
<input t-if="!options.radio" type="checkbox" name="radiogroup" t-att-checked="checked"/>
</th>
@@ -656,12 +656,12 @@
<t t-set="number" t-value="column.type === 'integer' or column.type == 'float'"/>
<t t-set="modifiers" t-value="column.modifiers_for(asData)"/>
<td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"
- t-attf-class="oe-field-cell oe_list_field_#{column.widget or column.type} #{number ? 'oe_number' : ''} #{column.tag === 'button' ? 'oe-button' : ''} #{modifiers.readonly ? 'oe_readonly' : ''}"
+ t-attf-class="oe_list_field_cell oe_list_field_#{column.widget or column.type} #{number ? 'oe_number' : ''} #{column.tag === 'button' ? 'oe-button' : ''} #{modifiers.readonly ? 'oe_readonly' : ''}"
t-att-data-field="column.id">
<t t-raw="render_cell(record, column)"/>
</td>
</t>
- <td t-if="options.deletable" class='oe-record-delete' width="1">
+ <td t-if="options.deletable" class='oe_list_record_delete' width="1">
<button type="button" name="delete" class="oe_i">d</button>
</td>
</tr>
@@ -688,7 +688,7 @@
<button type="button" class="oe_button oe_form_button_create">Create</button>
</span>
<span class="oe_form_buttons_edit">
- <button type="button" class="oe_button oe_form_button_save oe_highlight_on_dirty">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel">Discard</a>
+ <button type="button" class="oe_button oe_form_button_save oe_highlight">Save</button> <span class="oe_fade">or</span> <a href="#" class="oe_bold oe_form_button_cancel">Discard</a>
</span>
</t>
</div>
@@ -865,7 +865,7 @@
</ul>
</t>
<t t-name="FieldChar">
- <span t-att-class="'oe_form_field '+widget.widget_class">
+ <span t-att-class="'oe_form_field '+widget.widget_class" t-att-style="widget.node.attrs.style">
<t t-if="!widget.get('effective_readonly')">
<input t-att-type="widget.password ? 'password' : 'text'"
t-att-id="widget.id_for_label"
@@ -877,8 +877,8 @@
</span>
</t>
<t t-name="FieldEmail">
- <span class="oe_form_field oe_form_field_email oe_form_field_with_button">
- <a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/>
+ <span class="oe_form_field oe_form_field_email" t-att-style="widget.node.attrs.style">
+ <a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri" target="_blank"/>
<t t-if="!widget.get('effective_readonly')">
<div>
<input type="text"
@@ -895,20 +895,15 @@
<t t-jquery="span:first">
this.removeClass('oe_form_field_email').addClass('oe_form_field_url');
</t>
- <t t-jquery="button.oe_button" t-operation="replace">
- <button class="oe_button" tabindex="-1" type="button" title="Open this resource">
- <img t-att-src='_s + "/web/static/src/img/icons/gtk-ok.png"'/>
- </button>
- </t>
</t>
<t t-name="FieldText">
- <div class="oe_form_field oe_form_field_text">
+ <div class="oe_form_field oe_form_field_text" t-att-style="widget.node.attrs.style">
<textarea rows="6"
t-att-name="widget.name"
class="field_text"
t-att-tabindex="widget.node.attrs.tabindex"
t-att-autofocus="widget.node.attrs.autofocus"
- t-att-placeholder="widget.node.attrs.placeholder"
+ t-att-placeholder="! widget.get('effective_readonly') ? widget.node.attrs.placeholder : ''"
></textarea>
<img class="oe_field_translate oe_input_icon" t-if="widget.field.translate"
t-att-src='_s + "/web/static/src/img/icons/terp-translate.png"' width="16" height="16" border="0"/>
@@ -927,13 +922,13 @@
</span>
</t>
<t t-name="FieldDate">
- <span class="oe_form_field oe_datepicker_root oe_form_field_date"/>
+ <span class="oe_form_field oe_datepicker_root oe_form_field_date" t-att-style="widget.node.attrs.style"/>
</t>
<t t-name="FieldDatetime">
- <span class="oe_form_field oe_datepicker_root oe_form_field_datetime"/>
+ <span class="oe_form_field oe_datepicker_root oe_form_field_datetime" t-att-style="widget.node.attrs.style"/>
</t>
<t t-name="FieldSelection">
- <span class="oe_form_field oe_form_field_selection">
+ <span class="oe_form_field oe_form_field_selection" t-att-style="widget.node.attrs.style">
<select t-if="!widget.get('effective_readonly')"
t-att-name="widget.name"
t-att-tabindex="widget.node.attrs.tabindex"
@@ -946,10 +941,10 @@
</span>
</t>
<t t-name="FieldMany2One">
- <span class="oe_form_field oe_form_field_many2one oe_form_field_with_button">
+ <span class="oe_form_field oe_form_field_many2one oe_form_field_with_button" t-att-style="widget.node.attrs.style">
<a t-if="widget.get('effective_readonly')" href="#" class="oe_form_uri"/>
<t t-if="!widget.get('effective_readonly')">
- <button class="oe_button oe-m2o-cm-button" title="Open Resource">
+ <button class="oe_button oe_m2o_cm_button" title="Open Resource">
<img t-att-src='_s + "/web/static/src/img/icons/terp-folder-yellow.png"'/>
</button>
<div>
@@ -959,7 +954,7 @@
t-att-autofocus="widget.node.attrs.autofocus"
t-att-placeholder="widget.node.attrs.placeholder"
/>
- <span class="oe-m2o-drop-down-button">
+ <span class="oe_m2o_drop_down_button">
<img t-att-src='_s + "/web/static/src/img/down-arrow.png"'/>
</span>
</div>
@@ -967,9 +962,10 @@
</span>
</t>
<t t-name="FieldMany2ManyTags">
- <div class="oe_form_field oe_form_field_many2manytags">
+ <div class="oe_form_field oe_form_field_many2manytags" t-att-style="widget.node.attrs.style">
<t t-if="! widget.get('effective_readonly')">
- <textarea rows="1" style="width: 100%"></textarea>
+ <textarea rows="1" style="width: 100%"
+ t-att-placeholder="widget.node.attrs.placeholder"></textarea>
</t>
</div>
</t>
@@ -983,7 +979,7 @@
</t>
</t>
<t t-name="FieldReference">
- <table class="oe_form_field oe_form_field_reference" border="0" cellpadding="0" cellspacing="0">
+ <table class="oe_form_field oe_form_field_reference" border="0" cellpadding="0" cellspacing="0" t-att-style="widget.node.attrs.style">
<tr>
<td t-attf-class="oe_form_frame_cell oe_form_selection">
<span t-attf-class="oe_form_view_reference_selection"/>
@@ -995,7 +991,7 @@
</table>
</t>
<t t-name="FieldBoolean">
- <span class="oe_form_field oe_form_field_boolean">
+ <span class="oe_form_field oe_form_field_boolean" t-att-style="widget.node.attrs.style">
<input type="checkbox"
t-att-id="widget.id_for_label"
t-att-name="widget.name"
@@ -1005,24 +1001,24 @@
</span>
</t>
<t t-name="FieldProgressBar">
- <span class="oe_form_field oe_form_field_progressbar" t-opentag="true">
+ <span class="oe_form_field oe_form_field_progressbar" t-att-style="widget.node.attrs.style">
<span></span>
</span>
</t>
+<t t-name="FieldStatus">
+ <ul class="oe_form_steps" t-att-style="widget.node.attrs.style"/>
+</t>
<t t-name="FieldStatus.content">
- <ul class="oe_form_steps">
- <t t-set="size" t-value="widget.to_show.length"/>
- <t t-foreach="_.range(size)" t-as="i">
- <li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : ''">
- <span><t t-esc="widget.to_show[i][1]"/></span>
- <img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
- </li>
- </t>
- </ul>
- <div class="oe_clear"/>
+ <t t-set="size" t-value="widget.to_show.length"/>
+ <t t-foreach="_.range(size)" t-as="i">
+ <li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : ''">
+ <span><t t-esc="widget.to_show[i][1]"/></span>
+ <img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
+ </li>
+ </t>
</t>
<t t-name="FieldBinaryImage">
- <span class="oe_form_field oe_form_field_image">
+ <span class="oe_form_field oe_form_field_image" t-att-style="widget.node.attrs.style">
<div class="oe_form_field_image_controls oe_edit_only">
<t t-call="HiddenInputFile">
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
@@ -1030,10 +1026,10 @@
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
</button>
</t>
- <button class="oe_button oe-binary-file-clear" type="button" title="Clear">
+ <button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
</button>
- <div class="oe-binary-progress" style="display: none">
+ <div class="oe_form_binary_progress" style="display: none">
<img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
<b>Uploading ...</b>
</div>
@@ -1050,7 +1046,7 @@
</t>
<t t-name="FieldBinaryFile">
<t t-if="!widget.get('effective_readonly')">
- <table class="oe_form_field oe_form_field_binary" cellpadding="0" cellspacing="0" border="0">
+ <table class="oe_form_field oe_form_field_binary" cellpadding="0" cellspacing="0" border="0" t-att-style="widget.node.attrs.style">
<tr>
<td>
<input type="text" size="1" readonly="readonly"
@@ -1060,7 +1056,7 @@
class="field_binary"
/>
</td>
- <td class="oe-binary" nowrap="true">
+ <td class="oe_form_binary" nowrap="true">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
@@ -1074,15 +1070,15 @@
</t>
</td>
<td>
- <a class="oe_binary_file_save_data">
- <button class="oe_button oe_binary_file_save" type="button" title="Save As">
+ <a class="oe_form_binary_file_save_data">
+ <button class="oe_button oe_form_binary_file_save" type="button" title="Save As">
<img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/>
<span>Save As</span>
</button>
</a>
</td>
<td>
- <button class="oe_button oe-binary-file-clear" type="button" title="Clear">
+ <button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
<span>Clear</span>
</button>
@@ -1090,7 +1086,7 @@
</tr>
</table>
</td>
- <td class="oe-binary-progress" style="display: none" nowrap="true">
+ <td class="oe_form_binary_progress" style="display: none" nowrap="true">
<img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
<b>Uploading ...</b>
</td>
@@ -1098,25 +1094,26 @@
</table>
</t>
<t t-if="widget.get('effective_readonly')">
- <span>
+ <span t-att-style="widget.node.attrs.style">
<a href="javascript:void(0)" class="oe_form_uri"/>
</span>
</t>
</t>
<t t-name="HiddenInputFile">
<div t-attf-class="oe_hidden_input_file #{fileupload_class or ''}" t-att-style="fileupload_style">
- <form class="oe-binary-form" t-att-target="fileupload_id"
+ <form class="oe_form_binary_form" t-att-target="fileupload_id"
method="post" enctype="multipart/form-data" t-att-action="fileupload_action || '/web/binary/upload'">
<input type="hidden" name="session_id" value=""/>
<input type="hidden" name="callback" t-att-value="fileupload_id"/>
<t t-raw="__content__"/>
- <input type="file" class="oe-binary-file" name="ufile"/>
+ <input type="file" class="oe_form_binary_file" name="ufile"/>
</form>
<iframe t-att-id="fileupload_id" t-att-name="fileupload_id" style="display: none"/>
</div>
</t>
<t t-name="WidgetButton">
<button type="button" class="oe_button oe_form_button"
+ t-att-style="widget.node.attrs.style"
t-att-tabindex="widget.node.attrs.tabindex"
t-att-autofocus="widget.node.attrs.autofocus">
<img t-if="widget.node.attrs.icon" t-att-src="_s + '/web/static/src/img/icons/' + widget.node.attrs.icon + '.png'" width="16" height="16"/>
@@ -1205,7 +1202,7 @@
<div t-name="SearchView" class="oe_searchview">
<div class="oe_searchview_facets"/>
<div class="oe_searchview_clear"/>
- <div class="oe_searchview_unfold_drawer"/>
+ <div class="oe_searchview_unfold_drawer" title="Advanced Search..."/>
<div class="oe_searchview_drawer"/>
</div>
@@ -1229,7 +1226,7 @@
</span>
<t t-name="SearchView.managed-filters">
- <option class="oe-filters-title" value="">Filters</option>
+ <option class="oe_search_filters_title" value="">Filters</option>
<optgroup label="-- Filters --">
<t t-foreach="filters" t-as="filter">
<option t-attf-value="get:#{filter_index}"
@@ -1242,7 +1239,6 @@
<optgroup label="-- Actions --">
<option value="advanced_filter">Add Advanced Filter</option>
<option value="save_filter">Save Filter</option>
- <option value="add_to_dashboard">Add to Dashboard</option>
<option value="manage_filters">Manage Filters</option>
</optgroup>
</t>
@@ -1253,18 +1249,9 @@
<p>(Any existing filter with the same name will be replaced)</p>
</div>
</t>
-<t t-name="SearchView.add_to_dashboard">
- <div>
- <p><b>Select Dashboard to add this filter to:</b></p>
- <select style="width: 100%; margin-right: 1em;">
- <option t-foreach="dashboards" t-as="menu" t-att-value="menu.id" t-att-selected="(menu.id == selected_menu_id) || undefined"><t t-esc="menu.name"/></option>
- </select>
- <p><b>Title of new Dashboard item:</b></p>
- <input type="text" style="width: 100%; margin-right: 1em;"/>
- </div>
-</t>
+
<t t-name="SearchView.render_lines">
- <table class="oe-searchview-render-line" border="0" cellspacing="0" cellpadding="0"
+ <table class="oe_search_render_line" border="0" cellspacing="0" cellpadding="0"
t-foreach="lines" t-as="line">
<tr>
<td t-foreach="line" t-as="widget" class="oe_searchview_field">
@@ -1401,6 +1388,20 @@
<div>
</div>
</div>
+<div t-name="SearchView.addtodashboard" class="oe_searchview_dashboard">
+ <h4>Add to Dashboard</h4>
+ <form>
+ <input placeholder ="Title of new Dashboard item" title = "Title of new Dashboard item" type="text"/>
+ <button class="oe_apply" type="submit">save</button>
+ </form>
+</div>
+<t t-name="SearchView.addtodashboard.selection">
+ <select title = "Select Dashboard to add this filter to">
+ <t t-foreach="selections" t-as="element">
+ <option t-att-value="element.id || element.res_id "><t t-esc="element.name"/></option>
+ </t>
+ </select>
+</t>
<div t-name="SearchView.advanced" class="oe_searchview_advanced">
<h4>Advanced Search</h4>
<form>
@@ -1450,16 +1451,16 @@
<table style="width:100%">
<tr style="width:100%">
<td style="width:100%">
- <div class="oe-select-create-popup-view-search" style="width:100%"></div>
+ <div class="oe_popup_search" style="width:100%"></div>
</td>
</tr>
<tr style="width:100%">
<td style="width:100%">
- <div class="oe-select-create-popup-view-list" style="width:100%"></div>
+ <div class="oe_popup_list" style="width:100%"></div>
</td>
</tr>
</table>
- <div class="oe-form-view-popup-form-placeholder oe-select-create-popup-view-form" style="width:100%"></div>
+ <div class="oe_popup_form" style="width:100%"></div>
</div>
</t>
<t t-name="SelectCreatePopup.search.buttons">
@@ -1468,14 +1469,23 @@
</t>
<t t-name="AbstractFormPopup.buttons">
<t t-if="! multi_select">
- <button type="button" class="oe_button oe_abstractformpopup-form-save">Save</button>
+ <button type="button" class="oe_button oe_abstractformpopup-form-save oe_highlight">Save</button>
</t>
<t t-if="multi_select">
- <button type="button" class="oe_button oe_abstractformpopup-form-save-new">Save &amp; New</button>
- <button type="button" class="oe_button oe_abstractformpopup-form-save">Save &amp; Close</button>
+ <button type="button" class="oe_button oe_abstractformpopup-form-save-new oe_highlight">Save &amp; New</button>
+ <button type="button" class="oe_button oe_abstractformpopup-form-save oe_highlight">Save &amp; Close</button>
</t>
<button type="button" class="oe_button oe_abstractformpopup-form-close">Cancel</button>
</t>
+<t t-extend="ListView.row">
+ <!-- adds back padding to row being rendered after edition, if necessary
+ (if not deletable add back padding), otherwise the row being added is
+ missing columns
+ -->
+ <t t-jquery="&gt; :last" t-operation="after">
+ <td t-if="edited and !options.deletable" class="oe-listview-padding"/>
+ </t>
+</t>
<t t-name="view_editor">
<table class="oe_view_editor">
@@ -1543,7 +1553,7 @@
<t t-name="ExportView">
<a id="exportview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Export</a>
</t>
-<table t-name="ExportTreeView" class="oe-export"
+<table t-name="ExportTreeView" class="oe_export"
style="background-color: #F3F3F3;">
<tr>
<td colspan="3">
@@ -1648,7 +1658,7 @@
</t>
<t t-name="ImportDataView">
<form name="import_data" id="import_data" action="" method="post" enctype="multipart/form-data"
- class="oe-import oe-import-no-result">
+ class="oe_import oe_import_no_result">
<input type="hidden" name="session_id" t-att-value="widget.session.session_id"/>
<h2 class="separator horizontal">1. Import a .CSV file</h2>
<p>Select a .CSV file to import. If you need a sample of file to import,
@@ -1658,9 +1668,9 @@
<label for="csvfile">CSV File:</label>
<input type="file" id="csvfile" size="50" name="csvfile"/>
</p>
- <h2 class="separator horizontal oe-import-result">2. Check your file format</h2>
- <div id="result" class="oe-import-result"></div>
- <fieldset class="oe-closed oe-import-result">
+ <h2 class="separator horizontal oe_import_result">2. Check your file format</h2>
+ <div id="result" class="oe_import_result"></div>
+ <fieldset class="oe_closed oe_import_result">
<legend>Import Options</legend>
<table>
<tr>
@@ -1700,7 +1710,7 @@
</tr>
<tr>
<td t-foreach="records[0]" t-as="column">
- <input class="sel_fields" placeholder="--- Don't Import ---"/><span class="oe-m2o-drop-down-button">
+ <input class="sel_fields" placeholder="--- Don't Import ---"/><span class="oe_m2o_drop_down_button">
<img t-att-src='_s + "/web/static/src/img/down-arrow.png"' /></span>
</td>
</tr>