merge upstream

bzr revid: chs@openerp.com-20120809152939-3dummyonbx1qdsbo
This commit is contained in:
Christophe Simonis 2012-08-09 17:29:39 +02:00
commit ee01a39a76
10 changed files with 544 additions and 260 deletions

View File

@ -1333,15 +1333,13 @@ class Binary(openerpweb.Controller):
retag = hashed_session
try:
id = None if not id else simplejson.loads(id)
if type(id) is list:
id = id[0] # m2o
if not id:
res = Model.default_get([field], context).get(field)
image_data = base64.b64decode(res)
else:
try:
id = int(id)
except (ValueError):
# objects might use virtual ids as string
pass
res = Model.read([id], [last_update, field], context)[0]
retag = hashlib.md5(res.get(last_update)).hexdigest()
image_data = base64.b64decode(res.get(field))

View File

@ -1,4 +1,4 @@
@charset "utf-8";
@charset "UTF-8";
@font-face {
font-family: "mnmliconsRegular";
src: url("/web/static/src/font/mnmliconsv21-webfont.eot") format("eot");
@ -156,7 +156,7 @@
.openerp h4 {
margin: 4px 0;
}
.openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp input[type='submit'] {
.openerp a.button:link, .openerp a.button:visited, .openerp button, .openerp input[type='submit'], .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button {
display: inline-block;
border: 1px solid #ababab;
color: #404040;
@ -181,7 +181,7 @@
-webkit-font-smoothing: antialiased;
outline: none;
}
.openerp a.button:hover, .openerp button:hover, .openerp input[type='submit']:hover {
.openerp a.button:hover, .openerp button:hover, .openerp input[type='submit']:hover, .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-hover {
background-color: #f6f6f6;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
@ -190,9 +190,11 @@
background-image: -o-linear-gradient(top, #f6f6f6, #e3e3e3);
background-image: linear-gradient(to bottom, #f6f6f6, #e3e3e3);
cursor: pointer;
background-position: 0;
}
.openerp a.button:focus, .openerp button:focus, .openerp input[type='submit']:focus {
.openerp a.button:focus, .openerp button:focus, .openerp input[type='submit']:focus, .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-focus {
border: 1px solid #80bfff;
background-position: 0;
background-color: #f6f6f6;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f6f6f6), to(#e3e3e3));
background-image: -webkit-linear-gradient(top, #f6f6f6, #e3e3e3);
@ -204,7 +206,7 @@
-webkit-box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
box-shadow: 0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, 0.8) inset;
}
.openerp a.button:active, .openerp a.button.active, .openerp button:active, .openerp button.active, .openerp input[type='submit']:active, .openerp input[type='submit'].active {
.openerp a.button:active, .openerp a.button.active, .openerp button:active, .openerp button.active, .openerp input[type='submit']:active, .openerp input[type='submit'].active, .openerp .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-active {
background-color: #e3e3e3;
background-image: -webkit-gradient(linear, left top, left bottom, from(#e3e3e3), to(#f6f6f6));
background-image: -webkit-linear-gradient(top, #e3e3e3, #f6f6f6);
@ -230,6 +232,9 @@
font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif;
font-size: 13px;
}
.openerp .ui-widget-content a {
color: #8a89ba;
}
.openerp .ui-menu .ui-menu-item {
margin: 0 8px 0 0;
padding: 0 0 0 12px;
@ -238,11 +243,6 @@
.openerp .ui-menu .ui-menu-item a.ui-state-active {
background: #f0f0fa;
}
.openerp div.ui-widget-overlay {
background: black;
filter: alpha(opacity=30);
opacity: 0.3;
}
.openerp.ui-dialog {
display: none;
padding: 6px;
@ -302,6 +302,9 @@
.openerp.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
float: left;
}
.openerp.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button {
margin-right: 4px;
}
.openerp.ui-dialog .ui-dialog-titlebar-close {
padding: 0;
}
@ -337,6 +340,9 @@
.openerp.ui-dialog .oe_about a:hover {
text-decoration: underline;
}
.openerp.ui-dialog .oe_about a:focus {
outline: none;
}
.openerp.ui-dialog .oe_about .oe_logo {
margin-left: -6px;
}
@ -492,9 +498,6 @@
.openerp .oe_button_box button {
margin: 4px;
}
.openerp .oe_avatar {
margin: 0 6px 15px 0;
}
.openerp .oe_avatar > img {
height: 90px;
max-width: 100px;
@ -562,22 +565,20 @@
.openerp .oe_webclient .oe_star_on {
color: gold;
}
.openerp .oe_bounce {
-moz-animation: bounce 0.4s linear;
-webkit-animation: bounce 0.4s linear;
}
.openerp .oe_tag {
border-radius: 2px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
border: 1px solid #9daccc;
background: #e2e6f0;
color: black !important;
padding: 0px 3px 0px 3px;
border: 1px solid #afafb6;
font-size: 11px;
padding: 2px 4px;
margin: 0 2px 2px 0;
height: 16px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background: #f0f0fa;
color: #4c4c4c;
}
.openerp .oe_tag_dark {
background: #8786b7;
color: #eeeeee;
}
.openerp .oe_tags .text-wrap {
width: 100% !important;
@ -1212,16 +1213,9 @@
}
.openerp .oe_secondary_submenu .oe_menu_counter {
float: right;
background: #8a89ba;
color: #eeeeee;
font-size: 10px;
border: 1px solid lightgray;
padding: 2px 4px;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
margin: 0px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
padding: 1px 4px;
}
.openerp .oe_secondary_submenu .oe_active {
background: #8a89ba;
@ -1564,25 +1558,27 @@
display: inline-block;
line-height: 17px;
}
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input, .openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet {
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet {
height: 18px;
margin: 1px 0;
font-size: 11px;
}
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_input:focus, .openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet:focus {
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet:focus {
outline: none;
}
.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;
}
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet {
position: relative;
cursor: pointer;
border: 1px solid #afafb6;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
background: #8786b7;
padding: 0;
-webkit-font-smoothing: auto;
}
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet:focus {
@ -1611,6 +1607,7 @@
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value {
border-left: 1px solid #afafb6;
text-shadow: 0 1px 1px white;
color: #4c4c4c;
}
.openerp .oe_searchview .oe_searchview_facets .oe_searchview_facet .oe_facet_value:last-child {
padding-right: 16px;
@ -1623,6 +1620,7 @@
line-height: 8px;
width: 12px;
height: 12px;
padding-top: 1px;
text-align: center;
font-weight: bold;
cursor: pointer;
@ -1922,7 +1920,7 @@
width: auto;
}
.openerp .oe_form_nosheet {
margin: 20px;
margin: 8px;
}
.openerp .oe_form_nosheet > header {
margin-top: -20px;
@ -1998,6 +1996,105 @@
font-weight: bold;
color: #b33630;
}
.openerp ul.oe_form_steps_clickable {
height: 30px;
margin: 0;
padding: 0;
text-shadow: 0 1px 1px #cacaca;
box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
overflow: hidden;
}
.openerp ul.oe_form_steps_clickable li {
border-right: none;
padding: 0 0 0 12px;
position: relative;
float: left;
vertical-align: top;
height: 30px;
color: white;
}
.openerp ul.oe_form_steps_clickable li:after {
content: " ";
width: 0;
height: 0;
border-top: 21px solid transparent;
border-bottom: 21px solid transparent;
border-left: 5px solid #807fb4;
position: absolute;
top: 50%;
margin-top: -21px;
left: 100%;
z-index: 2;
}
.openerp ul.oe_form_steps_clickable li:hover:after {
border-left: 5px solid #807fb4;
}
.openerp ul.oe_form_steps_clickable li:before {
content: " ";
width: 0;
height: 0;
border-top: 21px solid transparent;
border-bottom: 21px solid transparent;
border-left: 5px solid white;
position: absolute;
top: 50%;
margin-top: -21px;
margin-left: 2px;
left: 100%;
z-index: 2;
}
.openerp ul.oe_form_steps_clickable li.oe_form_steps_active {
font-weight: bold;
text-shadow: 0 1px 1px #999999;
box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
background-color: #dc5f59;
background: -webkit-linear-gradient(top, #dc5f59, #b33630);
color: white;
}
.openerp ul.oe_form_steps_clickable li.oe_form_steps_inactive {
cursor: pointer;
box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.25);
background-color: #adadcf;
background: -webkit-linear-gradient(top, #adadcf, #7c7ba7);
}
.openerp ul.oe_form_steps_clickable li.oe_form_steps_inactive div {
padding: 0 30px 0 0;
}
.openerp ul.oe_form_steps_clickable li.oe_form_steps_inactive:hover {
background: -webkit-linear-gradient(top, #7c7ba7, #adadcf);
}
.openerp ul.oe_form_steps_clickable li div {
padding: 0 30px 0 0;
}
.openerp ul.oe_form_steps_clickable li.oe_form_steps_active:after {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 21px solid transparent;
border-bottom: 21px solid transparent;
border-left: 5px solid #b33630;
position: absolute;
top: 50%;
margin-top: -21px;
left: 100%;
z-index: 2;
}
.openerp ul.oe_form_steps_clickable li.oe_form_steps_active:before {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 21px solid transparent;
border-bottom: 21px solid transparent;
border-left: 5px solid white;
position: absolute;
top: 50%;
margin-top: -21px;
margin-left: 2px;
left: 100%;
z-index: 2;
}
.openerp .oe_form .oe_subtotal_footer {
width: 1% !important;
}
@ -2250,20 +2347,14 @@
.openerp .oe_form_editable .oe_form .oe_form_field_datetime {
width: 11.5em !important;
}
.openerp .oe_hidden_input_file {
overflow: hidden;
position: relative;
display: inline-block;
width: 45px;
height: 30px;
}
.openerp .oe_hidden_input_file input.oe_form_binary_file {
z-index: 0;
line-height: 0;
font-size: 12px;
position: absolute;
top: 1px;
right: 10px;
left: 0;
right: 0;
opacity: 0;
filter: alpha(opacity=0);
-ms-filter: "alpha(opacity=0)";
@ -2279,15 +2370,16 @@
}
.openerp .oe_form .oe_form_field_image .oe_form_field_image_controls {
position: absolute;
white-space: nowrap;
top: 1px;
padding: 3px 0 0 0;
margin: 0 1px;
padding: 4px;
width: 100%;
display: none;
width: 99%;
text-align: center;
background: url(/web/static/src/img/form_sheetbg.png);
border-bottom: 1px dotted black;
color: #eeeeee;
background: rgba(37, 37, 37, 0.9);
-moz-border-radius: 3px 3px 0 0;
-webkit-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
@ -2306,10 +2398,18 @@
}
.openerp .oe_form_field_many2one .oe_m2o_cm_button {
line-height: 14px;
float: right;
padding-left: 2px;
}
.openerp .oe_form .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page {
display: none;
}
.openerp .oe_form_field_one2many > .oe_view_manager .oe_list_pager_single_page, .openerp .oe_form_field_many2many > .oe_view_manager .oe_list_pager_single_page {
display: none !important;
}
.openerp .oe_form_field_one2many .oe_form_field_one2many_list_row_add, .openerp .oe_form_field_many2many .oe_form_field_one2many_list_row_add {
font-weight: bold;
}
.openerp .oe_form_field_one2many .oe_list_content > thead, .openerp .oe_form_field_many2many .oe_list_content > thead {
border-bottom: 1px;
}
@ -2343,6 +2443,49 @@
.openerp .oe_form_field_one2many .oe_list_buttons.oe_editing .oe_list_save, .openerp .oe_form_field_many2many .oe_list_buttons.oe_editing .oe_list_save {
visibility: hidden;
}
.openerp .oe_form_editable .oe_list_editable .oe_list_content td.oe_required {
background-color: #d2d2ff;
}
.openerp .oe_form_editable .oe_list_editable .oe_list_content td.oe_readonly {
background-color: #eeeeee;
}
.openerp .oe_list_editable .oe_list_content td.oe_list_field_cell {
padding: 4px 6px 3px 6px;
}
.openerp .oe_list.oe_list_editable td.oe_list_record_delete {
position: absolute;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_m2o_drop_down_button {
top: 5px;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_m2o_cm_button {
display: none;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input {
height: 27px;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea {
border: 1px solid #aaaaff;
border-radius: 0px;
margin: 0px;
-webkit-border-radius: 0px;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea {
height: 60px;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_float input, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_view_integer input {
text-align: right;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_datetime > span, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_date > span {
width: 100%;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_datetime input.oe_datepicker_master, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_date input.oe_datepicker_master {
width: 100% !important;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field .oe_form_field_float, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field .oe_form_view_integer, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_datetime, .openerp .oe_list.oe_list_editable.oe_editing .oe_form_field.oe_form_field_date {
min-width: 0 !important;
max-width: none !important;
}
.openerp .oe_form .oe_form_field_many2many > .oe_list .oe_list_pager_single_page {
display: none;
}
@ -2461,15 +2604,6 @@
background: #eeeeee;
font-weight: bold;
}
.openerp .oe_list_content > tbody tr:hover td, .openerp .oe_list_content tbody tr:hover th {
background-color: #eeeeee;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#dedede));
background-image: -webkit-linear-gradient(top, #eeeeee, #dedede);
background-image: -moz-linear-gradient(top, #eeeeee, #dedede);
background-image: -ms-linear-gradient(top, #eeeeee, #dedede);
background-image: -o-linear-gradient(top, #eeeeee, #dedede);
background-image: linear-gradient(to bottom, #eeeeee, #dedede);
}
.openerp .oe_list_content .numeric {
text-align: right;
width: 82px;
@ -2600,3 +2734,9 @@
.kitten-mode-activated > * {
opacity: 0.7;
}
div.ui-widget-overlay {
background: black;
filter: alpha(opacity=30);
opacity: 0.3;
}

View File

@ -2,10 +2,12 @@
// Variables {{{
$section-title-color: #8786b7
$facets-border: #afafb6
$facets-border-selected: #a6a6fe
$tag-bg-light: #f0f0fa
$tag-bg-dark: #8786b7
$tag-border: #afafb6
$tag-border-selected: #a6a6fe
$hover-background: #f0f0fa
$colour4: #8a89ba
$link-color: #8a89ba
$sheet-max-width: 860px
// }}}
// Mixins {{{
@ -190,7 +192,7 @@ $sheet-max-width: 860px
margin: 4px 0
// }}}
// Button style {{{
a.button:link, a.button:visited, button, input[type='submit']
a.button:link, a.button:visited, button, input[type='submit'], .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button
display: inline-block
border: 1px solid #ababab
color: #404040
@ -205,16 +207,18 @@ $sheet-max-width: 860px
-webkit-font-smoothing: antialiased
outline: none
a.button:hover, button:hover, input[type='submit']:hover
a.button:hover, button:hover, input[type='submit']:hover, .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-hover
@include vertical-gradient(#f6f6f6, #e3e3e3)
cursor: pointer
background-position: 0
a.button:focus, button:focus, input[type='submit']:focus
a.button:focus, button:focus, input[type='submit']:focus, .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-focus
border: 1px solid #80bfff
background-position: 0
@include vertical-gradient(#f6f6f6, #e3e3e3)
@include box-shadow((0 0 3px #80bfff, 0 1px 1px rgba(255, 255, 255, .8) inset))
a.button:active, a.button.active, button:active, button.active, input[type='submit']:active, input[type='submit'].active
a.button:active, a.button.active, button:active, button.active, input[type='submit']:active, input[type='submit'].active, .ui-dialog-buttonpane .ui-dialog-buttonset .ui-button.ui-state-active
@include vertical-gradient(#e3e3e3, #f6f6f6)
@include box-shadow(none)
@ -230,6 +234,8 @@ $sheet-max-width: 860px
.ui-widget
font-family: "Lucida Grande", Helvetica, Verdana, Arial, sans-serif
font-size: 13px
.ui-widget-content a
color: $link-color
.ui-menu
.ui-menu-item
margin: 0 8px 0 0
@ -237,9 +243,7 @@ $sheet-max-width: 860px
width: auto
a.ui-state-active
background: #f0f0fa
div.ui-widget-overlay
background: black
@include opacity(0.3)
// Modal box
&.ui-dialog
display: none
@ -276,6 +280,8 @@ $sheet-max-width: 860px
margin: 0
.ui-dialog-buttonset
float: left
.ui-button
margin-right: 4px
.ui-dialog-titlebar-close
padding: 0
.ui-icon-closethick
@ -299,9 +305,11 @@ $sheet-max-width: 860px
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAYAAADgzO9IAAAAKUlEQVQIHWO8e/fufwYsgAUkJigoiCIF5DMyoYggcUiXgNnBiGQKmAkARpcEQeriln4AAAAASUVORK5CYII=)
@include radius(0 0 2px 2px)
a
color: #8A89BA
color: $link-color
&:hover
text-decoration: underline
&:focus
outline: none
.oe_logo
margin-left: -6px
.oe_bottom
@ -399,7 +407,6 @@ $sheet-max-width: 860px
button
margin: 4px
.oe_avatar
margin: 0 6px 15px 0
> img
height: 90px
max-width: 100px
@ -420,7 +427,7 @@ $sheet-max-width: 860px
display: none
span
@include reset()
color: #8A89BA
color: $link-color
font-weight: bold
&:hover
text-decoration: underline
@ -438,15 +445,17 @@ $sheet-max-width: 860px
// }}}
// Tags (for many2many tags, among others) {{{
.oe_tag
border-radius: 2px
@include box-sizing(border)
border: 1px solid #9DACCC
background: #E2E6F0
color: black !important
padding: 0px 3px 0px 3px
border: 1px solid $tag-border
font-size: 11px
padding: 2px 4px
margin: 0 2px 2px 0
height: 16px
// font: 11px "lucida grande", tahoma, verdana, arial, sans-serif
@include radius(3px)
background: $tag-bg-light
color: #4C4C4C
.oe_tag_dark
background: $tag-bg-dark
color: #eee
.oe_tags
.text-wrap
width: 100% !important
@ -899,7 +908,7 @@ $sheet-max-width: 860px
.oe_secondary_menu_section
font-weight: bold
margin-left: 8px
color: $colour4
color: $link-color
.oe_secondary_submenu
padding: 2px 0 8px 0
margin: 0
@ -917,7 +926,7 @@ $sheet-max-width: 860px
top: 1px
right: 1px
font-size: 10px
background: $colour4
background: $link-color
color: white
padding: 2px 4px
margin: 1px 6px 0 0
@ -927,16 +936,11 @@ $sheet-max-width: 860px
@include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.2))
.oe_menu_counter
float: right
background: #8a89ba
color: #eee
font-size: 10px
border: 1px solid lightgray
padding: 2px 4px
text-shadow: 0 1px 1px rgba(0,0,0,0.2)
margin: 0px
@include radius(4px)
padding: 1px 4px
.oe_active
background: $colour4
background: $link-color
border-top: 1px solid lightGray
border-bottom: 1px solid lightGray
text-shadow: 0 1px 1px rgba(0,0,0,0.2)
@ -945,12 +949,12 @@ $sheet-max-width: 860px
color: white
.oe_menu_label
background: #eee
color: $colour4
color: $link-color
text-shadow: 0 1px 1px white
@include box-shadow(0 1px 1px rgba(0, 0, 0, 0.2))
.oe_menu_counter
background: #eee
color: #8a89ba
color: $link-color
.oe_menu_toggler:before
width: 0
height: 0
@ -977,7 +981,7 @@ $sheet-max-width: 860px
.oe_application
width: 100%
a
color: $colour4
color: $link-color
&:hover
text-decoration: underline
> div
@ -1011,7 +1015,7 @@ $sheet-max-width: 860px
margin: 0
float: left
a
color: $colour4
color: $link-color
.oe_button_group
display: inline-block
border: 1px solid #ababab
@ -1148,8 +1152,8 @@ $sheet-max-width: 860px
font-size: 12px
line-height: 18px
&.oe_focused
border-color: $facets-border-selected
@include box-shadow(0 1px 2px $facets-border-selected inset)
border-color: $tag-border-selected
@include box-shadow(0 1px 2px $tag-border-selected inset)
.oe_searchview_clear
cursor: pointer
position: absolute
@ -1200,7 +1204,7 @@ $sheet-max-width: 860px
vertical-align: top
display: inline-block
line-height: 17px
.oe_searchview_input, .oe_searchview_facet
.oe_searchview_facet
height: 18px
margin: 1px 0
font-size: 11px
@ -1208,17 +1212,20 @@ $sheet-max-width: 860px
outline: none
.oe_searchview_input
padding: 0 0 0 6px
font-size: 12px
height: 16px
margin-top: 3px
&:focus
outline: none
.oe_searchview_facet
position: relative
cursor: pointer
border: 1px solid $facets-border
@include radius(3px)
background: #8786b7
padding: 0
-webkit-font-smoothing: auto
// spacing for opera, FF
&:focus
border-color: $facets-border-selected
@include box-shadow(0 0 3px 1px $facets-border-selected)
border-color: $tag-border-selected
@include box-shadow(0 0 3px 1px $tag-border-selected)
.oe_facet_values
background: #f0f0fa
@include radius(0 3px 3px 0)
@ -1231,8 +1238,9 @@ $sheet-max-width: 860px
.oe_facet_category.oe_i
font-size: 16px
.oe_facet_value
border-left: 1px solid $facets-border
border-left: 1px solid $tag-border
text-shadow: 0 1px 1px white
color: #4C4C4C
&:last-child
padding-right: 16px
.oe_facet_remove
@ -1243,6 +1251,7 @@ $sheet-max-width: 860px
line-height: 8px
width: 12px
height: 12px
padding-top: 1px
text-align: center
font-weight: bold
cursor: pointer
@ -1473,7 +1482,7 @@ $sheet-max-width: 860px
.oe_form .oe_form_field_date
width: auto
.oe_form_nosheet
margin: 20px
margin: 8px
.oe_form_nosheet > header
margin-top: -20px
margin-left: -20px
@ -1531,6 +1540,93 @@ $sheet-max-width: 860px
.oe_form_steps_active
font-weight: bold
color: #b33630
ul.oe_form_steps_clickable
height: 30px
margin: 0
padding: 0
text-shadow: 0 1px 1px #cacaca
box-shadow: 0 0 1px rgba(0,0,0,0.5)
overflow: hidden
li
border-right: none
padding: 0 0 0 12px
position: relative
float: left
vertical-align: top
height: 30px
color: white
&:after
content: " "
width: 0
height: 0
border-top: 21px solid transparent
border-bottom: 21px solid transparent
border-left: 5px solid #807fb4
position: absolute
top: 50%
margin-top: -21px
left: 100%
z-index: 2
&:hover:after
border-left: 5px solid #807fb4
&:before
content: " "
width: 0
height: 0
border-top: 21px solid transparent
border-bottom: 21px solid transparent
border-left: 5px solid white
position: absolute
top: 50%
margin-top: -21px
margin-left: 2px
left: 100%
z-index: 2
&.oe_form_steps_active
font-weight: bold
text-shadow: 0 1px 1px #999999
box-shadow: inset 0 -1px 1px rgba(0,0,0,0.25), inset 0 1px 1px rgba(255,255,255,0.25)
background-color: #dc5f59
background: -webkit-linear-gradient(top, #dc5f59, #b33630)
color: white
&.oe_form_steps_inactive
cursor: pointer
box-shadow: inset 0 -1px 1px rgba(0,0,0,0.25), inset 0 1px 1px rgba(255,255,255,0.25)
background-color: #adadcf
background: -webkit-linear-gradient(top, #adadcf, #7c7ba7)
div
padding: 0 30px 0 0
&.oe_form_steps_inactive:hover
background: -webkit-linear-gradient(top, #7c7ba7, #adadcf)
div
padding: 0 30px 0 0
&.oe_form_steps_active:after
content: " "
display: block
width: 0
height: 0
border-top: 21px solid transparent
border-bottom: 21px solid transparent
border-left: 5px solid #b33630
position: absolute
top: 50%
margin-top: -21px
left: 100%
z-index: 2
&.oe_form_steps_active:before
content: " "
display: block
width: 0
height: 0
border-top: 21px solid transparent
border-bottom: 21px solid transparent
border-left: 5px solid white
position: absolute
top: 50%
margin-top: -21px
margin-left: 2px
left: 100%
z-index: 2
.oe_form .oe_subtotal_footer
width: 1% !important
td.oe_form_group_cell
@ -1738,19 +1834,14 @@ $sheet-max-width: 860px
* http://stackoverflow.com/questions/2855589/replace-input-type-file-by-an-image
*/
.oe_hidden_input_file
overflow: hidden
position: relative
display: inline-block
width: 45px
height: 30px
input.oe_form_binary_file
z-index: 0
line-height: 0
font-size: 12px
position: absolute
// Should be adjusted for all browsers
top: 1px
right: 10px
left: 0
right: 0
opacity: 0
filter: alpha(opacity = 0)
-ms-filter: "alpha(opacity=0)"
@ -1765,15 +1856,14 @@ $sheet-max-width: 860px
vertical-align: top
.oe_form_field_image_controls
position: absolute
white-space: nowrap
top: 1px
padding: 3px 0 0 0
margin: 0 1px
padding: 4px
width: 100%
display: none
width: 99%
text-align: center
background: url(/web/static/src/img/form_sheetbg.png)
border-bottom: 1px dotted black
color: #eee
background: rgba(37,37,37,0.9)
@include radius(3px 3px 0 0)
@include box-sizing(border)
&:hover .oe_form_field_image_controls
display: block
@ -1788,6 +1878,8 @@ $sheet-max-width: 860px
right: 0px
.oe_m2o_cm_button
line-height: 14px
float: right
padding-left: 2px
// }}}
// FormView.one2many {{{
.oe_form .oe_form_field_one2many > .oe_view_manager
@ -1795,6 +1887,11 @@ $sheet-max-width: 860px
display: none
.oe_form_field_one2many,.oe_form_field_many2many
// TODO: oe_form_field_one2many_list?
> .oe_view_manager
.oe_list_pager_single_page
display: none !important
.oe_form_field_one2many_list_row_add
font-weight: bold
.oe_list_content
> thead
border-bottom: 1px
@ -1824,6 +1921,46 @@ $sheet-max-width: 860px
.oe_list_buttons.oe_editing .oe_list_save
// keep "save row" button hidden in o2m
visibility: hidden
.oe_form_editable
.oe_list_editable
.oe_list_content
td.oe_required
background-color: #d2d2ff
td.oe_readonly
background-color: #eee
.oe_list_editable
.oe_list_content
td.oe_list_field_cell
padding: 4px 6px 3px 6px
.oe_list.oe_list_editable
td.oe_list_record_delete
position: absolute
.oe_list.oe_list_editable.oe_editing
.oe_m2o_drop_down_button
top: 5px
.oe_m2o_cm_button
display: none
.oe_form_field
input
height: 27px
input, textarea
border: 1px solid #aaf
border-radius: 0px
margin: 0px
-webkit-border-radius: 0px
textarea
height: 60px
&.oe_form_field_float,&.oe_form_view_integer
input
text-align: right
&.oe_form_field_datetime,&.oe_form_field_date
> span
width: 100%
input.oe_datepicker_master
width: 100% !important
.oe_form_field_float,.oe_form_view_integer,&.oe_form_field_datetime,&.oe_form_field_date
min-width: 0 !important
max-width: none !important
// }}}
// FormView.many2many {{{
.oe_form .oe_form_field_many2many > .oe_list
@ -1918,8 +2055,6 @@ $sheet-max-width: 860px
background: #eee
font-weight: bold
> tbody tr:hover td, tbody tr:hover th
@include vertical-gradient(#eee, #dedede)
.numeric
text-align: right
@ -2028,6 +2163,10 @@ $sheet-max-width: 860px
// }}}
// The jQuery-ui overlay is outside the .openerp div, please don't add indentation !!!
div.ui-widget-overlay
background: black
@include opacity(0.3)
// au BufWritePost,FileWritePost *.sass :!sass --style expanded --line-numbers <afile> > "%:p:r.css"
// vim:tabstop=4:shiftwidth=4:softtabstop=4:fdm=marker:

View File

@ -661,6 +661,37 @@ instance.web.Home = instance.web.Widget.extend({
});
instance.web.client_actions.add("home", "instance.web.Home");
instance.web.ChangePassword = instance.web.Widget.extend({
template: "ChangePassword",
start: function() {
var self = this;
self.$element.find("form[name=change_password_form]").validate({
submitHandler: function (form) {
self.rpc("/web/session/change_password",{
'fields': $(form).serializeArray()
}, function(result) {
if (result.error) {
self.display_error(result);
return;
} else {
instance.webclient.on_logout();
}
});
}
});
},
display_error: function (error) {
return instance.web.dialog($('<div>'), {
modal: true,
title: error.title,
buttons: [
{text: _("Ok"), click: function() { $(this).dialog("close"); }}
]
}).html(error.error);
},
})
instance.web.client_actions.add("change_password", "instance.web.ChangePassword");
instance.web.Menu = instance.web.Widget.extend({
template: 'Menu',
init: function() {
@ -828,37 +859,6 @@ instance.web.UserMenu = instance.web.Widget.extend({
}
});
},
change_password :function() {
var self = this;
this.dialog = new instance.web.Dialog(this, {
title: _t("Change Password"),
width : 'auto'
}).open();
this.dialog.$element.html(QWeb.render("UserMenu.password", self));
this.dialog.$element.find("form[name=change_password_form]").validate({
submitHandler: function (form) {
self.rpc("/web/session/change_password",{
'fields': $(form).serializeArray()
}, function(result) {
if (result.error) {
self.display_error(result);
return;
} else {
instance.webclient.on_logout();
}
});
}
});
},
display_error: function (error) {
return instance.web.dialog($('<div>'), {
modal: true,
title: error.title,
buttons: [
{text: _("Ok"), click: function() { $(this).dialog("close"); }}
]
}).html(error.error);
},
do_update: function () {
var self = this;
var fct = function() {
@ -886,44 +886,10 @@ instance.web.UserMenu = instance.web.Widget.extend({
},
on_menu_settings: function() {
var self = this;
var action_manager = new instance.web.ActionManager(this);
var dataset = new instance.web.DataSet (this,'res.users',this.context);
dataset.call ('action_get','',function (result){
self.rpc('/web/action/load', {action_id:result}, function(result){
action_manager.do_action(_.extend(result['result'], {
target: 'inline',
res_id: self.session.uid,
res_model: 'res.users',
flags: {
action_buttons: false,
search_view: false,
sidebar: false,
views_switcher: false,
pager: false
}
}));
});
self.rpc("/web/action/load", { action_id: "base.action_res_users_my" }, function(result) {
result.result.res_id = instance.connection.uid;
self.getParent().action_manager.do_action(result.result);
});
this.dialog = new instance.web.Dialog(this,{
title: _t("Preferences"),
width: '700px',
buttons: [
{text: _t("Change password"), click: function(){ self.change_password(); }},
{text: _t("Cancel"), click: function(){ $(this).dialog('destroy'); }},
{text: _t("Save"), click: function(){
var inner_widget = action_manager.inner_widget;
inner_widget.views[inner_widget.active_view].controller.do_save()
.then(function() {
self.dialog.destroy();
// needs to refresh interface in case language changed
window.location.reload();
});
}
}
]
}).open();
action_manager.appendTo(this.dialog.$element);
action_manager.renderElement(this.dialog);
},
on_menu_about: function() {
var self = this;
@ -935,7 +901,7 @@ instance.web.UserMenu = instance.web.Widget.extend({
window.location.href, 'debug');
});
instance.web.dialog($help, {autoOpen: true,
modal: true, width: 580, height: 290, resizable: false, title: _t("About")});
modal: true, width: 507, height: 290, resizable: false, title: _t("About")});
});
},
});
@ -1098,15 +1064,15 @@ instance.web.WebClient = instance.web.Client.extend({
$(window).bind('hashchange', this.on_hashchange);
var state = $.bbq.getState(true);
if (! _.isEmpty(state)) {
$(window).trigger('hashchange');
} else {
if (_.isEmpty(state) || state.action == "login") {
self.menu.has_been_loaded.then(function() {
var first_menu_id = self.menu.$element.find("a:first").data("menu");
if(first_menu_id) {
self.menu.menu_click(first_menu_id);
}
});
} else {
$(window).trigger('hashchange');
}
},
on_hashchange: function(event) {

View File

@ -161,7 +161,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
this.$element.find(".oe_form_field,label").on('click', function (e) {
if(self.get("actual_mode") == "view") {
var $button = self.options.$buttons.find(".oe_form_button_edit");
$button.effect('bounce', {distance: 18, times: 7}, 200)
$button.effect('bounce', {distance: 18, times: 5}, 150)
}
});
@ -638,8 +638,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
*/
_actualize_mode: function(switch_to) {
var mode = switch_to || this.get("actual_mode");
if (! this.datarecord.id)
if (! this.datarecord.id) {
mode = "create";
}
this.set({actual_mode: mode});
},
check_actual_mode: function(source, options) {
@ -681,7 +682,7 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
},
on_button_save: function() {
var self = this;
return this.do_save().then(function(result) {
return this.do_save().then(function(result) {
self.to_view_mode();
});
},
@ -789,16 +790,16 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
self.set({'display_invalid_fields': false});
var save_deferral;
if (!self.datarecord.id) {
//console.log("FormView(", self, ") : About to create", values);
// console.log("FormView(", self, ") : About to create", values);
save_deferral = self.dataset.create(values).pipe(function(r) {
return self.on_created(r, undefined, prepend_on_create);
}, null);
} else if (_.isEmpty(values) && ! self.force_dirty) {
//console.log("FormView(", self, ") : Nothing to save");
// console.log("FormView(", self, ") : Nothing to save");
save_deferral = $.Deferred().resolve({}).promise();
} else {
self.force_dirty = false;
//console.log("FormView(", self, ") : About to save", values);
// console.log("FormView(", self, ") : About to save", values);
save_deferral = self.dataset.write(self.datarecord.id, values, {}).pipe(function(r) {
return self.on_saved(r);
}, null);
@ -2082,7 +2083,7 @@ instance.web.form.FieldChar = instance.web.form.AbstractField.extend(instance.we
return this.get('value') === '' || this._super();
},
focus: function() {
this.$element.find('input:first').focus();
this.$('input:first').focus();
}
});
@ -2166,6 +2167,9 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({
value_ = 0;
}
this._super.apply(this, [value_]);
},
focus: function () {
this.$('input:first').select();
}
});
@ -3011,7 +3015,7 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
},
start: function() {
this._super.apply(this, arguments);
this.$element.addClass('oe_form_field_one2many');
this.$element.addClass('oe_form_field oe_form_field_one2many');
var self = this;
@ -4612,8 +4616,9 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
if (this.get('value') && ! /^\d+(\.\d*)? \w+$/.test(this.get('value'))) {
url = 'data:image/png;base64,' + this.get('value');
} else if (this.get('value')) {
var id = escape(JSON.stringify(this.view.datarecord.id || null));
url = '/web/binary/image?session_id=' + this.session.session_id + '&model=' +
this.view.dataset.model +'&id=' + (this.view.datarecord.id || '') + '&field=' + this.name + '&t=' + (new Date().getTime());
this.view.dataset.model +'&id=' + id + '&field=' + this.name + '&t=' + (new Date().getTime());
} else {
url = "/web/static/src/img/placeholder.png";
}
@ -4638,9 +4643,11 @@ instance.web.form.FieldBinaryImage = instance.web.form.FieldBinary.extend({
instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
template: "FieldStatus",
clickable: false,
start: function() {
this._super();
this.selected_value = null;
this.clickable = !!this.node.attrs.clickable;
if (this.$element.parent().is('header')) {
this.$element.after('<div class="oe_clear"/>');
}
@ -4745,14 +4752,32 @@ instance.web.form.FieldStatus = instance.web.form.AbstractField.extend({
* state (given by the key of (key, label)).
*/
render_elements: function () {
var self = this;
var content = instance.web.qweb.render("FieldStatus.content", {widget: this, _:_});
this.$element.html(content);
if (this.clickable) {
this.$element.addClass("oe_form_steps_clickable");
$('.oe_form_steps_arrow').remove();
var elemts = this.$element.find('.oe_form_steps_button');
_.each(elemts, function(element){
$item = $(element);
if ($item.attr("data-id") != self.selected_value) {
$item.click(function(event){
var data_id = parseInt($(this).attr("data-id"))
self.view.dataset.call('stage_set', [[self.view.datarecord.id],data_id]).then(function() {
return self.view.reload();
});
});
}
});
} else {
this.$element.addClass("oe_form_steps");
}
var colors = JSON.parse((this.node.attrs || {}).statusbar_colors || "{}");
var color = colors[this.selected_value];
if (color) {
if (color) {
var elem = this.$element.find("li.oe_form_steps_active span");
elem.css("color", color);
elem.css("color", color);
}
},
});

View File

@ -248,10 +248,11 @@ openerp.web.list_editable = function (instance) {
var $cell = $(cell);
var position = $cell.position();
// jquery does not understand !important
field.$element.attr('style', 'width: '+$cell.outerWidth()+'px !important')
field.$element.css({
top: position.top,
left: position.left,
width: $cell.outerWidth(),
minHeight: $cell.outerHeight()
});
},

View File

@ -271,6 +271,31 @@
</div>
</t>
<t t-name="ChangePassword">
<form name="change_password_form" method="POST">
<table align="center">
<tr>
<td><label for="old_pwd">Old Password:</label></td>
<td><input type="password" name="old_pwd"
minlength="1" autofocus="autofocus"/></td>
</tr>
<tr>
<td><label for="new_password">New Password:</label></td>
<td><input type="password" name="new_password"
minlength="1" autofocus="autofocus"/></td>
</tr>
<tr>
<td><label for="confirm_pwd">Confirm Password:</label></td>
<td><input type="password" name="confirm_pwd"
minlength="1"/></td>
</tr>
<tr>
<td colspan="2" align="right"><button class="oe_button">Change Password</button></td>
</tr>
</table>
</form>
</t>
<t t-name="Menu">
<ul class="oe_menu" t-if="widget.data">
<li t-foreach="widget.data.data.children" t-as="menu">
@ -317,7 +342,7 @@
t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''">
<t t-esc="menu.name"/>
<t t-if="menu.needaction_enabled and menu.needaction_counter">
<div class="oe_menu_counter">
<div class="oe_tag oe_tag_dark oe_menu_counter">
<t t-esc="menu.needaction_counter"/>
</div>
</t>
@ -351,30 +376,6 @@
</div>
</t>
<t t-name="UserMenu.password">
<form name="change_password_form" method="POST">
<table align="center">
<tr>
<td><label for="old_pwd">Old Password:</label></td>
<td><input type="password" name="old_pwd"
minlength="1" autofocus="autofocus"/></td>
</tr>
<tr>
<td><label for="new_password">New Password:</label></td>
<td><input type="password" name="new_password"
minlength="1" autofocus="autofocus"/></td>
</tr>
<tr>
<td><label for="confirm_pwd">Confirm Password:</label></td>
<td><input type="password" name="confirm_pwd"
minlength="1"/></td>
</tr>
<tr>
<td colspan="2" align="right"><button class="oe_button">Change Password</button></td>
</tr>
</table>
</form>
</t>
<t t-name="WebClient">
<div class="openerp openerp_webclient_container">
@ -618,7 +619,7 @@
<t t-if="column.tag !== 'button'"><t t-esc="column.string"/></t>
</th>
</t>
<th t-if="options.deletable" width="1"/>
<th t-if="options.deletable" width="13px"/>
</tr>
</thead>
<tfoot>
@ -670,11 +671,11 @@
<t t-set="number" t-value="column.type === 'integer' or column.type == 'float'"/>
<t t-set="modifiers" t-value="column.modifiers_for(asData)"/>
<td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"
t-attf-class="oe_list_field_cell oe_list_field_#{column.widget or column.type} #{number ? 'oe_number' : ''} #{column.tag === 'button' ? 'oe-button' : ''} #{modifiers.readonly ? 'oe_readonly' : ''}"
t-attf-class="oe_list_field_cell oe_list_field_#{column.widget or column.type} #{number ? 'oe_number' : ''} #{column.tag === 'button' ? 'oe-button' : ''} #{modifiers.readonly ? 'oe_readonly' : ''} #{modifiers.required ? 'oe_required' : ''}"
t-att-data-field="column.id"
><t t-raw="render_cell(record, column)"/></td>
</t>
<td t-if="options.deletable" class='oe_list_record_delete' width="1">
<td t-if="options.deletable" class='oe_list_record_delete' width="13px">
<button type="button" name="delete" class="oe_i">d</button>
</td>
</tr>
@ -976,7 +977,7 @@
</t>
<t t-if="!widget.get('effective_readonly')">
<a t-if="! widget.get_definition_options().no_open" href="#" tabindex="-1"
class="oe_m2o_cm_button oe_e oe_right">/</a>
class="oe_m2o_cm_button oe_e">/</a>
<div>
<input type="text"
t-att-id="widget.id_for_label"
@ -1036,14 +1037,19 @@
</span>
</t>
<t t-name="FieldStatus">
<ul class="oe_form_steps" t-att-style="widget.node.attrs.style"/>
<ul class="" t-att-style="widget.node.attrs.style"/>
</t>
<t t-name="FieldStatus.content">
<t t-set="size" t-value="widget.to_show.length"/>
<t t-foreach="_.range(size)" t-as="i">
<li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : ''">
<span><t t-esc="widget.to_show[i][1]"/></span>
<img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
<li t-att-class="widget.to_show[i][0] === widget.selected_value ? 'oe_form_steps_active' : 'oe_form_steps_inactive'">
<div class="oe_form_steps_button" t-att-data-id="widget.to_show[i][0]">
<t t-esc="widget.to_show[i][1]"/>
<span class="oe_form_steps_arrow">
<span></span>
</span>
<img t-att-src='_s + "/web/static/src/img/form_steps.png"' class="oe_form_steps_arrow" t-if="i &lt; size - 1"/>
</div>
</li>
</t>
</t>
@ -1052,13 +1058,8 @@
<div class="oe_form_field_image_controls oe_edit_only">
<t t-call="HiddenInputFile">
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
<button class="oe_button" type="button" title="Set Image">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
</button>
Edit
</t>
<button class="oe_button oe_form_binary_file_clear" type="button" title="Clear">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_MISSING_IMAGE.png"'/>
</button>
<div class="oe_form_binary_progress" style="display: none">
<img t-att-src='_s + "/web/static/src/img/throbber.gif"' width="16" height="16"/>
<b>Uploading ...</b>
@ -1278,7 +1279,7 @@
contenteditable="true"/>
<!-- tabindex: makes div focusable -->
<div t-name="SearchView.FacetView"
class="oe_searchview_facet"
class="oe_tag oe_tag_dark oe_searchview_facet"
tabindex="0"
><span class="oe_facet_remove">x</span
><span class="oe_facet_category oe_i" t-if="widget.model.has('icon')">

View File

@ -1,4 +1,3 @@
@charset "utf-8";
.openerp .oe_kanban_view {
height: inherit;
}
@ -175,6 +174,10 @@
.openerp .oe_kanban_view .oe_kanban_details h4 {
margin: 0 0 4px 0;
}
.openerp .oe_kanban_view .oe_kanban_details .oe_tag {
display: inline-block;
margin: 0 0 2px 0;
}
.openerp .oe_kanban_view .oe_kanban_record {
position: relative;
display: block;
@ -391,6 +394,9 @@
}
.openerp .oe_kanban_view .oe_kanban_footer_left .oe_kanban_mail_new {
line-height: 18px;
background-color: #8a89ba;
color: white;
font-weight: bold;
position: relative;
top: -1px;
}

View File

@ -180,6 +180,9 @@
color: #4c4c4c
h4
margin: 0 0 4px 0
.oe_tag
display: inline-block
margin: 0 0 2px 0
.oe_kanban_record
position: relative
display: block
@ -340,6 +343,9 @@
font-size: 22px
.oe_kanban_mail_new
line-height: 18px
background-color: #8a89ba
color: white
font-weight: bold
position: relative
top: -1px
.oe_kanban_bottom_right

View File

@ -178,7 +178,8 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
var remaining = groups.length - 1,
groups_array = [];
return $.when.apply(null, _.map(groups, function (group, index) {
var dataset = new instance.web.DataSetSearch(self, self.dataset.model, group.context, group.domain);
var dataset = new instance.web.DataSetSearch(self, self.dataset.model,
new instance.web.CompoundContext(self.dataset.get_context(), group.context), group.domain);
return dataset.read_slice(self.fields_keys.concat(['__last_update']), { 'limit': self.limit })
.pipe(function(records) {
self.dataset.ids.push.apply(self.dataset.ids, dataset.ids);
@ -226,7 +227,7 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
self.groups[group.undefined_title ? 'unshift' : 'push'](group);
});
var groups_started = _.map(this.groups, function(group) {
return group.prependTo(self.$element.find('.oe_kanban_groups_headers'));
return group.insertBefore(self.$element.find('.oe_kanban_groups_headers td:last'));
});
return $.when.apply(null, groups_started).then(function () {
self.on_groups_started();
@ -400,7 +401,7 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({
self.quick.replace($(".oe_kanban_no_group_qc_placeholder"));
}
this.$records = $(QWeb.render('KanbanView.group_records_container', { widget : this}));
this.$records.prependTo(this.view.$element.find('.oe_kanban_groups_records'));
this.$records.insertBefore(this.view.$element.find('.oe_kanban_groups_records td:last'));
this.$element.find(".oe_kanban_fold_icon").click(function() {
self.do_toggle_fold();
self.view.compute_groups_width();
@ -432,7 +433,7 @@ instance.web_kanban.KanbanGroup = instance.web.OldWidget.extend({
this.$records.click(function (ev) {
if (ev.target == ev.currentTarget) {
if (!self.state.folded) {
add_btn.effect('bounce', {distance: 18, times: 7}, 200)
add_btn.effect('bounce', {distance: 18, times: 5}, 150)
}
}
});
@ -756,6 +757,7 @@ instance.web_kanban.KanbanRecord = instance.web.OldWidget.extend({
} else if (this.record[field] && ! this.record[field].value) {
url = "/web/static/src/img/placeholder.png";
} else {
id = escape(JSON.stringify(id));
url = instance.connection.prefix + '/web/binary/image?session_id=' + this.session.session_id + '&model=' + model + '&field=' + field + '&id=' + id;
if (cache !== undefined) {
// Set the cache duration in seconds.