Skip to content

Commit

Permalink
[MERGE] forward port of branch saas-3 up to revid 3997 dle@openerp.co…
Browse files Browse the repository at this point in the history
…m-20140409093616-3060or02z8zmv8tm

bzr revid: chs@openerp.com-20140410105525-m68vejubszroawfm
  • Loading branch information
KangOl committed Apr 10, 2014
2 parents 15680c9 + f6a6394 commit e521085
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
1 change: 0 additions & 1 deletion addons/web/static/src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,6 @@
}
.openerp .oe_hidden_input_file {
position: relative;
overflow-x: hidden;
}
.openerp .oe_hidden_input_file input.oe_form_binary_file {
z-index: 0;
Expand Down
1 change: 0 additions & 1 deletion addons/web/static/src/css/base.sass
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,6 @@ $sheet-padding: 16px
// Position: relative is used for the hidden input[type=file]
// Do not remove it anymore !
position: relative
overflow-x: hidden
input.oe_form_binary_file
z-index: 0
line-height: 0
Expand Down
12 changes: 8 additions & 4 deletions addons/web/static/src/js/view_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -4363,7 +4363,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
if (data.id) {
self.add_id(data.id);
} else {
ignore_blur = true;
self.ignore_blur = true;
data.action();
}
this.trigger('setSuggestions', {result : []});
Expand Down Expand Up @@ -4403,7 +4403,7 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
if (this.get("effective_readonly"))
return;
var self = this;
var ignore_blur = false;
self.ignore_blur = false;
self.$text = this.$("textarea");
self.$text.textext(self.initialize_texttext()).bind('getSuggestions', function(e, data) {
var _this = this;
Expand All @@ -4423,11 +4423,11 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
self.$text
.focusin(function () {
self.trigger('focused');
ignore_blur = false;
self.ignore_blur = false;
})
.focusout(function() {
self.$text.trigger("setInputData", "");
if (!ignore_blur) {
if (!self.ignore_blur) {
self.trigger('blurred');
}
}).keydown(function(e) {
Expand Down Expand Up @@ -4505,6 +4505,10 @@ instance.web.form.FieldMany2ManyTags = instance.web.form.AbstractField.extend(in
width: width,
minHeight: height
});
},
_search_create_popup: function() {
self.ignore_blur = true;
return instance.web.form.CompletionFieldMixin._search_create_popup.apply(this, arguments);
},
});

Expand Down
11 changes: 10 additions & 1 deletion addons/web/static/src/js/view_list_editable.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,19 @@
* as an editable row at the top or bottom of the list)
*/
do_add_record: function () {
var self = this;
if (this.editable()) {
this.$el.find('table:first').show();
this.$el.find('.oe_view_nocontent').remove();
this.start_edition();
this.start_edition().then(function(){
var fields = self.editor.form.fields;
self.editor.form.fields_order.some(function(field){
if (fields[field].$el.is(':visible')){
fields[field].$el.find("input").select();
return true;
}
});
});
} else {
this._super();
}
Expand Down
1 change: 1 addition & 0 deletions addons/web/static/src/xml/base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,7 @@
<td>
<t t-call="HiddenInputFile">
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
<t t-set="fileupload_style" t-translation="off">overflow-x: hidden</t>
<button class="oe_button oe_field_button" type="button">
<img t-att-src='_s + "/web/static/src/img/icons/STOCK_DIRECTORY.png"'/>
<span>Select</span>
Expand Down

0 comments on commit e521085

Please sign in to comment.