[REF] web: backport some classnames renaming

oe_form_binary_form -> o_form_binary_form
oe_form_binary_file -> o_form_input_file

Required for new design compatibility (classnames accessed in addon mail)
This commit is contained in:
Aaron Bohy
2015-09-01 20:05:20 +02:00
parent 4989033fe0
commit 23f0c49bbe
6 changed files with 28 additions and 28 deletions
+7 -7
View File
@@ -905,16 +905,16 @@
display: inline-block;
float: right;
}
.openerp .oe-control-panel .oe-cp-sidebar .oe_form_binary_form {
.openerp .oe-control-panel .oe-cp-sidebar .o_form_binary_form {
cursor: pointer;
}
.openerp .oe-control-panel .oe-cp-sidebar .oe_form_binary_form span {
.openerp .oe-control-panel .oe-cp-sidebar .o_form_binary_form span {
padding: 3px 20px;
}
.openerp .oe-control-panel .oe-cp-sidebar .oe_form_binary_form input.oe_form_binary_file {
.openerp .oe-control-panel .oe-cp-sidebar .o_form_binary_form input.o_form_input_file {
width: 100%;
}
.openerp .oe-control-panel .oe-cp-sidebar .oe_form_binary_form:hover {
.openerp .oe-control-panel .oe-cp-sidebar .o_form_binary_form:hover {
background-color: #f5f5f5;
}
.openerp .oe-control-panel .oe-cp-sidebar .oe_file_attachment {
@@ -1780,7 +1780,7 @@
.openerp .oe_hidden_input_file {
position: relative;
}
.openerp .oe_hidden_input_file input.oe_form_binary_file {
.openerp .oe_hidden_input_file input.o_form_input_file {
z-index: 0;
line-height: 0;
font-size: 12px;
@@ -1861,7 +1861,7 @@
position: relative;
font-size: 18px;
}
.openerp .oe_fileupload .oe_add input.oe_form_binary_file {
.openerp .oe_fileupload .oe_add input.o_form_input_file {
display: inline-block;
margin-left: -85px;
height: 22px;
@@ -2689,7 +2689,7 @@ body.oe_single_form .oe_single_form_container {
color: #afafb6 !important;
font-style: italic !important;
}
.openerp_ie .oe_form_binary_file {
.openerp_ie .o_form_input_file {
width: 80px;
}
.openerp_ie .oe_form_field_boolean input {
+6 -6
View File
@@ -848,14 +848,14 @@ $sheet-padding: 16px
.oe-cp-sidebar
display: inline-block
float: right
.oe_form_binary_form
.o_form_binary_form
cursor: pointer
span
padding: 3px 20px
input.oe_form_binary_file
input.o_form_input_file
width: 100%
.oe_form_binary_form:hover
.o_form_binary_form:hover
background-color: #f5f5f5
.oe_file_attachment
padding: 3px 20px
@@ -1572,7 +1572,7 @@ $sheet-padding: 16px
// Position: relative is used for the hidden input[type=file]
// Do not remove it anymore !
position: relative
input.oe_form_binary_file
input.o_form_input_file
z-index: 0
line-height: 0
font-size: 12px
@@ -1638,7 +1638,7 @@ $sheet-padding: 16px
.fa
position: relative
font-size: 18px
input.oe_form_binary_file
input.o_form_input_file
display: inline-block
margin-left: -85px
height: 22px
@@ -2301,7 +2301,7 @@ body.oe_single_form
.placeholder
color: $tag-border !important
font-style: italic !important
.oe_form_binary_file
.o_form_input_file
width: 80px
.oe_form_field_boolean input
background: #fff
@@ -1460,7 +1460,7 @@ var FieldMany2ManyBinaryMultiFiles = AbstractManyField.extend(common.Reinitializ
$(window).on(this.fileupload_id, _.bind(this.on_file_loaded, this));
},
initialize_content: function() {
this.$el.on('change', 'input.oe_form_binary_file', this.on_file_change );
this.$el.on('change', 'input.o_form_input_file', this.on_file_change );
},
get_file_url: function (attachment) {
return '/web/content/' + attachment.id + '?download=true';
@@ -1492,7 +1492,7 @@ var FieldMany2ManyBinaryMultiFiles = AbstractManyField.extend(common.Reinitializ
self.$('.oe_placeholder_files, .oe_attachments').replaceWith( render );
// reinit input type file
var $input = self.$('input.oe_form_binary_file');
var $input = self.$('input.o_form_input_file');
$input.after($input.clone(true)).remove();
self.$(".oe_fileupload").show();
@@ -1530,7 +1530,7 @@ var FieldMany2ManyBinaryMultiFiles = AbstractManyField.extend(common.Reinitializ
// TODO : unactivate send on wizard and form
// submit file
this.$('form.oe_form_binary_form').submit();
this.$('form.o_form_binary_form').submit();
this.$(".oe_fileupload").hide();
// add file on data result
this.data[0] = {
@@ -1134,11 +1134,11 @@ var FieldBinary = common.AbstractField.extend(common.ReinitializeFieldMixin, {
},
initialize_content: function() {
var self= this;
this.$el.find('input.oe_form_binary_file').change(this.on_file_change);
this.$el.find('button.oe_form_binary_file_save').click(this.on_save_as);
this.$el.find('.oe_form_binary_file_clear').click(this.on_clear);
this.$el.find('.oe_form_binary_file_edit').click(function(event){
self.$el.find('input.oe_form_binary_file').click();
this.$('input.o_form_input_file').change(this.on_file_change);
this.$('button.oe_form_binary_file_save').click(this.on_save_as);
this.$('.oe_form_binary_file_clear').click(this.on_clear);
this.$('.oe_form_binary_file_edit').click(function() {
self.$('input.o_form_input_file').click();
});
},
on_file_change: function(e) {
@@ -1160,8 +1160,8 @@ var FieldBinary = common.AbstractField.extend(common.ReinitializeFieldMixin, {
self.on_file_uploaded(file.size, file.name, file.type, data);
};
} else {
this.$el.find('form.oe_form_binary_form input[name=session_id]').val(this.session.session_id);
this.$el.find('form.oe_form_binary_form').submit();
this.$el.find('form.o_form_binary_form input[name=session_id]').val(this.session.session_id);
this.$el.find('form.o_form_binary_form').submit();
}
this.$el.find('.oe_form_binary_progress').show();
this.$el.find('.oe_form_binary').hide();
+2 -2
View File
@@ -184,13 +184,13 @@ var Sidebar = Widget.extend({
});
this.items.files = attachments;
this.redraw();
this.$('.oe_sidebar_add_attachment .oe_form_binary_file').change(this.on_attachment_changed);
this.$('.oe_sidebar_add_attachment .o_form_input_file').change(this.on_attachment_changed);
this.$el.find('.oe_sidebar_delete_item').click(this.on_attachment_delete);
},
on_attachment_changed: function(e) {
var $e = $(e.target);
if ($e.val() !== '') {
this.$el.find('form.oe_form_binary_form').submit();
this.$el.find('form.o_form_binary_form').submit();
$e.parent().find('input[type=file]').prop('disabled', true);
$e.parent().find('button').prop('disabled', true).find('img, span').toggle();
this.$('.oe_sidebar_add_attachment a').text(_t('Uploading...'));
+3 -3
View File
@@ -994,13 +994,13 @@
</t>
<t t-name="HiddenInputFile">
<div t-attf-class="oe_hidden_input_file #{fileupload_class or ''}" t-att-style="fileupload_style">
<form class="oe_form_binary_form" t-att-target="fileupload_id"
<form class="o_form_binary_form" t-att-target="fileupload_id"
method="post" enctype="multipart/form-data" t-att-action="fileupload_action || '/web/binary/upload'">
<input type="hidden" name="session_id" value="" t-if="widget.session.override_session"/>
<input type="hidden" name="callback" t-att-value="fileupload_id"/>
<t t-raw="0"/>
<input type="file" class="oe_form_binary_file" name="ufile" t-if="widget.widget!='image'"/>
<input type="file" class="oe_form_binary_file" name="ufile" accept="image/*" t-if="widget.widget=='image'"/>
<input type="file" class="o_form_input_file" name="ufile" t-if="widget.widget!='image'"/>
<input type="file" class="o_form_input_file" name="ufile" accept="image/*" t-if="widget.widget=='image'"/>
</form>
<iframe t-att-id="fileupload_id" t-att-name="fileupload_id" style="display: none"/>
</div>