[IMP] rewrite of search view/view manager
Second part of a large refactoring. Lots of cleanup, simpler code organization, and it should be faster.
This commit is contained in:
+198
-356
@@ -752,59 +752,6 @@
|
||||
filter: alpha(opacity=50);
|
||||
opacity: 0.5;
|
||||
}
|
||||
.openerp .oe_sidebar {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment {
|
||||
height: 20px;
|
||||
cursor: pointer;
|
||||
padding-left: 6px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment span {
|
||||
font-weight: bold;
|
||||
}
|
||||
.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment .oe_hidden_input_file {
|
||||
width: 200px;
|
||||
}
|
||||
.openerp .oe_sidebar .oe_dropdown_menu .oe_sidebar_add_attachment:hover {
|
||||
background-color: #efeff8;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0fa), to(#eeeef6));
|
||||
background-image: -webkit-linear-gradient(top, #f0f0fa, #eeeef6);
|
||||
background-image: -moz-linear-gradient(top, #f0f0fa, #eeeef6);
|
||||
background-image: -ms-linear-gradient(top, #f0f0fa, #eeeef6);
|
||||
background-image: -o-linear-gradient(top, #f0f0fa, #eeeef6);
|
||||
background-image: linear-gradient(to bottom, #f0f0fa, #eeeef6);
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 4px;
|
||||
display: none;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
padding: 1px;
|
||||
color: #8786b7;
|
||||
line-height: 8px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 1px 1px white;
|
||||
}
|
||||
.openerp .oe_sidebar .oe_dropdown_menu li .oe_sidebar_delete_item:hover {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
background: #8786b7;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.openerp .oe_sidebar .oe_dropdown_menu li:hover .oe_sidebar_delete_item {
|
||||
display: inline-block;
|
||||
}
|
||||
.openerp .oe_loading {
|
||||
display: none;
|
||||
z-index: 1001;
|
||||
@@ -1044,6 +991,22 @@
|
||||
.openerp .oe_application {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.openerp .oe_application > div {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_application .oe-view-manager .oe-view-manager-debug {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.openerp .oe_application .oe-view-manager .oe-view-manager-content {
|
||||
display: table-row;
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_application .oe-view-manager-body {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_application .oe-view-manager-body a {
|
||||
color: #7C7BAD;
|
||||
@@ -1051,42 +1014,26 @@
|
||||
.openerp .oe_application .oe-view-manager-body .oe-view-manager-view-kanban:not(:empty) {
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_application > div {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_application > div > .oe_view_manager > .oe_view_manager_wrapper {
|
||||
display: table-row;
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_application > div > .oe_view_manager > .oe_view_manager_wrapper > div {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_application > div > .oe_view_manager > .oe_view_manager_wrapper > div > .oe_view_manager_body {
|
||||
.openerp .oe_application .oe-view-manager-body > div {
|
||||
position: absolute;
|
||||
position: static\9;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.openerp .oe_application .oe_breadcrumb_item:not(:last-child) {
|
||||
max-width: 7em;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
.openerp .oe_application .oe_form_field_one2many .oe-view-manager-views {
|
||||
position: initial;
|
||||
}
|
||||
.openerp .oe_application .oe_breadcrumb_title > * {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
font-weight: bold;
|
||||
.openerp .oe-view-manager {
|
||||
display: table;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe-view-manager-header {
|
||||
height: 90px;
|
||||
overflow: visible;
|
||||
border-bottom: 1px solid black;
|
||||
display: none;
|
||||
display: table-row;
|
||||
background-color: #f0eeee;
|
||||
border-bottom: 1px solid #afafb6;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-right-toolbar {
|
||||
float: right;
|
||||
@@ -1095,26 +1042,34 @@
|
||||
display: inline-block;
|
||||
}
|
||||
.openerp .oe-view-manager-header .row {
|
||||
height: 45px;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-title {
|
||||
float: left;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-header-title {
|
||||
.openerp .oe-view-manager-header .row:first-child {
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
.openerp .oe-view-manager-header .row:last-child {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe_tag {
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-title {
|
||||
font-size: 18px;
|
||||
padding-left: 0;
|
||||
margin: 0;
|
||||
background-color: #f0eeee;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-manager-search-view {
|
||||
float: right;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-manager-switch .oe-vm-switch-kanban:before {
|
||||
content: "";
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-manager-switch .oe-vm-switch-list:before {
|
||||
content: "";
|
||||
content: "";
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-manager-switch .oe-vm-switch-form:before {
|
||||
content: "";
|
||||
@@ -1128,14 +1083,27 @@
|
||||
.openerp .oe-view-manager-header .oe-view-manager-switch .oe-vm-switch-gantt:before {
|
||||
content: "";
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-manager-switch .oe-vm-switch-pivot:before {
|
||||
content: "";
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-manager-buttons {
|
||||
float: left;
|
||||
display: inline-block;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-view-manager-buttons > div {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe_pager_value {
|
||||
.openerp .oe-view-manager-header .oe-view-manager-sidebar {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe_form_buttons {
|
||||
padding: 0;
|
||||
}
|
||||
.openerp .oe-view-manager-header .oe-pager-buttons {
|
||||
min-height: 30px;
|
||||
}
|
||||
.openerp .oe_view_manager_inline > .oe-view-manager-header, .openerp .oe_view_manager_inlineview > .oe-view-manager-header {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_application > div > div > .oe-view-manager-body {
|
||||
position: absolute;
|
||||
@@ -1145,12 +1113,6 @@
|
||||
right: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
.openerp .oe_view_manager_inline, .openerp .oe_view_manager_inlineview {
|
||||
height: 100%;
|
||||
}
|
||||
.openerp .oe_view_manager_inline > .oe_view_manager_header, .openerp .oe_view_manager_inlineview > .oe_view_manager_header {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_popup_form {
|
||||
display: table;
|
||||
}
|
||||
@@ -1163,71 +1125,33 @@
|
||||
.openerp .oe_popup_list_pager {
|
||||
float: right;
|
||||
}
|
||||
.openerp .oe_popup_search {
|
||||
width: 50%;
|
||||
float: right;
|
||||
}
|
||||
.openerp .oe_searchview {
|
||||
cursor: text;
|
||||
position: relative;
|
||||
padding: 1px 0;
|
||||
min-width: 400px;
|
||||
width: 400px;
|
||||
-moz-border-radius: 13px;
|
||||
-webkit-border-radius: 13px;
|
||||
border-radius: 13px;
|
||||
}
|
||||
.openerp .oe_searchview input, .openerp .oe_searchview textarea {
|
||||
padding: 3px;
|
||||
height: 14px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.openerp .oe_searchview input:not([type]), .openerp .oe_searchview input[type="text"], .openerp .oe_searchview input[type="number"] {
|
||||
width: 156px;
|
||||
height: 22px;
|
||||
}
|
||||
.openerp .oe_searchview input[type="checkbox"] {
|
||||
margin: 3px 3px 3px 4px;
|
||||
}
|
||||
.openerp .oe_searchview select {
|
||||
margin: 2px 4px 2px 0;
|
||||
}
|
||||
.openerp .oe_searchview.oe_focused {
|
||||
border-color: #a6a6fe;
|
||||
-moz-box-shadow: 0 1px 2px #a6a6fe inset;
|
||||
-webkit-box-shadow: 0 1px 2px #a6a6fe inset;
|
||||
box-shadow: 0 1px 2px #a6a6fe inset;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_clear {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: 18px;
|
||||
width: 15px;
|
||||
height: 24px;
|
||||
display: none;
|
||||
height: auto;
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_unfold_drawer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #ccc;
|
||||
top: 8px;
|
||||
left: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_unfold_drawer:hover {
|
||||
color: #999;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_unfold_drawer:before {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
right: 18px;
|
||||
width: 0;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_search {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
right: 6px;
|
||||
top: 8px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets {
|
||||
min-height: 22px;
|
||||
margin: 2px 35px 0 20px;
|
||||
margin: 2px 20px 0 10px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets * {
|
||||
vertical-align: top;
|
||||
@@ -1235,18 +1159,21 @@
|
||||
font-size: 100%;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet {
|
||||
height: 20px;
|
||||
margin: 1px 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet:focus {
|
||||
outline: none;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .label {
|
||||
-moz-border-radius: 0px;
|
||||
-webkit-border-radius: 0px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input {
|
||||
padding: 0 0 0 6px;
|
||||
font-size: 12px;
|
||||
height: 16px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input:focus {
|
||||
outline: none;
|
||||
@@ -1257,9 +1184,6 @@
|
||||
padding: 0;
|
||||
-webkit-font-smoothing: auto;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet span {
|
||||
height: 18px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet:focus {
|
||||
border-color: #a6a6fe;
|
||||
-moz-box-shadow: 0 0 3px 1px #a6a6fe;
|
||||
@@ -1280,11 +1204,15 @@
|
||||
font-size: 16px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value {
|
||||
border-left: 1px solid #afafb6;
|
||||
color: #4C4C4C;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value:last-child {
|
||||
padding-right: 16px;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value:first-child {
|
||||
border-left: none;
|
||||
}
|
||||
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_remove {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
@@ -1310,8 +1238,8 @@
|
||||
.openerp .oe_searchview .oe-autocomplete {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
background-color: white;
|
||||
width: 400px;
|
||||
border: 1px solid #afafb6;
|
||||
z-index: 666;
|
||||
margin-top: 2px;
|
||||
@@ -1319,9 +1247,6 @@
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.openerp .oe_searchview .oe-autocomplete ul {
|
||||
list-style-type: none;
|
||||
@@ -1353,216 +1278,133 @@
|
||||
.openerp .oe_searchview .oe-autocomplete ul li.oe-separator:last-child {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_searchview_drawer_container {
|
||||
overflow: auto;
|
||||
}
|
||||
.openerp .oe_searchview_drawer {
|
||||
display: none;
|
||||
.openerp .oe-search-options a {
|
||||
padding-left: 25px;
|
||||
padding-right: 25px;
|
||||
width: 100%;
|
||||
cursor: default;
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #afafb6;
|
||||
text-align: left;
|
||||
padding: 8px 0;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .badge {
|
||||
font-size: 12px;
|
||||
line-height: 12px;
|
||||
.openerp .oe-search-options .oe-apply-filter {
|
||||
margin-left: 25px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer > div:first-child {
|
||||
border: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
.openerp .oe_searchview_drawer > div:first-child li:hover:not(.badge) {
|
||||
background-color: #f0f0fa;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .col-md-5 {
|
||||
padding-left: 0;
|
||||
}
|
||||
.openerp .oe_searchview_drawer dl {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.openerp .oe_searchview_drawer dt {
|
||||
color: #7C7BAD;
|
||||
font-size: 13px;
|
||||
line-height: 24px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer dd {
|
||||
line-height: 24px;
|
||||
font-size: 13px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer h4, .openerp .oe_searchview_drawer h4 * {
|
||||
margin: 0 0 0 2px;
|
||||
padding-left: 20px;
|
||||
cursor: pointer;
|
||||
font-weight: normal;
|
||||
display: inline-block;
|
||||
}
|
||||
.openerp .oe_searchview_drawer h4:hover, .openerp .oe_searchview_drawer h4 *:hover {
|
||||
background-color: #f0f0fa;
|
||||
}
|
||||
.openerp .oe_searchview_drawer h4:before {
|
||||
content: "▸ ";
|
||||
color: #a3a3a3;
|
||||
}
|
||||
.openerp .oe_searchview_drawer button {
|
||||
margin: 4px 0;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .button {
|
||||
border: none;
|
||||
background: transparent;
|
||||
padding: 0 2px;
|
||||
-moz-box-shadow: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_section ul {
|
||||
margin: 0 8px;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_section li {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
margin-right: 8px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_section li > span {
|
||||
display: inline-block;
|
||||
max-width: 250px;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: bottom;
|
||||
overflow: hidden;
|
||||
}
|
||||
.openerp .oe_searchview_drawer form {
|
||||
margin-left: 12px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer form p {
|
||||
margin: 4px 0;
|
||||
line-height: 18px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer form button {
|
||||
margin: 0 0 8px -3px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_savefilter form {
|
||||
.openerp .oe-search-options .oe-add-filter-menu {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom li {
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
line-height: 14px;
|
||||
margin-right: 0;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom li button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 5px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom li a {
|
||||
.openerp .oe-search-options .oe-add-condition {
|
||||
width: auto;
|
||||
margin-left: 10px;
|
||||
position: inherit;
|
||||
visibility: hidden;
|
||||
display: inline-block;
|
||||
padding-left: 0;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom li span:hover:not(.badge) {
|
||||
background-color: #f0f0fa;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom li:hover a {
|
||||
visibility: visible;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom label {
|
||||
font-weight: normal;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_dashboard form {
|
||||
display: none;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_advanced {
|
||||
overflow: auto;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_advanced form {
|
||||
display: none;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_advanced button.oe_add_condition:before {
|
||||
content: "Z";
|
||||
font-family: "entypoRegular" !important;
|
||||
font-size: 24px;
|
||||
font-weight: 300 !important;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_advanced ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_advanced li {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_advanced li:first-child .searchview_extended_prop_or {
|
||||
visibility: hidden;
|
||||
margin-left: -14px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_advanced .searchview_extended_prop_or {
|
||||
opacity: 0.5;
|
||||
margin-left: -14px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_opened h4:before {
|
||||
content: "▾ ";
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_opened form {
|
||||
.openerp .oe-search-options .selected {
|
||||
display: block;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom_delete, .openerp .oe_searchview_drawer .searchview_extended_delete_prop {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
line-height: 12px;
|
||||
padding: 1px;
|
||||
color: #8786b7;
|
||||
line-height: 8px;
|
||||
text-align: center;
|
||||
.openerp .oe-search-options .selected a {
|
||||
font-weight: bold;
|
||||
text-shadow: 0 1px 1px white;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom_delete:hover, .openerp .oe_searchview_drawer .searchview_extended_delete_prop:hover {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
background: #8786b7;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom_delete {
|
||||
display: none;
|
||||
.openerp .oe-search-options .selected a:before {
|
||||
font-family: FontAwesome;
|
||||
position: absolute;
|
||||
bottom: 1px;
|
||||
right: 4px;
|
||||
left: 6px;
|
||||
top: 3px;
|
||||
content: "";
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom_private:hover .oe_searchview_custom_delete, .openerp .oe_searchview_drawer .oe_searchview_custom_public:hover .oe_searchview_custom_delete {
|
||||
.openerp .oe-search-options .oe-group-selector {
|
||||
margin: 3px 25px;
|
||||
min-width: calc(100% - 40px);
|
||||
max-width: 250px;
|
||||
width: auto;
|
||||
}
|
||||
.openerp .oe-search-options .divider {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe-search-options .filters-menu .divider {
|
||||
display: list-item;
|
||||
}
|
||||
.openerp .oe-search-options .closed-menu a:before {
|
||||
font-family: FontAwesome;
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
top: 3px;
|
||||
content: "";
|
||||
}
|
||||
.openerp .oe-search-options .open-menu a:before {
|
||||
font-family: FontAwesome;
|
||||
position: absolute;
|
||||
left: 9px;
|
||||
top: 3px;
|
||||
content: "";
|
||||
}
|
||||
.openerp .oe-search-options .oe-select-group {
|
||||
margin: 3px 25px;
|
||||
}
|
||||
.openerp .oe-search-options .oe-add-group {
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe-search-options .oe-save-name {
|
||||
display: none;
|
||||
margin: 3px 25px;
|
||||
}
|
||||
.openerp .oe-search-options .oe-save-name span {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.openerp .oe-search-options .oe-save-name span input {
|
||||
margin-left: 0;
|
||||
}
|
||||
.openerp .oe-search-options .searchview_extended_prop_field {
|
||||
display: inline;
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
.openerp .oe-search-options .searchview_extended_prop_op {
|
||||
margin: 3px 0;
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
.openerp .oe-search-options .searchview_extended_delete_prop {
|
||||
float: right;
|
||||
display: inline;
|
||||
}
|
||||
.openerp .oe-search-options .searchview_extended_prop_value {
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
.openerp .oe-search-options .searchview_extended_prop_value > select, .openerp .oe-search-options .searchview_extended_prop_value > input {
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
.openerp .oe-search-options .searchview_extended_prop_value .oe_datepicker_main {
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
.openerp .oe-search-options .searchview_extended_prop_value .oe_datepicker_master {
|
||||
width: 100%;
|
||||
}
|
||||
.openerp .oe-search-options .searchview_extended_prop_value .fa-calendar {
|
||||
margin-left: -21px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.openerp .oe-search-options span.fa-trash-o {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.openerp .oe-search-options .dropdown-menu > li {
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.openerp .oe-search-options .dropdown-menu li.oe-filter-condition {
|
||||
white-space: normal;
|
||||
padding-left: 25px;
|
||||
padding-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.openerp .oe-search-options a {
|
||||
display: inline-block;
|
||||
}
|
||||
.openerp .oe_searchview_drawer .oe_searchview_custom_public:after {
|
||||
content: ",";
|
||||
font-family: "entypoRegular" !important;
|
||||
font-size: 22px;
|
||||
font-weight: 300 !important;
|
||||
margin: 0 0 0 4px;
|
||||
padding: 0;
|
||||
.openerp input.oe-save-name {
|
||||
width: auto;
|
||||
}
|
||||
.openerp .oe_pager_value {
|
||||
display: inline-block;
|
||||
}
|
||||
.openerp .oe_view_nocontent {
|
||||
padding: 15px;
|
||||
@@ -1996,6 +1838,10 @@
|
||||
.openerp .oe_form .oe_datepicker_root {
|
||||
display: inline-block;
|
||||
}
|
||||
.openerp .oe_form .oe_datepicker_root .datepickerbutton {
|
||||
margin-left: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.openerp .oe_form .oe_form_required input:not([disabled]):not([readonly]), .openerp .oe_form .oe_form_required select:not([disabled]):not([readonly]), .openerp .oe_form .oe_form_required textarea:not([disabled]):not([readonly]) {
|
||||
background-color: #D2D2FF !important;
|
||||
}
|
||||
@@ -2737,6 +2583,8 @@
|
||||
}
|
||||
.openerp .oe_debug_view {
|
||||
float: left;
|
||||
margin-top: 5px;
|
||||
width: auto;
|
||||
}
|
||||
.openerp .oe_debug_view_log {
|
||||
font-size: 95%;
|
||||
@@ -2796,9 +2644,6 @@
|
||||
font-size: 11px;
|
||||
background-color: #7c7bad;
|
||||
}
|
||||
.openerp button, .openerp body {
|
||||
line-height: normal;
|
||||
}
|
||||
.openerp h1, .openerp h2 {
|
||||
font-weight: bold;
|
||||
}
|
||||
@@ -2836,9 +2681,6 @@
|
||||
}
|
||||
|
||||
@-moz-document url-prefix() {
|
||||
.openerp .oe_searchview .oe_searchview_search {
|
||||
top: -1px;
|
||||
}
|
||||
.openerp .oe_form_field_many2one .oe_m2o_cm_button {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
+179
-320
@@ -653,44 +653,6 @@ $sheet-padding: 16px
|
||||
border-right: 4px solid transparent
|
||||
border-top: 4px solid#404040
|
||||
@include opacity(0.5)
|
||||
.oe_sidebar
|
||||
white-space: nowrap
|
||||
.oe_dropdown_menu
|
||||
.oe_sidebar_add_attachment
|
||||
height: 20px
|
||||
cursor: pointer
|
||||
padding-left: 6px
|
||||
margin-top: 6px
|
||||
span
|
||||
font-weight: bold
|
||||
.oe_hidden_input_file
|
||||
width: 200px
|
||||
&:hover
|
||||
@include vertical-gradient(#f0f0fa, #eeeef6)
|
||||
@include box-shadow(none)
|
||||
li
|
||||
.oe_sidebar_delete_item
|
||||
position: absolute
|
||||
top: 4px
|
||||
right: 4px
|
||||
display: none
|
||||
width: 12px
|
||||
height: 12px
|
||||
padding: 1px
|
||||
color: #8786b7
|
||||
line-height: 8px
|
||||
text-align: center
|
||||
font-weight: bold
|
||||
text-shadow: 0 1px 1px white
|
||||
&:hover
|
||||
text-decoration: none
|
||||
color: white
|
||||
background: #8786b7
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4)
|
||||
@include radius(2px)
|
||||
&:hover
|
||||
.oe_sidebar_delete_item
|
||||
display: inline-block
|
||||
// }}}
|
||||
// Loading {{{
|
||||
.oe_loading
|
||||
@@ -899,67 +861,70 @@ $sheet-padding: 16px
|
||||
.oe_application
|
||||
width: 100%
|
||||
height: 100%
|
||||
overflow: hidden
|
||||
> div
|
||||
position: relative
|
||||
height: 100%
|
||||
.oe-view-manager
|
||||
.oe-view-manager-debug
|
||||
margin-right: 5px
|
||||
.oe-view-manager-content
|
||||
display: table-row
|
||||
height: 100%
|
||||
|
||||
.oe-view-manager-body
|
||||
position: relative
|
||||
height: 100%
|
||||
a
|
||||
color: $link-color
|
||||
.oe-view-manager-view-kanban:not(:empty)
|
||||
height: 100%
|
||||
> div
|
||||
position: relative
|
||||
height: 100%
|
||||
> .oe_view_manager
|
||||
> .oe_view_manager_wrapper
|
||||
display: table-row
|
||||
height: 100%
|
||||
> div
|
||||
position: relative
|
||||
height: 100%
|
||||
> .oe_view_manager_body
|
||||
position: absolute
|
||||
position: static\9
|
||||
top: 0
|
||||
bottom: 0
|
||||
left: 0
|
||||
right: 0
|
||||
overflow: auto
|
||||
> div
|
||||
position: absolute
|
||||
top: 0
|
||||
bottom: 0
|
||||
left: 0
|
||||
right: 0
|
||||
overflow: auto
|
||||
.oe_form_field_one2many
|
||||
.oe-view-manager-views
|
||||
position: initial
|
||||
|
||||
|
||||
.oe_breadcrumb_item:not(:last-child)
|
||||
max-width: 7em
|
||||
white-space: nowrap
|
||||
text-overflow: ellipsis
|
||||
.oe_breadcrumb_title > *
|
||||
display: inline-block
|
||||
overflow: hidden
|
||||
font-weight: bold
|
||||
// }}}
|
||||
// ViewManager common {{{
|
||||
.oe-view-manager
|
||||
display: table
|
||||
width: 100%
|
||||
height: 100%
|
||||
.oe-view-manager-header
|
||||
height: 90px
|
||||
overflow: visible
|
||||
border-bottom: 1px solid black
|
||||
display: none
|
||||
display: table-row
|
||||
background-color: rgb(240, 238, 238)
|
||||
border-bottom: 1px solid #afafb6
|
||||
.oe-right-toolbar
|
||||
float: right
|
||||
> div
|
||||
display: inline-block
|
||||
.row
|
||||
height: 45px
|
||||
.oe-view-title
|
||||
float: left
|
||||
font-size: 18px
|
||||
font-weight: bold
|
||||
margin: 0
|
||||
.oe-header-title
|
||||
.row:first-child
|
||||
padding-top: 3px
|
||||
padding-bottom: 3px
|
||||
.row:last-child
|
||||
padding-bottom: 10px
|
||||
.oe_tag
|
||||
@include radius(0px)
|
||||
.oe-view-title
|
||||
font-size: 18px
|
||||
padding-left: 0
|
||||
margin: 0
|
||||
background-color: rgb(240, 238, 238)
|
||||
.oe-view-manager-search-view
|
||||
float: right
|
||||
padding-top: 5px
|
||||
.oe-view-manager-switch
|
||||
.oe-vm-switch-kanban:before
|
||||
content: "\f009"
|
||||
.oe-vm-switch-list:before
|
||||
content: "\f0c9"
|
||||
content: ""
|
||||
.oe-vm-switch-form:before
|
||||
content: "\f044"
|
||||
.oe-vm-switch-graph:before
|
||||
@@ -968,12 +933,22 @@ $sheet-padding: 16px
|
||||
content: "\f073"
|
||||
.oe-vm-switch-gantt:before
|
||||
content: "\f0ae"
|
||||
.oe-vm-switch-pivot:before
|
||||
content: "\f0ce"
|
||||
.oe-view-manager-buttons
|
||||
float: left
|
||||
display: inline-block
|
||||
> div
|
||||
display: none
|
||||
.oe_pager_value
|
||||
display: inline-block
|
||||
.oe-view-manager-sidebar
|
||||
display: inline-block
|
||||
float: right
|
||||
.oe_form_buttons
|
||||
padding: 0
|
||||
.oe-pager-buttons
|
||||
min-height: 30px
|
||||
.oe_view_manager_inline, .oe_view_manager_inlineview
|
||||
> .oe-view-manager-header
|
||||
display: none
|
||||
.oe_application
|
||||
> div
|
||||
> div
|
||||
@@ -985,26 +960,6 @@ $sheet-padding: 16px
|
||||
right: 0
|
||||
overflow: auto
|
||||
// }}}
|
||||
// ViewManager application {{{
|
||||
// .oe_view_manager_current
|
||||
// height: 100%
|
||||
// > .oe_view_manager_header
|
||||
// border-bottom: 1px solid #cacaca
|
||||
// @include vertical-gradient(#fcfcfc, #dedede)
|
||||
// @include box-shadow((0 1px 0 rgba(255,255,255,0.4), 0 0 9px rgba(0,0,0,0.1)))
|
||||
// .oe_header_row
|
||||
// td
|
||||
// padding: 8px
|
||||
// .oe_header_row:first-child
|
||||
// td
|
||||
// padding-top: 8px
|
||||
// }}}
|
||||
// ViewManager inline {{{
|
||||
.oe_view_manager_inline, .oe_view_manager_inlineview
|
||||
height: 100%
|
||||
> .oe_view_manager_header
|
||||
display: none
|
||||
// }}}
|
||||
// FormPopup {{{
|
||||
.oe_popup_form
|
||||
display: table
|
||||
@@ -1016,77 +971,48 @@ $sheet-padding: 16px
|
||||
// End of customize
|
||||
.oe_popup_list_pager
|
||||
float: right
|
||||
.oe_popup_search
|
||||
width: 50%
|
||||
float: right
|
||||
// }}}
|
||||
// SearchView {{{
|
||||
.oe_searchview
|
||||
cursor: text
|
||||
position: relative
|
||||
padding: 1px 0
|
||||
min-width: 400px
|
||||
width: 400px
|
||||
@include radius(13px)
|
||||
input, textarea
|
||||
padding: 3px
|
||||
height: 14px
|
||||
font-size: 12px
|
||||
line-height: 18px
|
||||
//Customize searchview input, select
|
||||
input:not([type]), input[type="text"], input[type="number"]
|
||||
width: 156px
|
||||
height: 22px
|
||||
input[type="checkbox"]
|
||||
margin: 3px 3px 3px 4px
|
||||
select
|
||||
margin: 2px 4px 2px 0
|
||||
//End of customize
|
||||
&.oe_focused
|
||||
border-color: $tag-border-selected
|
||||
@include box-shadow(0 1px 2px $tag-border-selected inset)
|
||||
.oe_searchview_clear
|
||||
cursor: pointer
|
||||
position: absolute
|
||||
top: 3px
|
||||
right: 18px
|
||||
width: 15px
|
||||
height: 24px
|
||||
display: none
|
||||
height: auto
|
||||
padding-top: 1px
|
||||
padding-bottom: 1px
|
||||
.oe_searchview_unfold_drawer
|
||||
position: absolute
|
||||
top: 0
|
||||
right: 0
|
||||
color: #ccc
|
||||
top: 8px
|
||||
left: 5px
|
||||
cursor: pointer
|
||||
&:hover
|
||||
color: #999
|
||||
&:before
|
||||
position: absolute
|
||||
top: 7px
|
||||
right: 18px
|
||||
width: 0
|
||||
|
||||
.oe_searchview_search
|
||||
cursor: pointer
|
||||
position: absolute
|
||||
left: 6px
|
||||
right: 6px
|
||||
top: 8px
|
||||
|
||||
.oe_searchview_facets
|
||||
min-height: 22px
|
||||
margin: 2px 35px 0 20px
|
||||
margin: 2px 20px 0 10px
|
||||
*
|
||||
vertical-align: top
|
||||
display: inline-block
|
||||
font-size: 100%
|
||||
.oe_searchview_facet
|
||||
height: 20px
|
||||
margin: 1px 0
|
||||
font-size: 11px
|
||||
&:focus
|
||||
outline: none
|
||||
.label
|
||||
@include radius(0px)
|
||||
.oe_searchview_input
|
||||
padding: 0 0 0 6px
|
||||
font-size: 12px
|
||||
height: 16px
|
||||
margin-top: 3px
|
||||
&:focus
|
||||
outline: none
|
||||
.oe_searchview_facet
|
||||
@@ -1095,8 +1021,6 @@ $sheet-padding: 16px
|
||||
padding: 0
|
||||
-webkit-font-smoothing: auto
|
||||
// spacing for opera, FF
|
||||
span
|
||||
height: 18px
|
||||
&:focus
|
||||
border-color: $tag-border-selected
|
||||
@include box-shadow(0 0 3px 1px $tag-border-selected)
|
||||
@@ -1110,9 +1034,12 @@ $sheet-padding: 16px
|
||||
.oe_facet_category.oe_i
|
||||
font-size: 16px
|
||||
.oe_facet_value
|
||||
border-left: 1px solid #afafb6
|
||||
color: #4C4C4C
|
||||
&:last-child
|
||||
padding-right: 16px
|
||||
&:first-child
|
||||
border-left: none
|
||||
.oe_facet_remove
|
||||
position: absolute
|
||||
top: 3px
|
||||
@@ -1135,14 +1062,13 @@ $sheet-padding: 16px
|
||||
.oe-autocomplete
|
||||
display: none
|
||||
position: absolute
|
||||
width: 300px
|
||||
background-color: white
|
||||
width: 400px
|
||||
border: 1px solid #afafb6
|
||||
z-index: 666
|
||||
margin-top: 2px
|
||||
cursor: default
|
||||
@include radius(3px)
|
||||
@include box-shadow(0 1px 4px rgba(0, 0, 0, 0.3))
|
||||
ul
|
||||
list-style-type: none
|
||||
padding-left: 0
|
||||
@@ -1166,180 +1092,112 @@ $sheet-padding: 16px
|
||||
li.oe-separator:last-child
|
||||
display: none
|
||||
|
||||
|
||||
.oe_searchview_drawer_container
|
||||
overflow: auto
|
||||
.oe_searchview_drawer
|
||||
display: none
|
||||
width: 100%
|
||||
cursor: default
|
||||
display: none
|
||||
overflow: hidden
|
||||
border-bottom: 1px solid $tag-border
|
||||
text-align: left
|
||||
padding: 8px 0
|
||||
.badge
|
||||
font-size: 12px
|
||||
line-height: 12px
|
||||
> div:first-child
|
||||
border: none
|
||||
padding-left: 0
|
||||
li:hover:not(.badge)
|
||||
background-color: $hover-background
|
||||
.col-md-5
|
||||
padding-left: 0
|
||||
dl
|
||||
margin-bottom: 0
|
||||
dt
|
||||
color: $section-title-color
|
||||
font-size: 13px
|
||||
line-height: 24px
|
||||
dd
|
||||
line-height: 24px
|
||||
font-size: 13px
|
||||
padding-top: 3px
|
||||
h4, h4 *
|
||||
margin: 0 0 0 2px
|
||||
padding-left: 20px
|
||||
cursor: pointer
|
||||
font-weight: normal
|
||||
display: inline-block
|
||||
&:hover
|
||||
background-color: $hover-background
|
||||
h4:before
|
||||
content: "▸ "
|
||||
color: #a3a3a3
|
||||
button
|
||||
margin: 4px 0
|
||||
.button
|
||||
border: none
|
||||
background: transparent
|
||||
padding: 0 2px
|
||||
@include box-shadow(none)
|
||||
@include radius(0)
|
||||
.oe_searchview_section
|
||||
ul
|
||||
margin: 0 8px
|
||||
padding: 0
|
||||
list-style: none
|
||||
display: inline
|
||||
li
|
||||
display: inline-block
|
||||
cursor: pointer
|
||||
position: relative
|
||||
margin-right: 8px
|
||||
> span
|
||||
display: inline-block
|
||||
max-width: 250px
|
||||
text-overflow: ellipsis
|
||||
vertical-align: bottom
|
||||
overflow: hidden
|
||||
form
|
||||
margin-left: 12px
|
||||
p
|
||||
margin: 4px 0
|
||||
line-height: 18px
|
||||
button
|
||||
margin: 0 0 8px -3px // Managed margin-left according bootstrap3
|
||||
.oe_searchview_savefilter
|
||||
form
|
||||
display: none
|
||||
.oe_searchview_custom
|
||||
.oe-search-options
|
||||
a
|
||||
padding-left: 25px
|
||||
padding-right: 25px
|
||||
width: 100%
|
||||
-webkit-user-select: none
|
||||
-moz-user-select: none
|
||||
user-select: none
|
||||
.oe-apply-filter
|
||||
margin-left: 25px
|
||||
.oe-add-filter-menu
|
||||
display: none
|
||||
li
|
||||
cursor: pointer
|
||||
position: relative
|
||||
line-height: 14px
|
||||
margin-right: 0
|
||||
button
|
||||
position: absolute
|
||||
top: 0
|
||||
right: 5px
|
||||
a
|
||||
margin-left: 10px
|
||||
position: inherit
|
||||
visibility: hidden
|
||||
display: inline-block
|
||||
span:hover:not(.badge)
|
||||
background-color: $hover-background
|
||||
li:hover a
|
||||
visibility: visible
|
||||
//Customize for searchview label
|
||||
label
|
||||
font-weight: normal
|
||||
//End of Customize
|
||||
.oe_searchview_dashboard
|
||||
form
|
||||
display: none
|
||||
margin-top: 2px
|
||||
.oe-add-condition
|
||||
width: auto
|
||||
margin-left: 10px
|
||||
padding-left: 0
|
||||
padding-right: 10px
|
||||
.selected
|
||||
display: block
|
||||
a
|
||||
font-weight: bold
|
||||
a:before
|
||||
font-family: FontAwesome
|
||||
position: absolute
|
||||
left: 6px
|
||||
top: 3px
|
||||
content: "\f00c"
|
||||
.oe-group-selector
|
||||
margin: 3px 25px
|
||||
min-width: calc(100% - 40px)
|
||||
max-width: 250px
|
||||
width: auto
|
||||
.divider
|
||||
display: none
|
||||
.filters-menu
|
||||
.divider
|
||||
display: list-item
|
||||
.closed-menu
|
||||
a:before
|
||||
font-family: FontAwesome
|
||||
position: absolute
|
||||
left: 12px
|
||||
top: 3px
|
||||
content: "\f0da"
|
||||
.open-menu
|
||||
a:before
|
||||
font-family: FontAwesome
|
||||
position: absolute
|
||||
left: 9px
|
||||
top: 3px
|
||||
content: "\f0d7"
|
||||
|
||||
.oe_searchview_advanced
|
||||
overflow: auto
|
||||
form
|
||||
display: none
|
||||
margin-top: 8px
|
||||
button.oe_add_condition:before
|
||||
content: "Z"
|
||||
font-family: "entypoRegular" !important
|
||||
font-size: 24px
|
||||
font-weight: 300 !important
|
||||
margin-right: 4px
|
||||
ul
|
||||
list-style: none
|
||||
padding: 0
|
||||
li
|
||||
position: relative
|
||||
list-style: none
|
||||
margin: 0
|
||||
.oe-select-group
|
||||
margin: 3px 25px
|
||||
.oe-add-group
|
||||
display: none
|
||||
.oe-save-name
|
||||
display: none
|
||||
margin: 3px 25px
|
||||
span
|
||||
white-space: nowrap
|
||||
&:first-child .searchview_extended_prop_or
|
||||
visibility: hidden
|
||||
margin-left: -14px
|
||||
.searchview_extended_prop_or
|
||||
opacity: 0.5
|
||||
margin-left: -14px //Customize 'or' in searchview
|
||||
.oe_opened
|
||||
h4:before
|
||||
content: "▾ "
|
||||
position: relative
|
||||
top: -1px
|
||||
form
|
||||
display: block
|
||||
|
||||
// delete buttons
|
||||
.oe_searchview_custom_delete, .searchview_extended_delete_prop
|
||||
display: inline-block
|
||||
width: 12px
|
||||
height: 12px
|
||||
line-height: 12px
|
||||
padding: 1px
|
||||
color: #8786b7
|
||||
line-height: 8px
|
||||
text-align: center
|
||||
font-weight: bold
|
||||
text-shadow: 0 1px 1px white
|
||||
&:hover
|
||||
text-decoration: none
|
||||
color: white
|
||||
background: #8786b7
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4)
|
||||
@include radius(2px)
|
||||
.oe_searchview_custom_delete
|
||||
display: none
|
||||
input
|
||||
margin-left: 0
|
||||
.searchview_extended_prop_field
|
||||
display: inline
|
||||
width: calc(100% - 20px)
|
||||
|
||||
.searchview_extended_prop_op
|
||||
margin: 3px 0
|
||||
width: calc(100% - 20px)
|
||||
.searchview_extended_delete_prop
|
||||
float: right
|
||||
display: inline
|
||||
.searchview_extended_prop_value
|
||||
width: calc(100% - 20px)
|
||||
> select, > input
|
||||
width: calc(100% - 20px)
|
||||
.oe_datepicker_main
|
||||
width: calc(100% - 20px)
|
||||
.oe_datepicker_master
|
||||
width: 100%
|
||||
.fa-calendar
|
||||
margin-left: -21px
|
||||
cursor: pointer
|
||||
span.fa-trash-o
|
||||
position: absolute
|
||||
bottom: 1px
|
||||
right: 4px
|
||||
.oe_searchview_custom_private, .oe_searchview_custom_public
|
||||
&:hover
|
||||
.oe_searchview_custom_delete
|
||||
display: inline-block
|
||||
.oe_searchview_custom_public:after
|
||||
content: ","
|
||||
font-family: "entypoRegular" !important
|
||||
font-size: 22px
|
||||
font-weight: 300 !important
|
||||
margin: 0 0 0 4px
|
||||
padding: 0
|
||||
top: 6px
|
||||
right: 10px
|
||||
cursor: pointer
|
||||
.dropdown-menu
|
||||
> li
|
||||
position: relative
|
||||
white-space: nowrap
|
||||
li.oe-filter-condition
|
||||
white-space: normal
|
||||
padding-left: 25px
|
||||
padding-right: 10px
|
||||
margin-bottom: 5px
|
||||
a
|
||||
display: inline-block
|
||||
|
||||
input.oe-save-name
|
||||
width: auto
|
||||
.oe_pager_value
|
||||
display: inline-block
|
||||
|
||||
// }}}
|
||||
// Views Common {{{
|
||||
.oe_view_nocontent
|
||||
@@ -1674,6 +1532,9 @@ $sheet-padding: 16px
|
||||
width: auto
|
||||
.oe_datepicker_root
|
||||
display: inline-block
|
||||
.datepickerbutton
|
||||
margin-left: 5px
|
||||
cursor: pointer
|
||||
.oe_form_required
|
||||
input:not([disabled]):not([readonly]), select:not([disabled]):not([readonly]), textarea:not([disabled]):not([readonly])
|
||||
background-color: #D2D2FF !important
|
||||
@@ -2250,6 +2111,8 @@ $sheet-padding: 16px
|
||||
content: "[newline]"
|
||||
.oe_debug_view
|
||||
float: left
|
||||
margin-top: 5px
|
||||
width: auto
|
||||
.oe_debug_view_log
|
||||
font-size: 95%
|
||||
line-height: 1.2em
|
||||
@@ -2300,8 +2163,6 @@ $sheet-padding: 16px
|
||||
background-color: #7c7bad
|
||||
|
||||
// Customize for global tags
|
||||
button, body
|
||||
line-height: normal
|
||||
h1,h2
|
||||
font-weight: bold
|
||||
h3
|
||||
@@ -2337,8 +2198,6 @@ $sheet-padding: 16px
|
||||
|
||||
@-moz-document url-prefix()
|
||||
.openerp
|
||||
.oe_searchview .oe_searchview_search
|
||||
top: -1px
|
||||
.oe_form_field_many2one .oe_m2o_cm_button
|
||||
line-height: 18px
|
||||
.oe_webclient
|
||||
|
||||
+589
-815
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
this.dialog = null;
|
||||
this.dialog_widget = null;
|
||||
this.view_managers = [];
|
||||
this.on('history_back', this, function() {
|
||||
return this.history_back();
|
||||
});
|
||||
this.on('history_back', this, this.proxy('history_back'));
|
||||
},
|
||||
dialog_stop: function (reason) {
|
||||
if (this.dialog) {
|
||||
@@ -53,11 +51,20 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
var to_destroy = this.view_managers;
|
||||
this.view_managers = [];
|
||||
}
|
||||
this.view_managers.push(widget);
|
||||
if (widget instanceof instance.web.ViewManager) {
|
||||
this.view_managers.push(widget);
|
||||
} else {
|
||||
this.view_managers.push({
|
||||
view_stack: [{
|
||||
controller: {get: function () {return action.display_name || action.name; }},
|
||||
}],
|
||||
destroy: function () {},
|
||||
});
|
||||
}
|
||||
this.inner_action = action;
|
||||
this.inner_widget = widget;
|
||||
return $.when(this.inner_widget.appendTo(this.$el)).done(function () {
|
||||
widget.$header && widget.$header.show();
|
||||
(action.target !== 'inline') && (!action.flags.headless) && widget.$header && widget.$header.show();
|
||||
old_widget && old_widget.$el.hide();
|
||||
if (clear_breadcrumbs) {
|
||||
self.clear_view_managers(to_destroy)
|
||||
@@ -76,33 +83,32 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
}), true);
|
||||
},
|
||||
history_back: function() {
|
||||
// var last = this.breadcrumbs.slice(-1)[0];
|
||||
// if (!last) {
|
||||
// return false;
|
||||
// }
|
||||
// var title = last.get_title();
|
||||
// if (_.isArray(title) && title.length > 1) {
|
||||
// return this.select_breadcrumb(this.breadcrumbs.length - 1, title.length - 2);
|
||||
// } else if (this.breadcrumbs.length === 1) {
|
||||
// // Only one single titled item in breadcrumb, most of the time you want to trigger back to home
|
||||
// return false;
|
||||
// } else {
|
||||
// var prev = this.breadcrumbs[this.breadcrumbs.length - 2];
|
||||
// title = prev.get_title();
|
||||
// return this.select_breadcrumb(this.breadcrumbs.length - 2, _.isArray(title) ? title.length - 1 : undefined);
|
||||
// }
|
||||
var view_manager = _.last(this.view_managers),
|
||||
nbr_views = view_manager.view_stack.length;
|
||||
if (nbr_views > 1) {
|
||||
this.select_view_manager(view_manager, nbr_views - 2);
|
||||
} else if (this.view_managers.length > 1) {
|
||||
view_manager = this.view_managers[this.view_managers.length -2];
|
||||
nbr_views = view_manager.view_stack.length;
|
||||
this.select_view(view_managers, nbr_views - 2)
|
||||
}
|
||||
},
|
||||
select_view_manager: function(view_manager, index) {
|
||||
var self = this;
|
||||
if (this.webclient.has_uncommitted_changes()) {
|
||||
return false;
|
||||
}
|
||||
var vm_index = this.view_managers.indexOf(view_manager);
|
||||
view_manager.select_view(index).done(function () {
|
||||
_.each(self.view_managers.splice(vm_index + 1), function (vm) {
|
||||
vm.destroy();
|
||||
if (view_manager.select_view) {
|
||||
view_manager.select_view(index).done(function () {
|
||||
_.each(self.view_managers.splice(vm_index + 1), function (vm) {
|
||||
vm.destroy();
|
||||
});
|
||||
self.inner_widget = _.last(self.view_managers);
|
||||
self.inner_widget.display_breadcrumbs();
|
||||
self.inner_widget.$el.show();
|
||||
});
|
||||
self.inner_widget = _.last(self.view_managers);
|
||||
self.inner_widget.display_breadcrumbs();
|
||||
self.inner_widget.$el.show();
|
||||
});
|
||||
}
|
||||
},
|
||||
clear_view_managers: function(vms) {
|
||||
_.each(vms || this.view_managers, function (vm) {
|
||||
@@ -127,7 +133,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
// });
|
||||
},
|
||||
do_push_state: function(state) {
|
||||
if (!this.webclient || !this.webclient.do_push_state) {
|
||||
if (!this.webclient || !this.webclient.do_push_state || this.dialog) {
|
||||
return;
|
||||
}
|
||||
state = state || {};
|
||||
@@ -168,9 +174,7 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!this.dialog) {
|
||||
this.webclient.do_push_state(state);
|
||||
}
|
||||
this.webclient.do_push_state(state);
|
||||
},
|
||||
do_load_state: function(state, warm) {
|
||||
var self = this,
|
||||
@@ -386,6 +390,9 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
$buttons: this.dialog.$buttons,
|
||||
footer_to_buttons: true,
|
||||
});
|
||||
if (widget.action.view_mode === 'form') {
|
||||
widget.flags.headless = true;
|
||||
}
|
||||
}
|
||||
this.dialog_widget = widget;
|
||||
this.dialog_widget.setParent(this.dialog);
|
||||
@@ -398,9 +405,6 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
}
|
||||
widget = executor.widget();
|
||||
this.dialog_stop(executor.action);
|
||||
if (options.clear_breadcrumbs) {
|
||||
// this.clear_view_managers();
|
||||
}
|
||||
return this.push_view_manager(widget, executor.action, options.clear_breadcrumbs);
|
||||
},
|
||||
ir_actions_act_window: function (action, options) {
|
||||
@@ -412,13 +416,6 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
},
|
||||
action: action,
|
||||
klass: 'oe_act_window',
|
||||
// post_process: function (widget) {
|
||||
// self.push_breadcrumb({
|
||||
// widget: widget,
|
||||
// on_reverse_breadcrumb: options.on_reverse_breadcrumb,
|
||||
// hide_breadcrumb: options.hide_breadcrumb,
|
||||
// });
|
||||
// },
|
||||
}, options);
|
||||
},
|
||||
ir_actions_client: function (action, options) {
|
||||
@@ -440,18 +437,9 @@ instance.web.ActionManager = instance.web.Widget.extend({
|
||||
widget: function () { return new ClientWidget(self, action); },
|
||||
action: action,
|
||||
klass: 'oe_act_client',
|
||||
// post_process: function(widget) {
|
||||
// self.push_breadcrumb({
|
||||
// widget: widget,
|
||||
// title: action.name,
|
||||
// on_reverse_breadcrumb: options.on_reverse_breadcrumb,
|
||||
// hide_breadcrumb: options.hide_breadcrumb,
|
||||
// });
|
||||
// if (action.tag !== 'reload') {
|
||||
// self.do_push_state({});
|
||||
// }
|
||||
// }
|
||||
}, options);
|
||||
}, options).then(function () {
|
||||
if (action.tag !== 'reload') {self.do_push_state({});}
|
||||
});
|
||||
},
|
||||
ir_actions_act_window_close: function (action, options) {
|
||||
if (!this.dialog) {
|
||||
@@ -544,38 +532,46 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
_.each(views, function (view) {
|
||||
var view_type = view[1] || view.view_type,
|
||||
View = instance.web.views.get_object(view_type, true),
|
||||
view_label = View ? View.prototype.display_name : (void 'nope');
|
||||
self.view_order.push(view_type);
|
||||
self.views[view_type] = {
|
||||
controller: null,
|
||||
options: view.options || {},
|
||||
view_id: view[0] || view.view_id,
|
||||
type: view_type,
|
||||
label: view_label,
|
||||
embedded_view: view.embedded_view,
|
||||
title: self.action && self.action.name,
|
||||
button_label: View ? _.str.sprintf(_t('%(view_type)s view'), {'view_type': (view_label || view_type)}) : (void 'nope'),
|
||||
};
|
||||
view_label = View ? View.prototype.display_name: (void 'nope'),
|
||||
view = {
|
||||
controller: null,
|
||||
options: view.options || {},
|
||||
view_id: view[0] || view.view_id,
|
||||
type: view_type,
|
||||
label: view_label,
|
||||
embedded_view: view.embedded_view,
|
||||
title: self.action && self.action.name,
|
||||
button_label: View ? _.str.sprintf(_t('%(view_type)s view'), {'view_type': (view_label || view_type)}) : (void 'nope'),
|
||||
};
|
||||
self.view_order.push(view);
|
||||
self.views[view_type] = view;
|
||||
});
|
||||
this.multiple_views = (self.view_order.length - ('form' in this.views ? 1 : 0)) > 1;
|
||||
},
|
||||
/**
|
||||
* @returns {jQuery.Deferred} initial view loading promise
|
||||
*/
|
||||
start: function() {
|
||||
var self = this;
|
||||
var default_view = this.flags.default_view || this.view_order[0],
|
||||
var default_view = this.flags.default_view || this.view_order[0].type,
|
||||
default_options = this.flags[default_view] && this.flags[default_view].options;
|
||||
|
||||
if (this.flags.headless) {
|
||||
this.$('.oe-view-manager-header').hide();
|
||||
}
|
||||
this._super();
|
||||
var $sidebar = this.flags.sidebar ? this.$('.oe_view_manager_sidebar') : undefined,
|
||||
var $sidebar = this.flags.sidebar ? this.$('.oe-view-manager-sidebar') : undefined,
|
||||
$pager = this.$('.oe-view-manager-pager');
|
||||
|
||||
this.$breadcrumbs = this.$('.oe-view-title');
|
||||
this.$switch_buttons = this.$('.oe-view-manager-switch a');
|
||||
this.$switch_buttons = this.$('.oe-view-manager-switch button');
|
||||
this.$header = this.$('.oe-view-manager-header');
|
||||
|
||||
self.$switch_buttons.click(function () {
|
||||
self.switch_mode($(this).data('view-type'));
|
||||
this.$header_col = this.$header.find('.oe-header-title');
|
||||
this.$search_col = this.$header.find('.oe-view-manager-search-view');
|
||||
this.$switch_buttons.click(function (event) {
|
||||
if (!$(event.target).hasClass('active')) {
|
||||
self.switch_mode($(this).data('view-type'));
|
||||
}
|
||||
});
|
||||
var views_ids = {};
|
||||
_.each(this.views, function (view) {
|
||||
@@ -587,21 +583,29 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
action : self.action,
|
||||
action_views_ids : views_ids,
|
||||
}, self.flags, self.flags[view.type], view.options);
|
||||
if (view.type !== 'form') {
|
||||
self.$('.oe-vm-switch-' + view.type).tooltip();
|
||||
}
|
||||
});
|
||||
this.$('.oe_debug_view').click(this.on_debug_changed);
|
||||
this.$el.addClass("oe_view_manager_" + ((this.action && this.action.target) || 'current'));
|
||||
|
||||
var search_view_loaded = this.flags.search_view ? this.setup_search_view() : $.when(),
|
||||
main_view_loaded = this.switch_mode(default_view, null, default_options);
|
||||
this.search_view_loaded = this.setup_search_view();
|
||||
var main_view_loaded = this.switch_mode(default_view, null, default_options);
|
||||
|
||||
return $.when(main_view_loaded, search_view_loaded);
|
||||
return $.when(main_view_loaded, this.search_view_loaded);
|
||||
},
|
||||
|
||||
switch_mode: function(view_type, no_store, view_options) {
|
||||
var self = this,
|
||||
view = this.views[view_type];
|
||||
|
||||
if (!view) {
|
||||
return $.Deferred().reject();
|
||||
}
|
||||
if (view_type !== 'form') {
|
||||
this.view_stack = [];
|
||||
}
|
||||
}
|
||||
|
||||
this.view_stack.push(view);
|
||||
this.active_view = view;
|
||||
@@ -613,7 +617,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
if (this.searchview
|
||||
&& this.flags.auto_search
|
||||
&& view.controller.searchable !== false) {
|
||||
$.when(this.searchview.ready, view.created).done(this.searchview.do_search);
|
||||
$.when(this.search_view_loaded, view.created).done(this.searchview.do_search);
|
||||
} else {
|
||||
this.active_search.resolve();
|
||||
}
|
||||
@@ -623,6 +627,12 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
self.active_view = view;
|
||||
self._display_view(view.type, view_options);
|
||||
self.trigger('switch_mode', view_type, no_store, view_options);
|
||||
if (self.session.debug) {
|
||||
self.$('.oe_debug_view').html(QWeb.render('ViewManagerDebug', {
|
||||
view: self.active_view.controller,
|
||||
view_manager: self,
|
||||
}));
|
||||
}
|
||||
});
|
||||
},
|
||||
update_header: function () {
|
||||
@@ -642,8 +652,10 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
});
|
||||
self.active_view.options.$buttons && self.active_view.options.$buttons.show();
|
||||
if (self.searchview) {
|
||||
var is_hidden = self.active_view.controller.searchable === false || self.searchview.options.hidden;
|
||||
var is_hidden = self.active_view.controller.searchable === false;
|
||||
self.searchview.toggle_visibility(!is_hidden);
|
||||
self.$header_col.toggleClass('col-md-6', !is_hidden).toggleClass('col-md-12', is_hidden);
|
||||
self.$search_col.toggle(!is_hidden);
|
||||
}
|
||||
self.display_breadcrumbs();
|
||||
});
|
||||
@@ -667,7 +679,8 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
create_view: function(view) {
|
||||
var self = this,
|
||||
View = this.registry.get_object(view.type),
|
||||
options = _.clone(view.options);
|
||||
options = _.clone(view.options),
|
||||
view_loaded = $.Deferred();
|
||||
|
||||
if (view.type === "form" && this.action && (this.action.target === 'new' || this.action.target === 'inline')) {
|
||||
options.initial_mode = 'edit';
|
||||
@@ -677,25 +690,26 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
|
||||
$container.hide();
|
||||
view.controller = controller;
|
||||
view.$container = $container;
|
||||
|
||||
if (view.embedded_view) {
|
||||
controller.set_embedded_view(view.embedded_view);
|
||||
}
|
||||
controller.on('switch_mode', this, this.switch_mode.bind(this));
|
||||
|
||||
view.$container = $container;
|
||||
|
||||
var view_loaded = $.Deferred();
|
||||
view.controller.on('view_loaded', this, function () {
|
||||
controller.on('history_back', this, function () {
|
||||
self.action_manager && self.action_manager.trigger('history_back');
|
||||
});
|
||||
controller.on("change:title", this, function() {
|
||||
self.display_breadcrumbs();
|
||||
});
|
||||
controller.on('view_loaded', this, function () {
|
||||
view_loaded.resolve();
|
||||
});
|
||||
|
||||
return $.when(controller.appendTo($container), view_loaded)
|
||||
.done(function () {
|
||||
self.trigger("controller_inited", view.type, controller);
|
||||
});
|
||||
},
|
||||
|
||||
select_view: function (index) {
|
||||
var view_type = this.view_stack[index].type;
|
||||
this.view_stack.splice(index);
|
||||
@@ -713,6 +727,7 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
}
|
||||
|
||||
var view_id = (this.action && this.action.search_view_id && this.action.search_view_id[0]) || false;
|
||||
|
||||
var search_defaults = {};
|
||||
|
||||
var context = this.action ? this.action.context : [];
|
||||
@@ -727,13 +742,13 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
var options = {
|
||||
hidden: this.flags.search_view === false,
|
||||
disable_custom_filters: this.flags.search_disable_custom_filters,
|
||||
$buttons: this.$('.oe-search-options'),
|
||||
};
|
||||
var SearchView = instance.web.SearchView;
|
||||
this.searchview = new SearchView(this, this.dataset, view_id, search_defaults, options);
|
||||
|
||||
this.searchview.on('search_data', this, this.search.bind(this));
|
||||
return this.searchview.appendTo(this.$(".oe-view-manager-search-view:first"),
|
||||
this.$('.oe_searchview_drawer_container'));
|
||||
return this.searchview.appendTo(this.$(".oe-view-manager-search-view:first"));
|
||||
},
|
||||
search: function(domains, contexts, groupbys) {
|
||||
var self = this,
|
||||
@@ -783,6 +798,145 @@ instance.web.ViewManager = instance.web.Widget.extend({
|
||||
self.active_view.controller.do_load_state(state, warm);
|
||||
});
|
||||
},
|
||||
on_debug_changed: function (evt) {
|
||||
var self = this,
|
||||
params = $(evt.target).data(),
|
||||
val = params.action,
|
||||
current_view = this.active_view.controller;
|
||||
switch (val) {
|
||||
case 'fvg':
|
||||
var dialog = new instance.web.Dialog(this, { title: _t("Fields View Get") }).open();
|
||||
$('<pre>').text(instance.web.json_node_to_xml(current_view.fields_view.arch, true)).appendTo(dialog.$el);
|
||||
break;
|
||||
case 'tests':
|
||||
this.do_action({
|
||||
name: _t("JS Tests"),
|
||||
target: 'new',
|
||||
type : 'ir.actions.act_url',
|
||||
url: '/web/tests?mod=*'
|
||||
});
|
||||
break;
|
||||
case 'get_metadata':
|
||||
var ids = current_view.get_selected_ids();
|
||||
if (ids.length === 1) {
|
||||
this.dataset.call('get_metadata', [ids]).done(function(result) {
|
||||
var dialog = new instance.web.Dialog(this, {
|
||||
title: _.str.sprintf(_t("Metadata (%s)"), self.dataset.model),
|
||||
size: 'medium',
|
||||
}, QWeb.render('ViewManagerDebugViewLog', {
|
||||
perm : result[0],
|
||||
format : instance.web.format_value
|
||||
})).open();
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'toggle_layout_outline':
|
||||
current_view.rendering_engine.toggle_layout_debugging();
|
||||
break;
|
||||
case 'set_defaults':
|
||||
current_view.open_defaults_dialog();
|
||||
break;
|
||||
case 'translate':
|
||||
this.do_action({
|
||||
name: _t("Technical Translation"),
|
||||
res_model : 'ir.translation',
|
||||
domain : [['type', '!=', 'object'], '|', ['name', '=', this.dataset.model], ['name', 'ilike', this.dataset.model + ',']],
|
||||
views: [[false, 'list'], [false, 'form']],
|
||||
type : 'ir.actions.act_window',
|
||||
view_type : "list",
|
||||
view_mode : "list"
|
||||
});
|
||||
break;
|
||||
case 'fields':
|
||||
this.dataset.call('fields_get', [false, {}]).done(function (fields) {
|
||||
var $root = $('<dl>');
|
||||
_(fields).each(function (attributes, name) {
|
||||
$root.append($('<dt>').append($('<h4>').text(name)));
|
||||
var $attrs = $('<dl>').appendTo($('<dd>').appendTo($root));
|
||||
_(attributes).each(function (def, name) {
|
||||
if (def instanceof Object) {
|
||||
def = JSON.stringify(def);
|
||||
}
|
||||
$attrs
|
||||
.append($('<dt>').text(name))
|
||||
.append($('<dd style="white-space: pre-wrap;">').text(def));
|
||||
});
|
||||
});
|
||||
new instance.web.Dialog(self, {
|
||||
title: _.str.sprintf(_t("Model %s fields"),
|
||||
self.dataset.model),
|
||||
}, $root).open();
|
||||
});
|
||||
break;
|
||||
case 'edit_workflow':
|
||||
return this.do_action({
|
||||
res_model : 'workflow',
|
||||
name: _t('Edit Workflow'),
|
||||
domain : [['osv', '=', this.dataset.model]],
|
||||
views: [[false, 'list'], [false, 'form'], [false, 'diagram']],
|
||||
type : 'ir.actions.act_window',
|
||||
view_type : 'list',
|
||||
view_mode : 'list'
|
||||
});
|
||||
case 'edit':
|
||||
this.do_edit_resource(params.model, params.id, evt.target.text);
|
||||
break;
|
||||
case 'manage_filters':
|
||||
this.do_action({
|
||||
res_model: 'ir.filters',
|
||||
name: _t('Manage Filters'),
|
||||
views: [[false, 'list'], [false, 'form']],
|
||||
type: 'ir.actions.act_window',
|
||||
context: {
|
||||
search_default_my_filters: true,
|
||||
search_default_model_id: this.dataset.model
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'print_workflow':
|
||||
if (current_view.get_selected_ids && current_view.get_selected_ids().length == 1) {
|
||||
instance.web.blockUI();
|
||||
var action = {
|
||||
context: { active_ids: current_view.get_selected_ids() },
|
||||
report_name: "workflow.instance.graph",
|
||||
datas: {
|
||||
model: this.dataset.model,
|
||||
id: current_view.get_selected_ids()[0],
|
||||
nested: true,
|
||||
}
|
||||
};
|
||||
this.session.get_file({
|
||||
url: '/web/report',
|
||||
data: {action: JSON.stringify(action)},
|
||||
complete: instance.web.unblockUI
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'leave_debug':
|
||||
window.location.search="?";
|
||||
break;
|
||||
default:
|
||||
if (val) {
|
||||
console.warn("No debug handler for ", val);
|
||||
}
|
||||
}
|
||||
},
|
||||
do_edit_resource: function(model, id, name) {
|
||||
this.do_action({
|
||||
res_model : model,
|
||||
res_id : id,
|
||||
name: name,
|
||||
type : 'ir.actions.act_window',
|
||||
view_type : 'form',
|
||||
view_mode : 'form',
|
||||
views : [[false, 'form']],
|
||||
target : 'new',
|
||||
flags : {
|
||||
action_buttons : true,
|
||||
headless: true,
|
||||
}
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
||||
@@ -793,9 +947,25 @@ instance.web.ViewManagerAction = instance.web.ViewManager.extend({
|
||||
if (!('auto_search' in flags)) {
|
||||
flags.auto_search = action.auto_search !== false;
|
||||
}
|
||||
if (action.res_model === 'board.board' && action.view_mode === 'form') {
|
||||
action.target = 'inline';
|
||||
// Special case for Dashboards
|
||||
_.extend(flags, {
|
||||
views_switcher : false,
|
||||
display_title : false,
|
||||
search_view : false,
|
||||
pager : false,
|
||||
sidebar : false,
|
||||
action_buttons : false
|
||||
});
|
||||
}
|
||||
this.action = action;
|
||||
this.action_manager = parent;
|
||||
var dataset = new instance.web.DataSetSearch(this, action.res_model, action.context, action.domain);
|
||||
if (action.res_id) {
|
||||
dataset.ids.push(action.res_id);
|
||||
dataset.index = 0;
|
||||
}
|
||||
this._super(parent, dataset, action.views, flags);
|
||||
}
|
||||
});
|
||||
@@ -824,7 +994,7 @@ instance.web.Sidebar = instance.web.Widget.extend({
|
||||
var self = this;
|
||||
this._super(this);
|
||||
this.redraw();
|
||||
this.$el.on('click','.oe_dropdown_menu li a', function(event) {
|
||||
this.$el.on('click','.dropdown-menu li a', function(event) {
|
||||
var section = $(this).data('section');
|
||||
var index = $(this).data('index');
|
||||
var item = self.items[section][index];
|
||||
|
||||
+204
-244
@@ -25,13 +25,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="Tipsy.alert">
|
||||
<a class="oe_tooltip_close oe_e">[</a>
|
||||
<span style="float:left; margin:2px 5px 0 0;" class="ui-icon ui-icon-alert ui-state-error"></span>
|
||||
<div class="oe_tooltip_message">
|
||||
<t t-esc="message"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="Dialog">
|
||||
<div class="modal" tabindex="-1" data-backdrop="static" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
@@ -476,32 +469,33 @@
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<div t-name="ViewManager">
|
||||
<div t-name="ViewManager" class="oe-view-manager">
|
||||
<div class="oe-view-manager-header container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12 oe-header-title">
|
||||
<div class="col-md-6 oe-header-title">
|
||||
<ol class="oe-view-title breadcrumb" t-if="widget.flags.display_title !== false">
|
||||
</ol>
|
||||
<div class="oe-view-manager-search-view">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe-view-manager-search-view col-md-6" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-sm-6">
|
||||
<div class="oe-view-manager-buttons">
|
||||
<t t-foreach="widget.views" t-as="view">
|
||||
<div t-attf-class="oe-#{view}-buttons"/>
|
||||
</t>
|
||||
</div>
|
||||
<div class="oe-view-manager-sidebar"></div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="oe-search-options btn-group"/>
|
||||
<div class="oe-right-toolbar">
|
||||
<div class="oe-view-manager-pager"></div>
|
||||
<t t-if="widget.view_order.length > 1">
|
||||
<t t-if="widget.multiple_views">
|
||||
<div class="oe-view-manager-switch btn-group btn-group-sm">
|
||||
<t t-foreach="widget.view_order" t-as="view_type">
|
||||
<a type="button" t-attf-class="btn btn-default fa oe-vm-switch-#{view_type}" t-att-data-view-type="view_type" t-att-title="view_type" t-if="view_type!=='form'">
|
||||
</a>
|
||||
<t t-foreach="widget.view_order" t-as="view">
|
||||
<button type="button" t-attf-class="btn btn-default fa oe-vm-switch-#{view.type}" t-att-data-view-type="view.type" t-att-title="view.label" t-if="view.type!=='form'">
|
||||
</button>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
@@ -509,38 +503,46 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe-view-manager-body">
|
||||
<div class="oe_searchview_drawer_container"/>
|
||||
<t t-foreach="widget.views" t-as="view">
|
||||
<div t-attf-class="oe-view-manager-view-#{view}"/>
|
||||
</t>
|
||||
<div class="oe-view-manager-content">
|
||||
<div class="oe-view-manager-body">
|
||||
<div class="oe-view-manager-views">
|
||||
<t t-foreach="widget.views" t-as="view">
|
||||
<div t-attf-class="oe-view-manager-view-#{view}"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<t t-name="ViewManagerAction" t-extend="ViewManager">
|
||||
<t t-jquery="h2.oe_view_title" t-operation="before">
|
||||
<select t-if="widget.session.debug" class="oe_debug_view"/>
|
||||
<t t-jquery="ol.oe-view-title" t-operation="before">
|
||||
<div t-if="widget.session.debug" class="oe_debug_view btn-group btn-group-sm"/>
|
||||
</t>
|
||||
</t>
|
||||
<t t-name="ViewManagerDebug">
|
||||
<option value="">Debug View#<t t-esc="view.fields_view.view_id"/></option>
|
||||
<t t-if="view_manager.active_view === 'form'">
|
||||
<option value="get_metadata">View Metadata</option>
|
||||
<option value="toggle_layout_outline">Toggle Form Layout Outline</option>
|
||||
<option value="set_defaults">Set Defaults</option>
|
||||
</t>
|
||||
<option value="tests">JS Tests</option>
|
||||
<option value="fields">View Fields</option>
|
||||
<option value="fvg">Fields View Get</option>
|
||||
<option value="manage_filters">Manage Filters</option>
|
||||
<t t-if="view_manager.session.uid === 1">
|
||||
<option value="translate">Technical translation</option>
|
||||
<option value="manage_views">Manage Views</option>
|
||||
<option value="edit" data-model="ir.ui.view" t-att-data-id="view.fields_view.view_id">Edit <t t-esc="_.str.capitalize(view.fields_view.type)"/>View</option>
|
||||
<option t-if="view_manager.searchview" value="edit" data-model="ir.ui.view" t-att-data-id="view_manager.searchview.view_id">Edit SearchView</option>
|
||||
<option t-if="view_manager.action" value="edit" t-att-data-model="view_manager.action.type" t-att-data-id="view_manager.action.id">Edit Action</option>
|
||||
<option value="edit_workflow">Edit Workflow</option>
|
||||
<option value="print_workflow">Print Workflow</option>
|
||||
</t>
|
||||
<button type="button" class="btn btn-default dropdown-toggle fa fa-bug oe-view-manager-debug" data-toggle="dropdown"> <span class="caret"/>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<t t-if="view_manager.active_view.type === 'form'">
|
||||
<li><a data-action="get_metadata">View Metadata</a></li>
|
||||
<li><a data-action="toggle_layout_outline">Toggle Form Layout Outline</a></li>
|
||||
<li><a data-action="set_defaults">Set Defaults</a></li>
|
||||
</t>
|
||||
<li><a data-action="tests">JS Tests</a></li>
|
||||
<li><a data-action="fields">View Fields</a></li>
|
||||
<li><a data-action="fvg">Fields View Get</a></li>
|
||||
<li><a data-action="manage_filters">Manage Filters</a></li>
|
||||
<t t-if="view_manager.session.uid === 1">
|
||||
<li><a data-action="translate">Technical Translation</a></li>
|
||||
<li><a data-action="manage_views">Manage Views</a></li>
|
||||
<li><a data-action="edit" data-model="ir.ui.view" t-att-data-id="view.fields_view.view_id">Edit <t t-esc="_.str.capitalize(view.fields_view.type)"/> View</a></li>
|
||||
<li t-if="view_manager.searchview"><a data-action="edit" data-model="ir.ui.view" t-att-data-id="view_manager.searchview.view_id">Edit SearchView</a></li>
|
||||
<li t-if="view_manager.action"><a data-action="edit" t-att-data-model="view_manager.action.type" t-att-data-id="view_manager.action.id">Edit Action</a></li>
|
||||
<li><a data-action="edit_workflow">Edit Workflow</a></li>
|
||||
<li><a data-action="print_workflow">Print Workflow</a></li>
|
||||
<li class="divider"/>
|
||||
<li><a data-action="leave_debug">Leave Debug Mode</a></li>
|
||||
</t>
|
||||
</ul>
|
||||
</t>
|
||||
<t t-name="ViewManagerDebugViewLog">
|
||||
<div class="oe_debug_view_log">
|
||||
@@ -576,65 +578,65 @@
|
||||
<div class="oe_pager_value">
|
||||
<t t-raw="0"/>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<div class="btn-group btn-group-sm oe-pager-buttons">
|
||||
<a class="fa fa-chevron-left btn btn-default oe-pager-button" type="button" data-pager-action="previous"></a>
|
||||
<a class="fa fa-chevron-right btn btn-default oe-pager-button" type="button" data-pager-action="next"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<t t-name="Sidebar">
|
||||
<div class="oe_sidebar">
|
||||
<t t-foreach="widget.sections" t-as="section">
|
||||
<div class="oe_form_dropdown_section">
|
||||
<button class="oe_dropdown_toggle oe_dropdown_arrow" t-if="section.name != 'buttons'">
|
||||
<t t-if="section.name == 'files'" t-raw="widget.items[section.name].length || ''"/>
|
||||
<t t-esc="section.label"/>
|
||||
<i class="fa fa-caret-down"/>
|
||||
<div t-name="Sidebar" class="oe_sidebar btn-group">
|
||||
<t t-foreach="widget.sections" t-as="section">
|
||||
<div class="oe_form_dropdown_section btn-group btn-group-sm">
|
||||
<button class="btn btn-default dropdown-toggle"
|
||||
t-if="section.name != 'buttons'"
|
||||
data-toggle="dropdown">
|
||||
<t t-if="section.name == 'files'" t-raw="widget.items[section.name].length || ''"/>
|
||||
<t t-esc="section.label"/>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<t t-if="section.name == 'buttons'" t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
|
||||
<button t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url"
|
||||
target="_blank" class="oe_sidebar_button oe_highlight">
|
||||
<t t-raw="item.label"/>
|
||||
</button>
|
||||
<t t-if="section.name == 'buttons'" t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
|
||||
<button t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url"
|
||||
target="_blank" class="oe_sidebar_button oe_highlight">
|
||||
</t>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
|
||||
<t t-if="section.name == 'files'">
|
||||
<t t-set="item.title">
|
||||
<b>Attachment : </b><br/>
|
||||
<t t-raw="item.name"/>
|
||||
</t>
|
||||
<t t-if="item.create_uid and item.create_uid[0]" t-set="item.title">
|
||||
<t t-raw="item.title"/><br/>
|
||||
<b>Created by : </b><br/>
|
||||
<t t-raw="item.create_uid[1] + ' ' + item.create_date"/>
|
||||
</t>
|
||||
<t t-if="item.create_uid and item.write_uid and item.create_uid[0] != item.write_uid[0]" t-set="item.title">
|
||||
<t t-raw="item.title"/><br/>
|
||||
<b>Modified by : </b><br/>
|
||||
<t t-raw="item.write_uid[1] + ' ' + item.write_date"/>
|
||||
</t>
|
||||
</t>
|
||||
<a t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url">
|
||||
<t t-raw="item.label"/>
|
||||
</button>
|
||||
</t>
|
||||
<ul class="oe_dropdown_menu">
|
||||
<li t-foreach="widget.items[section.name]" t-as="item" t-att-class="item.classname">
|
||||
<t t-if="section.name == 'files'">
|
||||
<t t-set="item.title">
|
||||
<b>Attachment : </b><br/>
|
||||
<t t-raw="item.name"/>
|
||||
</t>
|
||||
<t t-if="item.create_uid and item.create_uid[0]" t-set="item.title">
|
||||
<t t-raw="item.title"/><br/>
|
||||
<b>Created by : </b><br/>
|
||||
<t t-raw="item.create_uid[1] + ' ' + item.create_date"/>
|
||||
</t>
|
||||
<t t-if="item.create_uid and item.write_uid and item.create_uid[0] != item.write_uid[0]" t-set="item.title">
|
||||
<t t-raw="item.title"/><br/>
|
||||
<b>Modified by : </b><br/>
|
||||
<t t-raw="item.write_uid[1] + ' ' + item.write_date"/>
|
||||
</t>
|
||||
</t>
|
||||
<a class="oe_sidebar_action_a" t-att-title="item.title or ''" t-att-data-section="section.name" t-att-data-index="item_index" t-att-href="item.url" target="_blank">
|
||||
<t t-raw="item.label"/>
|
||||
</a>
|
||||
<a t-if="section.name == 'files' and !item.callback" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">x</a>
|
||||
</li>
|
||||
<li t-if="section.name == 'files'" class="oe_sidebar_add_attachment">
|
||||
<t t-call="HiddenInputFile">
|
||||
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
|
||||
<t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
|
||||
<input type="hidden" name="model" t-att-value="widget.dataset and widget.dataset.model"/>
|
||||
<input type="hidden" name="id" t-att-value="widget.model_id"/>
|
||||
<input type="hidden" name="session_id" t-att-value="widget.session.session_id" t-if="widget.session.override_session"/>
|
||||
<span>Add...</span>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
</t>
|
||||
</a>
|
||||
<a t-if="section.name == 'files' and !item.callback" class="oe_sidebar_delete_item" t-att-data-id="item.id" title="Delete this attachment">x</a>
|
||||
</li>
|
||||
<li t-if="section.name == 'files'" class="oe_sidebar_add_attachment">
|
||||
<t t-call="HiddenInputFile">
|
||||
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
|
||||
<t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
|
||||
<input type="hidden" name="model" t-att-value="widget.dataset and widget.dataset.model"/>
|
||||
<input type="hidden" name="id" t-att-value="widget.model_id"/>
|
||||
<input type="hidden" name="session_id" t-att-value="widget.session.session_id" t-if="widget.session.override_session"/>
|
||||
<span>Add...</span>
|
||||
</t>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
</div>
|
||||
|
||||
<t t-name="TreeView">
|
||||
<select t-if="toolbar" style="width: 30%">
|
||||
@@ -720,7 +722,7 @@
|
||||
<t t-name="ListView.buttons">
|
||||
<div class="oe_list_buttons">
|
||||
<t t-if="!widget.no_leaf and widget.options.action_buttons !== false and widget.options.addable and widget.is_action_enabled('create')">
|
||||
<button type="button" class="oe_list_add btn btn-primary">
|
||||
<button type="button" class="oe_list_add btn btn-primary btn-sm">
|
||||
<t t-esc="widget.options.addable"/>
|
||||
</button>
|
||||
</t>
|
||||
@@ -795,18 +797,22 @@
|
||||
<div class="oe_form_container"/>
|
||||
</div>
|
||||
</t>
|
||||
<div t-name="FormView.buttons" class="oe_form_buttons">
|
||||
<div t-name="FormView.buttons">
|
||||
<t t-if="widget.options.action_buttons !== false">
|
||||
<span class="oe_form_buttons_view">
|
||||
<!-- required for the bounce effect on button -->
|
||||
<div t-if="widget.is_action_enabled('edit')" style="display: inline-block;">
|
||||
<button type="button" class="oe_form_button_edit btn btn-default" accesskey="E">Edit</button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm oe_form_buttons_view">
|
||||
<button t-if="widget.is_action_enabled('edit')"
|
||||
type="button"
|
||||
class="oe_form_button_edit btn btn-default" accesskey="E">
|
||||
Edit
|
||||
</button>
|
||||
<button t-if="widget.is_action_enabled('create')"
|
||||
type="button" class="oe_form_button_create btn btn-default" accesskey="C">Create</button>
|
||||
</span>
|
||||
type="button" class="oe_form_button_create btn btn-default"
|
||||
accesskey="C">
|
||||
Create
|
||||
</button>
|
||||
</div>
|
||||
<span class="oe_form_buttons_edit">
|
||||
<button type="button" class="oe_form_button_save btn btn-primary" accesskey="S">Save</button>
|
||||
<button type="button" class="oe_form_button_save btn btn-primary btn-sm" accesskey="S">Save</button>
|
||||
<span class="oe_fade">or</span>
|
||||
<a href="#" class="oe_bold oe_form_button_cancel" accesskey="D">Discard</a>
|
||||
</span>
|
||||
@@ -913,6 +919,27 @@
|
||||
</label>
|
||||
</t>
|
||||
|
||||
<div t-name="PivotView" class="test"/>
|
||||
|
||||
<t t-name="PivotView.buttons">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-default fa fa-expand oe-pivot"></button>
|
||||
<button class="btn btn-default fa fa-arrows-alt oe-pivot"></button>
|
||||
<button class="btn btn-default fa fa-download oe-pivot"></button>
|
||||
</div>
|
||||
<div class="btn-group btn-group-sm">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Measures <span class="caret"/>
|
||||
</button>
|
||||
<ul class="oe-measure-list dropdown-menu">
|
||||
<li t-foreach="measures" t-as="measure" t-att-data-field="measure">
|
||||
<a><t t-esc="measures[measure].string"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
|
||||
<t t-name="Widget">
|
||||
Unhandled widget
|
||||
<t t-js="dict">console.warn('Unhandled widget', dict.widget);</t>
|
||||
@@ -1095,9 +1122,7 @@
|
||||
t-att-name="widget.name"
|
||||
t-att-placeholder="placeholder"
|
||||
class="oe_datepicker_master"
|
||||
/><span><img class="oe_input_icon oe_datepicker_trigger datepickerbutton" draggable="false"
|
||||
t-att-src='_s + "/web/static/src/img/ui/field_calendar.png"'
|
||||
title="Select date" width="16" height="16" border="0"/></span>
|
||||
/><span class="fa fa-calendar datepickerbutton"/>
|
||||
</div>
|
||||
</span>
|
||||
</t>
|
||||
@@ -1455,7 +1480,8 @@
|
||||
<table style="width:100%">
|
||||
<tr style="width:100%">
|
||||
<td style="width:100%">
|
||||
<div class="oe_popup_search" style="width:100%"></div>
|
||||
<div class="oe-search-options btn-group"/>
|
||||
<div class="oe_popup_search"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="width:100%">
|
||||
@@ -1525,16 +1551,9 @@
|
||||
</t>
|
||||
|
||||
<div t-name="SearchView" class="oe_searchview form-control input-sm">
|
||||
<div class="oe_searchview_unfold_drawer fa fa-lg fa-fw fa-chevron-right" title="Advanced Search..."/>
|
||||
<div class="oe_searchview_facets"/>
|
||||
<div class="oe_searchview_clear"><i class="fa fa-times fa-lg"></i></div>
|
||||
<div class="oe_searchview_unfold_drawer fa fa-lg fa-chevron-down" title="Advanced Search..."/>
|
||||
<i type="button" class="oe_searchview_search fa fa-lg fa-search"
|
||||
title="Search Again"></i>
|
||||
</div>
|
||||
|
||||
<div t-name="SearchViewDrawer" class="oe_searchview_drawer" style="display:none;">
|
||||
<div class="col-md-7"></div>
|
||||
<div class="col-md-5"></div>
|
||||
<div class="oe_searchview_search fa fa-lg fa-search" title="Search Again"/>
|
||||
</div>
|
||||
|
||||
<div t-name="SearchView.InputView"
|
||||
@@ -1546,8 +1565,8 @@
|
||||
class="oe_tag oe_searchview_facet"
|
||||
tabindex="0">
|
||||
<span class="oe_facet_remove">x</span>
|
||||
<span class="label label-default oe_i" t-if="widget.model.has('icon')">
|
||||
<t t-esc="widget.model.get('icon')"/>
|
||||
<span t-if="widget.model.has('icon')"
|
||||
t-att-class="'label label-default fa ' + widget.model.get('icon')">
|
||||
</span>
|
||||
<span class="label label-default" t-if="!widget.model.has('icon')">
|
||||
<t t-esc="widget.model.get('category')"/>
|
||||
@@ -1557,73 +1576,14 @@
|
||||
<span t-name="SearchView.FacetView.Value" class="oe_facet_value">
|
||||
<t t-esc="widget.model.get('label')"/>
|
||||
</span>
|
||||
<t t-name="SearchView.managed-filters">
|
||||
<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}"
|
||||
t-att-disabled="filter.disabled and 'disabled'"
|
||||
t-att-title="filter.disabled and disabled_filter_message">
|
||||
<t t-esc="filter.name"/>
|
||||
</option>
|
||||
</t>
|
||||
</optgroup>
|
||||
<optgroup label="-- Actions --">
|
||||
<option value="advanced_filter">Add Advanced Filter</option>
|
||||
<option value="save_filter">Save Filter</option>
|
||||
<option value="manage_filters">Manage Filters</option>
|
||||
</optgroup>
|
||||
</t>
|
||||
<t t-name="SearchView.managed-filters.add">
|
||||
<div>
|
||||
<p>Filter Name:</p>
|
||||
<input type="text"/>
|
||||
<p>(Any existing filter with the same name will be replaced)</p>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="SearchView.render_lines">
|
||||
<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">
|
||||
<t t-raw="widget.render(defaults)"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</t>
|
||||
<button t-name="SearchView.filter" type="button"
|
||||
t-att-id="element_id"
|
||||
t-att-title="attrs.help"
|
||||
t-att-class="classes.join(' ')"
|
||||
t-att-style="style"
|
||||
t-att-autofocus="attrs.default_focus === '1' ? 'autofocus' : undefined">
|
||||
<img t-att-src="_s + '/web/static/src/img/icons/' + (attrs.icon || 'gtk-home') + '.png'" width="16" height="16"/>
|
||||
<br t-if="attrs.string"/>
|
||||
<t t-esc="attrs.string"/>
|
||||
</button>
|
||||
<ul t-name="SearchView.filters">
|
||||
<t t-name="SearchView.filters">
|
||||
<li t-foreach="widget.filters" t-as="filter" t-if="!filter.visible || filter.visible()"
|
||||
t-att-title="filter.attrs.string ? filter.attrs.help : undefined"
|
||||
t-att-data-index="filter_index">
|
||||
<t t-esc="filter.attrs.string or filter.attrs.help or filter.attrs.name or 'Ω'"/>
|
||||
<a>
|
||||
<t t-esc="filter.attrs.string or filter.attrs.help or filter.attrs.name or 'Ω'"/>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<t t-name="SearchView.filters.facet">
|
||||
<div class="category oe_filter_category"><t t-esc="facet.get('category')"/></div>
|
||||
|
||||
<t t-set="val" t-value="facet.get('json')"/>
|
||||
|
||||
<div t-if="!(val instanceof Array)" class="search_facet_input_container">
|
||||
<t t-esc="facet.get('value')"/>
|
||||
</div>
|
||||
<t t-if="val instanceof Array">
|
||||
<div class="search_facet_input_container"
|
||||
t-foreach="facet.get('json')" t-as="filter">
|
||||
<t t-esc="filter.attrs.string || filter.attrs.name"/>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
<div class="search_facet_remove VS-icon VS-icon-cancel"/>
|
||||
</t>
|
||||
<t t-name="SearchView.field">
|
||||
<label t-att-class="'oe_label' + (attrs.help ? '_help' : '')"
|
||||
@@ -1681,82 +1641,82 @@
|
||||
<t t-if="filters.length" t-raw="filters.render(defaults)"/>
|
||||
</div>
|
||||
</t>
|
||||
<t t-name="SearchView.util.expand">
|
||||
<div t-att-class="'searchview_group ' + (expand == '0' ? 'folded' : 'expanded')">
|
||||
<a t-if="label" class="searchview_group_string" href="#">
|
||||
<t t-esc="label"/>
|
||||
</a>
|
||||
<div class="searchview_group_content">
|
||||
<t t-raw="content"/>
|
||||
</div>
|
||||
</div>
|
||||
<div t-name="SearchView.FilterMenu" class="btn-group btn-group-sm">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="fa fa-filter"/> Filters <span class="caret"/>
|
||||
</button>
|
||||
<ul class="dropdown-menu filters-menu" role="menu">
|
||||
<li class="oe-add-filter closed-menu"><a>Add Custom Filter</a></li>
|
||||
<li class="oe-add-filter-menu"><button class="btn btn-default oe-apply-filter">Apply</button><a class="oe-add-condition"><span class="fa fa-plus-circle"/> Add a condition</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div t-name="SearchView.GroupByMenu" class="btn-group btn-group-sm">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="fa fa-bars"/> Group By <span class="caret"/>
|
||||
</button>
|
||||
<ul class="dropdown-menu group-by-menu" role="menu">
|
||||
<li class="divider"/>
|
||||
<li class="add-custom-group closed-menu"><a>Add custom group</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<t t-name="GroupByMenuSelector">
|
||||
<li><select class="form-control oe-add-group oe-group-selector">
|
||||
<t t-foreach="groupable_fields" t-as="field">
|
||||
<option t-att-data-name="field"><t t-esc="groupable_fields[field].string"/></option>
|
||||
</t>
|
||||
</select></li>
|
||||
<li><button class="btn btn-default oe-add-group oe-select-group">Apply</button></li>
|
||||
</t>
|
||||
<div t-name="SearchView.Filters" class="oe_searchview_filters oe_searchview_section">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div t-name="SearchView.Custom" class="oe_searchview_custom oe_searchview_section">
|
||||
<dl class="dl-horizontal">
|
||||
<dt><span class="oe_i">M</span> Favorites</dt>
|
||||
<dd><ul class="oe_searchview_custom_list"/></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div t-name="SearchView.SaveFilter" class="oe_searchview_savefilter">
|
||||
<h4>Save current filter</h4>
|
||||
<form class="oe_form">
|
||||
<p class="oe_form_required"><input id="oe_searchview_custom_input" placeholder="Filter name"/></p>
|
||||
<p>
|
||||
<input id="oe_searchview_custom_public" type="checkbox"/>
|
||||
<label for="oe_searchview_custom_public">Share with all users</label>
|
||||
<input id="oe_searchview_custom_default" type="checkbox"/>
|
||||
<label for="oe_searchview_custom_default">Use by default</label>
|
||||
</p>
|
||||
<button>Save</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div t-name="SearchView.advanced" class="oe_searchview_advanced">
|
||||
<h4>Advanced Search</h4>
|
||||
<form>
|
||||
<ul>
|
||||
|
||||
</ul>
|
||||
<button class="oe_add_condition button" type="button">Add a condition</button><br/>
|
||||
<button class="oe_apply" type="submit">Apply</button>
|
||||
</form>
|
||||
<div t-name="SearchView.FavoriteMenu" class="btn-group btn-group-sm">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="fa fa-star"/> Favorites <span class="caret"/>
|
||||
</button>
|
||||
<ul class="dropdown-menu favorites-menu" role="menu">
|
||||
<li class="divider"/>
|
||||
<li class="oe-save-search closed-menu"><a>Save current search</a></li>
|
||||
<li class="oe-save-name"><input type="text" class="form-control"></input></li>
|
||||
<li class="oe-save-name">
|
||||
<span><input type="checkbox"/>Share with all users</span>
|
||||
</li>
|
||||
<li class="oe-save-name">
|
||||
<span><input type="checkbox"/>Use by default</span>
|
||||
</li>
|
||||
<li class="oe-save-name"><button class="btn btn-default">Save</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
<t t-name="SearchView.extended_search.proposition">
|
||||
<li>
|
||||
<span class="searchview_extended_prop_or">or</span>
|
||||
<select class="searchview_extended_prop_field">
|
||||
<t t-foreach="widget.attrs.fields" t-as="field">
|
||||
<option t-att="{'selected': field === widget.attrs.selected ? 'selected' : null}"
|
||||
t-att-value="field.name">
|
||||
<t t-esc="field.string"/>
|
||||
</option>
|
||||
</t>
|
||||
</select>
|
||||
<select class="searchview_extended_prop_op"/>
|
||||
<li class="oe-filter-condition">
|
||||
<span>
|
||||
<select class="searchview_extended_prop_field form-control">
|
||||
<t t-foreach="widget.attrs.fields" t-as="field">
|
||||
<option t-att="{'selected': field === widget.attrs.selected ? 'selected' : null}"
|
||||
t-att-value="field.name">
|
||||
<t t-esc="field.string"/>
|
||||
</option>
|
||||
</t>
|
||||
</select>
|
||||
<span class="searchview_extended_delete_prop fa fa-trash-o"/>
|
||||
</span>
|
||||
<select class="searchview_extended_prop_op form-control"/>
|
||||
<span class="searchview_extended_prop_value"/>
|
||||
<a class="searchview_extended_delete_prop button">x</a>
|
||||
</li>
|
||||
</t>
|
||||
<t t-name="SearchView.extended_search.proposition.char">
|
||||
<input class="field_char"/>
|
||||
<input class="field_char form-control"/>
|
||||
</t>
|
||||
<t t-name="SearchView.extended_search.proposition.empty">
|
||||
<span/>
|
||||
</t>
|
||||
<t t-name="SearchView.extended_search.proposition.integer">
|
||||
<input type="number" class="field_integer" value = "0" step="1"/>
|
||||
<input type="number" class="field_integer form-control" value = "0" step="1"/>
|
||||
</t>
|
||||
<t t-name="SearchView.extended_search.proposition.float">
|
||||
<input type="number" class="field_float" value = "0.0" step="0.01"/>
|
||||
<input type="number" class="field_float form-control" value = "0.0" step="0.01"/>
|
||||
</t>
|
||||
<t t-name="SearchView.extended_search.proposition.selection">
|
||||
<select>
|
||||
<select class="form-control">
|
||||
<t t-foreach="widget.field.selection" t-as="element">
|
||||
<option t-att-value="element[0]"><t t-esc="element[1]"/></option>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user