summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2015-08-25 09:59:45 +0200
committerAaron Bohy <aab@odoo.com>2015-09-01 20:05:20 +0200
commit23f0c49bbeed80d17699200a98abc14c29fc3677 (patch)
treec768fd99f74b23a5d3252d70d119de07fb837fab /addons/web/static/src
parent4989033fe0495b74d57050de96b680a46d139649 (diff)
[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)
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/css/base.css14
-rw-r--r--addons/web/static/src/css/base.sass12
-rw-r--r--addons/web/static/src/js/views/form_relational_widgets.js6
-rw-r--r--addons/web/static/src/js/views/form_widgets.js14
-rw-r--r--addons/web/static/src/js/widgets/sidebar.js4
-rw-r--r--addons/web/static/src/xml/base.xml6
6 files changed, 28 insertions, 28 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css
index 3d185be00da..cf0043ad8a2 100644
--- a/addons/web/static/src/css/base.css
+++ b/addons/web/static/src/css/base.css
@@ -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 {
diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass
index 3776630c3f6..5c3a0e5bd69 100644
--- a/addons/web/static/src/css/base.sass
+++ b/addons/web/static/src/css/base.sass
@@ -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
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js
index b5cd0e723ef..5085b284689 100644
--- a/addons/web/static/src/js/views/form_relational_widgets.js
+++ b/addons/web/static/src/js/views/form_relational_widgets.js
@@ -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] = {
diff --git a/addons/web/static/src/js/views/form_widgets.js b/addons/web/static/src/js/views/form_widgets.js
index 54c57c6fd8c..69731122f61 100644
--- a/addons/web/static/src/js/views/form_widgets.js
+++ b/addons/web/static/src/js/views/form_widgets.js
@@ -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();
diff --git a/addons/web/static/src/js/widgets/sidebar.js b/addons/web/static/src/js/widgets/sidebar.js
index 90ec1024d7c..bdb74703934 100644
--- a/addons/web/static/src/js/widgets/sidebar.js
+++ b/addons/web/static/src/js/widgets/sidebar.js
@@ -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...'));
diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml
index 15b47d29a68..6647851f13e 100644
--- a/addons/web/static/src/xml/base.xml
+++ b/addons/web/static/src/xml/base.xml
@@ -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>