[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13114]
From: |
Nelson Guerra |
Subject: |
[Fmsystem-commits] [13114] |
Date: |
Wed, 29 Apr 2015 22:02:55 +0000 |
Revision: 13114
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13114
Author: nelson224
Date: 2015-04-29 22:02:54 +0000 (Wed, 29 Apr 2015)
Log Message:
-----------
Modified Paths:
--------------
branches/dev-syncromind/property/inc/class.uiinvoice.inc.php
Modified: branches/dev-syncromind/property/inc/class.uiinvoice.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiinvoice.inc.php
2015-04-29 22:02:36 UTC (rev 13113)
+++ branches/dev-syncromind/property/inc/class.uiinvoice.inc.php
2015-04-29 22:02:54 UTC (rev 13114)
@@ -767,7 +767,7 @@
$GLOBALS['phpgw']->js->add_code('', $jscode,
true);
- $columns = array (
+ $inputFilters = array (
array('id'=>'workorder_id',
'label'=>lang('Workorder ID'), 'type'=>'text'),
array('id'=>'', 'label'=>"<a href=\"#\"
onClick=\"JqueryPortico.openPopup({menuaction:'property.uilookup.vendor'})\">".lang('Vendor')."</a>",
'type' => 'link'),
array('id'=>'vendor_id',
'label'=>lang('Vendor'), 'type'=>'text'),
@@ -779,18 +779,18 @@
array('id'=>'voucher_id',
'label'=>lang('Voucher ID'), 'type'=>'text')
);
- $code = "var columns = ".json_encode($columns);
+ $code = "var inputFilters =
".json_encode($inputFilters);
$code .= <<<JS
function initCompleteDatatable(oSettings, json,
oTable)
{
$('#datatable-container_filter').empty();
- $.each(columns, function(i, val)
+ $.each(inputFilters, function(i, val)
{
if (val['type'] == 'text')
{
-
$('#datatable-container_filter').append('<input type="text" placeholder="Search
'+val['label']+'" id="'+val['id']+'" name="'+val['id']+'" />');
+
$('#datatable-container_filter').append('<input type="text"
placeholder="'+val['label']+'" id="'+val['id']+'" name="'+val['id']+'" />');
}
else if (val['type'] ==
'hidden')
{
@@ -801,22 +801,30 @@
}
});
- // Apply the search
- var api = oTable.api();
+ var valuesInputFilter = {};
- $.each(columns, function(i, val)
+ $.each(inputFilters, function(i, val)
{
- $( '#' + val['id']).on( 'keyup
change', function ()
+ if (val['type'] == 'text')
{
- if (val['type'] ==
'text')
+
valuesInputFilter[val['id']] = '';
+ $( '#' + val['id']).on(
'keyup change', function ()
{
-
oTable.dataTableSettings[0]['ajax']['data'][val['id']] = this.value;
- oTable.fnDraw();
- }
- });
+ if (
$.trim($(this).val()) != $.trim(valuesInputFilter[val['id']]) )
+ {
+
filterData(val['id'], $(this).val());
+
valuesInputFilter[val['id']] = $(this).val();
+ }
+ });
+ }
});
};
-
+
+ function afterPopupClose()
+ {
+ $('#loc1').change();
+ $('#vendor_id').change();
+ };
JS;
$GLOBALS['phpgw']->js->add_code('', $code, true);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13114],
Nelson Guerra <=