From 5d22e41fe24989a05c2dfdb54a36bbe6ed53c172 Mon Sep 17 00:00:00 2001 From: jekkos Date: Tue, 20 Jun 2017 22:39:32 +0200 Subject: [PATCH] Fix refresh on focusout (#1351, #1328) --- application/core/MY_Lang.php | 2 +- application/views/receivings/receiving.php | 2 +- application/views/sales/register.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/core/MY_Lang.php b/application/core/MY_Lang.php index 32c5b94c9..5b82d84b0 100644 --- a/application/core/MY_Lang.php +++ b/application/core/MY_Lang.php @@ -53,7 +53,7 @@ class MY_Lang extends CI_Lang } else { - if(!empty($this->language[$line] || strstr($line, 'common_you_are_using'))) + if(isset($this->language[$line]) && $this->language[$line] != '') { $line = $this->language[$line]; //if the line exists and more function arguments remain diff --git a/application/views/receivings/receiving.php b/application/views/receivings/receiving.php index d11d08115..ade9424a0 100644 --- a/application/views/receivings/receiving.php +++ b/application/views/receivings/receiving.php @@ -517,7 +517,7 @@ $(document).ready(function() } } - $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').focusout(function() { + $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').change(function() { var index = $(this).parents("tr").index() - 1; $("#cart_" + index).submit(); }); diff --git a/application/views/sales/register.php b/application/views/sales/register.php index 3714bd81d..8a6e1dfad 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -770,7 +770,7 @@ $(document).ready(function() } } - $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').focusout(function() { + $('[name="price"],[name="quantity"],[name="discount"],[name="description"],[name="serialnumber"]').change(function() { $(this).parents("tr").prevAll("form:first").submit() });