diff --git a/addons/account/static/src/css/account_bank_statement_reconciliation.css b/addons/account/static/src/css/account_bank_statement_reconciliation.css index 63b71ade4a5..2c8502c4272 100644 --- a/addons/account/static/src/css/account_bank_statement_reconciliation.css +++ b/addons/account/static/src/css/account_bank_statement_reconciliation.css @@ -25,19 +25,24 @@ padding: 0 0 0 15px; margin: 0 0 25px 0; float: left; - font-size: 2em; } + font-size: 2em; + height: 1.5em; } + .openerp .oe_bank_statement_reconciliation .statement_name span { + line-height: 1.5em; + cursor: pointer; } .openerp .oe_bank_statement_reconciliation .change_statement_name_container { - display: none; } + display: none; + width: 95%; } .openerp .oe_bank_statement_reconciliation .change_statement_name_container td:first-child, .openerp .oe_bank_statement_reconciliation .change_statement_name_container td:first-child > input { width: 99%; } .openerp .oe_bank_statement_reconciliation .change_statement_name_container td:last-child { width: 1%; - padding-left: 5px; } + padding-left: 3px; } .openerp .oe_bank_statement_reconciliation h2 { font-size: 1.8em; } .openerp .oe_bank_statement_reconciliation .progress { width: 49%; - margin: 4px 15px 0 0; + margin: 10px 15px 0 0; float: right; position: relative; display: inline-block; } @@ -130,6 +135,13 @@ -ms-transform: rotate(90deg); -o-transform: rotate(90deg); transform: rotate(90deg); } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name .remove_partner { + display: none; + cursor: pointer; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name .remove_partner .glyphicon { + margin: 0 5px; } + .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .partner_name:hover .remove_partner { + display: inline; } .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .change_partner_container { width: 200px; display: none; @@ -223,8 +235,7 @@ position: relative; top: 7px; /* meh */ - font-weight: bold; - cursor: pointer; } + font-weight: bold; } .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .accounting_view td.cell_credit { border-left: 1px solid #000; } .openerp .oe_bank_statement_reconciliation .oe_bank_statement_reconciliation_line .match .match_controls { diff --git a/addons/account/static/src/css/account_bank_statement_reconciliation.scss b/addons/account/static/src/css/account_bank_statement_reconciliation.scss index b35d416addc..e0ed85311a1 100644 --- a/addons/account/static/src/css/account_bank_statement_reconciliation.scss +++ b/addons/account/static/src/css/account_bank_statement_reconciliation.scss @@ -41,17 +41,24 @@ $aestetic_animation_speed: 300ms; margin: 0 0 25px 0; float: left; font-size: 2em; + height: 1.5em; + } + + .statement_name span { + line-height: 1.5em; + cursor: pointer; } .change_statement_name_container { display: none; + width: 95%; td:first-child, td:first-child > input { width: 99%; } td:last-child { width: 1%; - padding-left: 5px; + padding-left: 3px; } } @@ -61,7 +68,7 @@ $aestetic_animation_speed: 300ms; .progress { width: 49%; - margin: 4px $actionColWidth 0 0; + margin: 10px $actionColWidth 0 0; float: right; position: relative; display: inline-block; @@ -189,6 +196,20 @@ $aestetic_animation_speed: 300ms; transform: rotate(90deg); } + .partner_name { + .remove_partner { + display: none; + cursor: pointer; + + .glyphicon { + margin: 0 5px; + } + } + &:hover .remove_partner { + display: inline; + } + } + .change_partner_container { width: 200px; display: none; @@ -367,7 +388,6 @@ $aestetic_animation_speed: 300ms; > span, > input { position: relative; top: 7px; /* meh */ font-weight: bold; - cursor: pointer; } } diff --git a/addons/account/static/src/js/account_widgets.js b/addons/account/static/src/js/account_widgets.js index d92b46c3ef8..411ed3f314a 100644 --- a/addons/account/static/src/js/account_widgets.js +++ b/addons/account/static/src/js/account_widgets.js @@ -250,13 +250,20 @@ openerp.account = function (instance) { this.$(".statement_name span").hide(); this.$(".change_statement_name_field").attr("value", this.title); this.$(".change_statement_name_container").show(); + this.$(".change_statement_name_field").focus(); }, changeStatementNameFieldHandler: function(e) { var name = this.$(".change_statement_name_field").val(); if (name === "") this.$(".change_statement_name_button").attr("disabled", "disabled"); else this.$(".change_statement_name_button").removeAttr("disabled"); - if (name !== "" && e.which === 13) this.$(".change_statement_name_button").trigger("click"); + + if (name !== "" && e.which === 13) // Enter + this.$(".change_statement_name_button").trigger("click"); + if (e.which === 27) { // Escape + this.$(".statement_name span").show(); + this.$(".change_statement_name_container").hide(); + } }, changeStatementButtonClickHandler: function() { @@ -493,7 +500,7 @@ openerp.account = function (instance) { className: 'oe_bank_statement_reconciliation_line', events: { - "click .partner_name": "partnerNameClickHandler", + "click .remove_partner": "removePartnerClickHandler", "click .button_ok": "persistAndDestroy", "click .mv_line": "moveLineClickHandler", "click .initial_line": "initialLineClickHandler", @@ -1064,15 +1071,13 @@ openerp.account = function (instance) { } }, - partnerNameClickHandler: function() { + removePartnerClickHandler: function() { var self = this; // Delete statement line's partner - if (window.confirm(_t("Reset the statement line's partner ?"))) { - return self.changePartner('', function() { - self.$(".partner_name").hide(); - self.$(".change_partner_container").show(); - }); - } + return self.changePartner('', function() { + self.$(".partner_name").hide(); + self.$(".change_partner_container").show(); + }); }, diff --git a/addons/account/static/src/xml/account_bank_statement_reconciliation.xml b/addons/account/static/src/xml/account_bank_statement_reconciliation.xml index c86414a99ba..869acdf08c6 100644 --- a/addons/account/static/src/xml/account_bank_statement_reconciliation.xml +++ b/addons/account/static/src/xml/account_bank_statement_reconciliation.xml @@ -64,7 +64,10 @@