[MERGE] Merged with main web.

bzr revid: tde@openerp.com-20120621152104-boewl4pfi90vfygz
This commit is contained in:
Thibault Delavallée 2012-06-21 17:21:04 +02:00
commit 87f754ca0a
7 changed files with 30 additions and 22 deletions

View File

@ -215,8 +215,8 @@
.openerp .oe_bold {
font-weight: bold;
}
.openerp .oe_inline  {
width: auto;
.openerp .oe_inline {
width: auto !important;
}
.openerp .oe_highlight {
color: white;
@ -1526,9 +1526,6 @@
.openerp .oe_form_invisible {
display: none !important;
}
.openerp .oe_form_editable .oe_edit_only {
display: none !important;
}
.openerp .oe_form_readonly .oe_edit_only, .openerp .oe_form_readonly .oe_form_field:empty {
display: none !important;
}
@ -1723,7 +1720,7 @@
.openerp .oe_form .oe_form_field_selection select {
width: inherit;
}
.openerp .oe_form .oe_form_sheet textarea {
.openerp .oe_form .oe_form_field_text.oe_inline, .openerp .oe_form .oe_form_field_text.oe_inline > textarea {
width: 500px;
}
.openerp .oe_form .oe_form_field_float input {
@ -1809,6 +1806,7 @@
}
.openerp .oe_form .oe_form_field_boolean {
padding-top: 4px;
width: auto;
}
.openerp .oe_form .oe_form_field_many2manytags .text-wrap {
width: 100% !important;

View File

@ -220,8 +220,8 @@ $colour4: #8a89ba
color: #888
.oe_bold
font-weight: bold
.oe_inline 
width: auto
.oe_inline
width: auto !important
.oe_highlight
color: white
background: #DC5F59
@ -1218,8 +1218,6 @@ $colour4: #8a89ba
background: #ED6F6A
.oe_form_invisible
display: none !important
.oe_form_editable .oe_edit_only
display: none !important
.oe_form_readonly
.oe_edit_only, .oe_form_field:empty
display: none !important
@ -1380,7 +1378,7 @@ $colour4: #8a89ba
.oe_form_field_text textarea,
.oe_form_field_selection select
width: inherit
.oe_form_sheet textarea
.oe_form_field_text.oe_inline, .oe_form_field_text.oe_inline > textarea
width: 500px
.oe_form_field_float input
width: 100px
@ -1440,6 +1438,7 @@ $colour4: #8a89ba
white-space: nowrap
.oe_form_field_boolean
padding-top: 4px
width: auto
.oe_form_field_many2manytags
.text-wrap
width: 100% !important

View File

@ -118,7 +118,9 @@ instance.web.format_value = function (value, descriptor, value_if_empty) {
return instance.web.insert_thousand_seps(
_.str.sprintf('%d', value));
case 'float':
var precision = descriptor.digits ? descriptor.digits[1] : 2;
var digits = descriptor.digits ? descriptor.digits : [69,2];
digits = typeof digits === "string" ? py.eval(digits) : digits;
var precision = digits[1];
var formatted = _.str.sprintf('%.' + precision + 'f', value).split('.');
formatted[0] = instance.web.insert_thousand_seps(formatted[0]);
return formatted.join(l10n.decimal_point);

View File

@ -1995,7 +1995,7 @@ instance.web.form.FieldFloat = instance.web.form.FieldChar.extend({
this._super(field_manager, node);
this.set({'value': 0});
if (this.node.attrs.digits) {
this.digits = py.eval(node.attrs.digits);
this.digits = this.node.attrs.digits;
} else {
this.digits = this.field.digits;
}
@ -2409,7 +2409,7 @@ instance.web.form.CompletionFieldMixin = {
}
// create...
values.push({label: _t("<em>   Create and Edit...</em>"), action: function() {
self._search_create_popup("form", undefined, {"default_name": search_val});
self._search_create_popup("form", undefined, {});
}});
return values;

View File

@ -37,14 +37,6 @@
-moz-user-select:-moz-none;
}
.openerp .dhx_cal_navline{
height:20px;
position:absolute;
z-index:1;
width:750px;
color:#2F3A48;
background-color:#eee;
}
.openerp .dhx_cal_navline div{
top:2px;
white-space:nowrap;

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -231,6 +231,14 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
}
},
renderElement: function() {
var check = _.detect(this.node.children, function(column, column_index) {
return _.detect(column.children,function(element){
return element.tag === "action"? element: false;
});
});
if (!check) {
return this.no_result();
}
// We should start with three columns available
for (var i = this.node.children.length; i < 3; i++) {
this.node.children.push({
@ -242,6 +250,15 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
var rendered = QWeb.render(this.form_template, this);
this.$element.html(rendered);
},
no_result: function() {
if (this.view.options.action.help) {
this.$element.append(
$('<div class="oe_view_nocontent">')
.append($('<img>', { src: '/web_dashboard/static/src/img/view_todo_arrow.png' }))
.append($('<div>').html(this.view.options.action.help || " "))
);
}
},
do_reload: function() {
var view_manager = this.view.getParent(),
action_manager = view_manager.getParent();