[IMP] highlight toggling between validation and import buttons
bzr revid: xmo@openerp.com-20121003121619-e6nbd78mfa5owycp
This commit is contained in:
@@ -325,8 +325,10 @@ openerp.base_import = function (instance) {
|
||||
});
|
||||
},
|
||||
render_import_result: function (message) {
|
||||
if (_.isEmpty(message)) {
|
||||
this.$('.oe_import_import').addClass('oe_highlight');
|
||||
var no_messages = _.isEmpty(message);
|
||||
this.$('.oe_import_import').toggleClass('oe_highlight', no_messages);
|
||||
this.$('.oe_import_validate').toggleClass('oe_highlight', !no_messages);
|
||||
if (no_messages) {
|
||||
message.push({
|
||||
type: 'info',
|
||||
message: _t("Everything seems valid.")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<form action="" method="post" enctype="multipart/form-data" class="oe_import">
|
||||
<header>
|
||||
<button type="button" disabled="disabled"
|
||||
class="oe_button oe_import_button oe_import_validate"
|
||||
class="oe_button oe_import_button oe_import_validate oe_highlight"
|
||||
>Validate</button>
|
||||
<button type="button" disabled="disabled"
|
||||
class="oe_button oe_import_button oe_import_import"
|
||||
|
||||
Reference in New Issue
Block a user