[FIX] point_of_sale: fixing various issues with the list selection and password popup

This commit is contained in:
Frédéric van der Essen
2015-04-10 17:53:53 +02:00
parent 9041d6e0ff
commit 9fe4457c43
2 changed files with 3 additions and 10 deletions
+1 -1
View File
@@ -226,7 +226,7 @@ openerp.point_of_sale.load_gui = function load_gui(instance, module) {
var self = this;
var ret = new $.Deferred();
if (password) {
this.gui.show_popup('password',{
this.show_popup('password',{
'title': _t('Password ?'),
confirm: function(pw) {
if (pw !== password) {
+2 -9
View File
@@ -140,20 +140,13 @@ openerp.point_of_sale.load_popups = function load_popups(instance, module) {
this.list = options.list || [];
this.renderElement();
this.$('.selection-item').click(function(){
if (options.confirm) {
var item = self.list[parseInt($(this).data('item-index'))];
item = item ? item.item : item;
options.confirm.call(self,item);
}
});
},
click_item : function(event) {
this.gui.close_popup();
if (this.options.confirm) {
var item = this.list[parseInt($(event.target).data('item-index'))];
item = item ? item.item : item;
this.options.confirm.call(self,item);
}
}
});
@@ -194,7 +187,7 @@ openerp.point_of_sale.load_popups = function load_popups(instance, module) {
var self = this;
this._super(options);
this.inputbuffer = '' + options.value || '';
this.inputbuffer = '' + (options.value || '');
this.renderElement();
this.firstinput = true;
},