[FIX] View switcher buttons
bzr revid: fme@openerp.com-20120409193137-gmkzxlaswz9kfeqe
This commit is contained in:
parent
5126b6e3a7
commit
d692385747
|
@ -917,6 +917,167 @@
|
|||
line-height: 24px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_view_manager_buttons {
|
||||
padding-right: 8px;
|
||||
float: left;
|
||||
margin-right: 12px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_view_manager_sidebar {
|
||||
display: inline-block;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_view_manager_pager {
|
||||
float: right;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch {
|
||||
float: right;
|
||||
margin: 2px 0 0 0;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_form,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_page,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_tree,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_list,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_graph,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_gantt,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_calendar,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_kanban,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_diagram {
|
||||
background: url("/web/static/src/img/views-icons-a.png") repeat-x scroll left top transparent;
|
||||
overflow: hidden;
|
||||
width: 22px;
|
||||
height: 21px;
|
||||
border: none;
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_form span,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_page span,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_tree span,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_list span,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_graph span,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_gantt span,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_calendar span,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_kanban span,
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_diagram span {
|
||||
display: none;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_list, .openerp2 .oe_view_manager_switch .oe_vm_switch_tree {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_list:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_list:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_list:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_list.oe_view_manager_switch_selected, .openerp2 .oe_view_manager_switch .oe_vm_switch_tree:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_tree:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_tree:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_tree.oe_view_manager_switch_selected {
|
||||
background-position: 0px -21px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_form, .openerp2 .oe_view_manager_switch .oe_vm_switch_page {
|
||||
background-position: -22px 0px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_form:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_form:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_form:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_form.oe_view_manager_switch_selected, .openerp2 .oe_view_manager_switch .oe_vm_switch_page:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_page:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_page:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_page.oe_view_manager_switch_selected {
|
||||
background-position: -22px -21px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_graph {
|
||||
background-position: -44px 0px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_graph:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_graph:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_graph:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_graph.oe_view_manager_switch_selected {
|
||||
background-position: -44px -21px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_gantt {
|
||||
background-position: -66px 0px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_gantt:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_gantt:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_gantt:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_gantt.oe_view_manager_switch_selected {
|
||||
background-position: -66px -21px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_calendar {
|
||||
background-position: -88px 0px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_calendar:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_calendar:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_calendar:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_calendar.oe_view_manager_switch_selected {
|
||||
background-position: -88px -21px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_kanban {
|
||||
background-position: -110px 0px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_kanban:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_kanban:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_kanban:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_kanban.oe_view_manager_switch_selected {
|
||||
background-position: -110px -21px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_diagram {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_switch .oe_vm_switch_diagram:active, .openerp2 .oe_view_manager_switch .oe_vm_switch_diagram:hover, .openerp2 .oe_view_manager_switch .oe_vm_switch_diagram:focus, .openerp2 .oe_view_manager_switch .oe_vm_switch_diagram.oe_view_manager_switch_selected {
|
||||
background-position: 0px -21px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header {
|
||||
border-top: 1px solid #cacaca;
|
||||
border-bottom: 1px solid #cacaca;
|
||||
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);
|
||||
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 9px rgba(0, 0, 0, 0.1);
|
||||
-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);
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_view_manager_row {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
margin: 8px;
|
||||
clear: both;
|
||||
text-shadow: 0 1px 1px white;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_view_manager_row h2 {
|
||||
float: left;
|
||||
font-size: 18px;
|
||||
margin: 1px 0;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_view_manager_row h2 a {
|
||||
color: #8a89ba;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_view_manager_row .dropdown-toggle:after {
|
||||
margin-top: 7px;
|
||||
margin-left: 6px;
|
||||
border-top-color: #404040;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_filter {
|
||||
vertical-align: top;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_filter li {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_button_group {
|
||||
display: inline-block;
|
||||
border: 1px solid #ababab;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_button_group li {
|
||||
float: left;
|
||||
border-right: 1px solid #ababab;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_button_group li:last-child {
|
||||
border: none;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_button_group a {
|
||||
color: #4c4c4c;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_button_group a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_button_group .active {
|
||||
background: #999999;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) inset;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_button_group .active a {
|
||||
color: white;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .pagination li {
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
.openerp2 .oe_view_manager_header .oe_view_manager_switch {
|
||||
float: right;
|
||||
}
|
||||
|
|
|
@ -668,6 +668,124 @@ $colour4: #8a89ba
|
|||
text-shadow: 0 1px 2px rgba(0,0,0,0.4)
|
||||
// }}}
|
||||
// ViewManager.header {{{
|
||||
.oe_view_manager_header
|
||||
border-top: 1px solid #cacaca
|
||||
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_view_manager_row
|
||||
height: 26px
|
||||
line-height: 26px
|
||||
margin: 8px
|
||||
clear: both
|
||||
text-shadow: 0 1px 1px white
|
||||
h2
|
||||
float: left
|
||||
font-size: 18px
|
||||
margin: 1px 0
|
||||
a
|
||||
color: $colour4
|
||||
.dropdown-toggle:after
|
||||
margin-top: 7px
|
||||
margin-left: 6px
|
||||
border-top-color: #404040
|
||||
.oe_filter
|
||||
vertical-align: top
|
||||
li
|
||||
height: 24px
|
||||
line-height: 24px
|
||||
padding: 0 8px
|
||||
.oe_button_group
|
||||
display: inline-block
|
||||
border: 1px solid #ababab
|
||||
@include radius(5px)
|
||||
li
|
||||
float: left
|
||||
border-right: 1px solid #ababab
|
||||
&:last-child
|
||||
border: none
|
||||
a
|
||||
color: #4c4c4c
|
||||
&:hover
|
||||
text-decoration: none
|
||||
.active
|
||||
background: #999
|
||||
@include box-shadow(0 1px 4px rgba(0,0,0,0.3) inset)
|
||||
a
|
||||
color: #fff
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,0.4)
|
||||
.pagination
|
||||
li
|
||||
height: 24px
|
||||
line-height: 24px
|
||||
padding: 0 8px
|
||||
.oe_view_manager_buttons
|
||||
padding-right: 8px
|
||||
float: left
|
||||
margin-right: 12px
|
||||
.oe_view_manager_sidebar
|
||||
display: inline-block
|
||||
.oe_view_manager_pager
|
||||
float: right
|
||||
// }}}
|
||||
// ViewManager.switches {{{
|
||||
.oe_view_manager_switch
|
||||
float: right
|
||||
margin: 2px 0 0 0
|
||||
|
||||
.oe_vm_switch_form,
|
||||
.oe_vm_switch_page,
|
||||
.oe_vm_switch_tree,
|
||||
.oe_vm_switch_list,
|
||||
.oe_vm_switch_graph,
|
||||
.oe_vm_switch_gantt,
|
||||
.oe_vm_switch_calendar,
|
||||
.oe_vm_switch_kanban,
|
||||
.oe_vm_switch_diagram
|
||||
background: url("/web/static/src/img/views-icons-a.png") repeat-x scroll left top transparent
|
||||
overflow: hidden
|
||||
width: 22px
|
||||
height: 21px
|
||||
border: none
|
||||
background-position: 0px 0px
|
||||
span
|
||||
display: none
|
||||
|
||||
.oe_vm_switch_list, .oe_vm_switch_tree
|
||||
background-position: 0px 0px
|
||||
&:active, &:hover, &:focus, &.oe_view_manager_switch_selected
|
||||
background-position: 0px -21px
|
||||
|
||||
.oe_vm_switch_form, .oe_vm_switch_page
|
||||
background-position: -22px 0px
|
||||
&:active, &:hover, &:focus, &.oe_view_manager_switch_selected
|
||||
background-position: -22px -21px
|
||||
|
||||
.oe_vm_switch_graph
|
||||
background-position: -44px 0px
|
||||
&:active, &:hover, &:focus, &.oe_view_manager_switch_selected
|
||||
background-position: -44px -21px
|
||||
|
||||
.oe_vm_switch_gantt
|
||||
background-position: -66px 0px
|
||||
&:active, &:hover, &:focus, &.oe_view_manager_switch_selected
|
||||
background-position: -66px -21px
|
||||
|
||||
.oe_vm_switch_calendar
|
||||
background-position: -88px 0px
|
||||
&:active, &:hover, &:focus, &.oe_view_manager_switch_selected
|
||||
background-position: -88px -21px
|
||||
|
||||
.oe_vm_switch_kanban
|
||||
background-position: -110px 0px
|
||||
&:active, &:hover, &:focus, &.oe_view_manager_switch_selected
|
||||
background-position: -110px -21px
|
||||
|
||||
.oe_vm_switch_diagram
|
||||
background-position: 0px 0px
|
||||
&:active, &:hover, &:focus, &.oe_view_manager_switch_selected
|
||||
background-position: 0px -21px
|
||||
// }}}
|
||||
.oe_view_manager_header
|
||||
border-top: 1px solid #cacaca
|
||||
border-bottom: 1px solid #cacaca
|
||||
|
|
|
@ -1404,126 +1404,6 @@ ul.oe-arrow-list li.oe-arrow-list-selected .oe-arrow-list-after {
|
|||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch {
|
||||
margin:2px 0 0 0;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_form,
|
||||
.openerp .oe_vm_switch_page,
|
||||
.openerp .oe_vm_switch_tree,
|
||||
.openerp .oe_vm_switch_list,
|
||||
.openerp .oe_vm_switch_graph,
|
||||
.openerp .oe_vm_switch_gantt,
|
||||
.openerp .oe_vm_switch_calendar,
|
||||
.openerp .oe_vm_switch_kanban,
|
||||
.openerp .oe_vm_switch_diagram {
|
||||
background: url("/web/static/src/img/views-icons-a.png") repeat-x scroll left top transparent;
|
||||
overflow: hidden;
|
||||
width: 22px;
|
||||
height: 21px;
|
||||
border: none;
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_form span,
|
||||
.openerp .oe_vm_switch_page span,
|
||||
.openerp .oe_vm_switch_tree span,
|
||||
.openerp .oe_vm_switch_list span,
|
||||
.openerp .oe_vm_switch_graph span,
|
||||
.openerp .oe_vm_switch_gantt span,
|
||||
.openerp .oe_vm_switch_calendar span,
|
||||
.openerp .oe_vm_switch_kanban span,
|
||||
.openerp .oe_vm_switch_diagram span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_list {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_list:active,
|
||||
.openerp .oe_vm_switch_list:hover,
|
||||
.openerp .oe_vm_switch_list:focus,
|
||||
.openerp .oe_vm_switch_list[disabled="disabled"] {
|
||||
background-position: 0px -21px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_tree {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_tree:active,
|
||||
.openerp .oe_vm_switch_tree:hover,
|
||||
.openerp .oe_vm_switch_tree:focus,
|
||||
.openerp .oe_vm_switch_tree[disabled="disabled"] {
|
||||
background-position: 0px -21px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_form {
|
||||
background-position: -22px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_form:active,
|
||||
.openerp .oe_vm_switch_form:hover,
|
||||
.openerp .oe_vm_switch_form:focus,
|
||||
.openerp .oe_vm_switch_form[disabled="disabled"] {
|
||||
background-position: -22px -21px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_page {
|
||||
background-position: -22px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_page:active,
|
||||
.openerp .oe_vm_switch_page:hover,
|
||||
.openerp .oe_vm_switch_page:focus,
|
||||
.openerp .oe_vm_switch_page[disabled="disabled"] {
|
||||
background-position: -22px -21px;
|
||||
}
|
||||
.openerp .oe_vm_switch_graph {
|
||||
background-position: -44px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_graph:active,
|
||||
.openerp .oe_vm_switch_graph:hover,
|
||||
.openerp .oe_vm_switch_graph:focus,
|
||||
.openerp .oe_vm_switch_graph[disabled="disabled"] {
|
||||
background-position: -44px -21px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_gantt {
|
||||
background-position: -66px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_gantt:active,
|
||||
.openerp .oe_vm_switch_gantt:hover,
|
||||
.openerp .oe_vm_switch_gantt:focus,
|
||||
.openerp .oe_vm_switch_gantt[disabled="disabled"] {
|
||||
background-position: -66px -21px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_calendar {
|
||||
background-position: -88px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_calendar:active,
|
||||
.openerp .oe_vm_switch_calendar:hover,
|
||||
.openerp .oe_vm_switch_calendar:focus,
|
||||
.openerp .oe_vm_switch_calendar[disabled="disabled"] {
|
||||
background-position: -88px -21px;
|
||||
}
|
||||
.openerp .oe_vm_switch_kanban {
|
||||
background-position: -110px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_kanban:active,
|
||||
.openerp .oe_vm_switch_kanban:hover,
|
||||
.openerp .oe_vm_switch_kanban:focus,
|
||||
.openerp .oe_vm_switch_kanban[disabled="disabled"] {
|
||||
background-position: -110px -21px;
|
||||
}
|
||||
|
||||
.openerp .oe_vm_switch_diagram {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
.openerp .oe_vm_switch_diagram:active,
|
||||
.openerp .oe_vm_switch_diagram:hover,
|
||||
.openerp .oe_vm_switch_diagram:focus,
|
||||
.openerp .oe_vm_switch_diagram[disabled="disabled"] {
|
||||
background-position: 0px -21px;
|
||||
}
|
||||
|
||||
|
||||
.openerp select.oe_search-view-filters-management {
|
||||
|
|
|
@ -262,7 +262,7 @@ session.web.ViewManager = session.web.OldWidget.extend({
|
|||
views_ids[view.view_type] = view.view_id;
|
||||
});
|
||||
if (this.flags.views_switcher === false) {
|
||||
this.$element.find('.oe_vm_switch').hide();
|
||||
this.$element.find('.oe_view_manager_switch').hide();
|
||||
}
|
||||
// If no default view defined, switch to the first one in sequence
|
||||
var default_view = this.flags.default_view || this.views_src[0].view_type;
|
||||
|
@ -319,9 +319,9 @@ session.web.ViewManager = session.web.OldWidget.extend({
|
|||
}
|
||||
|
||||
this.$element
|
||||
.find('.oe_vm_switch button').removeAttr('disabled')
|
||||
.find('.oe_view_manager_switch button').removeClass('oe_view_manager_switch_selected')
|
||||
.filter('[data-view-type="' + view_type + '"]')
|
||||
.attr('disabled', true);
|
||||
.addClass('oe_view_manager_switch_selected');
|
||||
|
||||
$.when(view_promise).then(function () {
|
||||
_.each(_.keys(self.views), function(view_name) {
|
||||
|
|
Loading…
Reference in New Issue