summaryrefslogtreecommitdiff
path: root/addons/payment/static
diff options
context:
space:
mode:
authorjpr-odoo <jpr@openerp.com>2017-09-19 16:47:50 +0530
committerThibault Delavallée <tde@odoo.com>2017-11-14 17:00:42 +0100
commitfb7e1ed2384c19830451ab9a421d29df8e5435d0 (patch)
treea4235856b46e6f337724f18f73034ebba9d34e07 /addons/payment/static
parent4d5d228b15a0c183d58f3505dbedb9d0e185dacc (diff)
[FIX] payment: correctly display additional payment icons when clicking on "and more" in payment form
Instead of being redirected to the top of the page. Which is probably not good uzabilitiouaïze.
Diffstat (limited to 'addons/payment/static')
-rw-r--r--addons/payment/static/src/js/payment_form.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js
index 74b098c3d72..bdac673f67e 100644
--- a/addons/payment/static/src/js/payment_form.js
+++ b/addons/payment/static/src/js/payment_form.js
@@ -14,7 +14,8 @@ odoo.define('payment.payment_form', function (require) {
'click #o_payment_form_pay': 'payEvent',
'click #o_payment_form_add_pm': 'addPmEvent',
'click button[name="delete_pm"]': 'deletePmEvent',
- 'click input[type="radio"]': 'radioClickEvent'
+ 'click input[type="radio"]': 'radioClickEvent',
+ 'click .o_payment_form_pay_icon_more': 'onClickMorePaymentIcon',
},
init: function(parent, options) {
@@ -337,6 +338,16 @@ odoo.define('payment.payment_form', function (require) {
);
});
},
+
+ // event handler when clicking on 'and more' to show more payment icon
+ onClickMorePaymentIcon: function (ev) {
+ ev.preventDefault();
+ var $listItems = $(ev.currentTarget).parents('ul').children('li');
+ var $moreItem = $(ev.currentTarget).parents('li');
+ $listItems.removeClass('hidden');
+ $moreItem.addClass('hidden');
+ },
+
// event handler when clicking on a radio button
radioClickEvent: function (ev) {
this.updateNewPaymentDisplayStatus();