[MERGE] Merged with latest trunk.

bzr revid: vta@openerp.com-20120904124152-6j1n6oz9wo6sig0x
This commit is contained in:
vta vta@openerp.com
2012-09-04 14:41:52 +02:00
7 changed files with 60 additions and 26 deletions
+14 -9
View File
@@ -237,6 +237,9 @@
.openerp .ui-widget-content a {
color: #7c7bad;
}
.openerp .oe_bounce_container {
display: inline-block;
}
.openerp.ui-dialog {
display: none;
padding: 6px;
@@ -520,9 +523,9 @@
padding: 0;
margin: 0;
background: none;
-moz-border-radius: none;
-webkit-border-radius: none;
border-radius: none;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
@@ -535,9 +538,9 @@
padding: 0;
margin: 0;
background: none;
-moz-border-radius: none;
-webkit-border-radius: none;
border-radius: none;
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
@@ -2480,10 +2483,11 @@
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 {
-moz-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
border: 1px solid #aaaaff;
border-radius: 0px;
margin: 0px;
-webkit-border-radius: 0px;
margin: 0;
}
.openerp .oe_list.oe_list_editable.oe_editing .oe_form_field textarea {
height: 60px;
@@ -2583,6 +2587,7 @@
cursor: pointer;
}
.openerp .oe_list_content > tbody > tr {
height: 27px;
border-top: 1px solid #dddddd;
}
.openerp .oe_list_content > tbody > tr > td.oe_list_field_cell {
+9 -5
View File
@@ -36,7 +36,7 @@ $sheet-max-width: 860px
padding: 0
margin: 0
background: none
@include radius(none)
@include radius(0)
@include box-shadow(none)
@mixin vertical-gradient($startColor: #555, $endColor: #333)
@@ -251,6 +251,8 @@ $sheet-max-width: 860px
// Jquery ui Overrides {{{
.ui-widget-content a
color: $link-color
.oe_bounce_container
display: inline-block
// Modal box
&.ui-dialog
@@ -1909,6 +1911,8 @@ $sheet-max-width: 860px
background-color: #d2d2ff
td.oe_readonly
background-color: #eee
$row-height: 27px
.oe_list_editable
.oe_list_content
td.oe_list_field_cell
@@ -1923,12 +1927,11 @@ $sheet-max-width: 860px
display: none
.oe_form_field
input
height: 27px
height: $row-height
input, textarea
@include radius(0)
border: 1px solid #aaf
border-radius: 0px
margin: 0px
-webkit-border-radius: 0px
margin: 0
textarea
height: 60px
&.oe_form_field_float,&.oe_form_view_integer
@@ -2013,6 +2016,7 @@ $sheet-max-width: 860px
> tbody
cursor: pointer
> tr
height: $row-height
border-top: 1px solid #ddd
> td.oe_list_field_cell
padding: 3px 6px
+6 -1
View File
@@ -1995,7 +1995,7 @@ instance.web.list.Column = instance.web.Class.extend({
if (!(aggregation_func in this)) {
return {};
}
var C = function (label, fn) {
var C = function (fn, label) {
this['function'] = fn;
this.label = label;
};
@@ -2115,6 +2115,11 @@ instance.web.list.ProgressBar = instance.web.list.Column.extend({
}
});
instance.web.list.Handle = instance.web.list.Column.extend({
init: function () {
this._super.apply(this, arguments);
// Handle overrides the field to not be form-editable.
this.modifiers.readonly = true;
},
/**
* Return styling hooks for a drag handle
*
+18 -9
View File
@@ -55,6 +55,12 @@ openerp.web.list_editable = function (instance) {
instance.web.bus.off('resize', this, this.resize_fields);
this._super();
},
do_hide: function () {
if (this.editor.is_editing()) {
this.cancel_edition(true);
}
this._super();
},
/**
* Handles the activation of a record in editable mode (making a record
* editable), called *after* the record has become editable.
@@ -249,7 +255,7 @@ openerp.web.list_editable = function (instance) {
var position = $cell.position();
// jquery does not understand !important
field.$el.attr('style', 'width: '+$cell.outerWidth()+'px !important')
field.$el.attr('style', 'width: '+$cell.outerWidth()+'px !important');
field.$el.css({
top: position.top,
left: position.left,
@@ -354,14 +360,17 @@ openerp.web.list_editable = function (instance) {
'class': 'oe_form_container',
version: '7.0'
});
_(view.arch.children).each(function (widget) {
var modifiers = JSON.parse(widget.attrs.modifiers || '{}');
widget.attrs.nolabel = true;
if (modifiers['tree_invisible'] || widget.tag === 'button') {
modifiers.invisible = true;
}
widget.attrs.modifiers = JSON.stringify(modifiers);
});
_(view.arch.children).chain()
.zip(this.columns)
.each(function (ar) {
var widget = ar[0], column = ar[1];
var modifiers = _.extend({}, column.modifiers);
widget.attrs.nolabel = true;
if (modifiers['tree_invisible'] || widget.tag === 'button') {
modifiers.invisible = true;
}
widget.attrs.modifiers = JSON.stringify(modifiers);
});
return view;
},
handle_onwrite: function (source_record) {
+1 -1
View File
@@ -701,7 +701,7 @@
type="button">Save</button>
</t>
<t t-jquery="a.oe_list_button_import" t-operation="after">
<a href="#" class="oe_bold oe_list_discard">discard</a>
<a href="#" class="oe_bold oe_list_discard">Discard</a>
</t>
</t>
<t t-extend="ListView.row">
@@ -42,6 +42,15 @@ instance.web_kanban.KanbanView = instance.web.View.extend({
this.limit = options.limit || 80;
this.add_group_mutex = new $.Mutex();
},
start: function() {
var self = this;
this._super.apply(this, arguments);
this.$el.on('click', '.oe_kanban_dummy_cell', function() {
if (self.$buttons) {
self.$buttons.find('.oe_kanban_add_column').effect('bounce', {distance: 18, times: 5}, 150);
}
});
},
destroy: function() {
this._super.apply(this, arguments);
$('html').off('click.kanban');
@@ -20,7 +20,9 @@
</button>
<span class="oe_alternative" style="display: none">
<span class="oe_fade">or</span>
<a href="#" class="oe_bold oe_kanban_add_column">Add a new column</a>
<div class="oe_bounce_container">
<a href="#" class="oe_bold oe_kanban_add_column">Add a new column</a>
</div>
</span>
</t>
</t>