fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [13943]


From: Nelson Guerra
Subject: [Fmsystem-commits] [13943]
Date: Wed, 16 Sep 2015 22:29:36 +0000

Revision: 13943
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13943
Author:   nelson224
Date:     2015-09-16 22:29:36 +0000 (Wed, 16 Sep 2015)
Log Message:
-----------


Added Paths:
-----------
    branches/dev-syncromind/rental/js/rental/composite.view.js

Copied: branches/dev-syncromind/rental/js/rental/composite.view.js (from rev 
13937, branches/dev-syncromind/rental/js/rental/composite.edit.js)
===================================================================
--- branches/dev-syncromind/rental/js/rental/composite.view.js                  
        (rev 0)
+++ branches/dev-syncromind/rental/js/rental/composite.view.js  2015-09-16 
22:29:36 UTC (rev 13943)
@@ -0,0 +1,73 @@
+
+       $(document).ready(function () 
+       {
+               $('#contracts_search_option').change( function() 
+               {
+                       filterDataContracts('search_option', $(this).val());
+               });
+               
+               var previous_contract_query = '';
+               $('#contracts_query').on( 'keyup change', function () 
+               {
+                       if ( $.trim($(this).val()) != 
$.trim(previous_contract_query) ) 
+                       {
+                               filterDataContracts('search', {'value': 
$(this).val()});
+                               previous_contract_query = $(this).val();
+                       }
+               });
+               
+               $('#contract_status').change( function() 
+               {
+                       filterDataContracts('contract_status', $(this).val());
+               });
+               
+               var previous_status_date;
+               $("#status_date").on('keyup change', function ()
+               {
+                       if ( $.trim($(this).val()) != 
$.trim(previous_status_date) ) 
+                       {
+                               filterDataContracts('status_date', 
$(this).val());
+                               previous_status_date = $(this).val();
+                       }
+               });
+       
+               $('#contract_type').change( function() 
+               {
+                       filterDataContracts('contract_type', $(this).val());
+               });
+       });
+       
+       function filterDataContracts(param, value)
+       {
+               oTable1.dataTableSettings[1]['ajax']['data'][param] = value;
+               oTable1.fnDraw();
+       }
+       
+       function formatterArea (key, oData) 
+       {
+               var amount = $.number( oData[key], decimalPlaces, 
decimalSeparator, thousandsSeparator ) + ' ' + area_suffix;
+               return amount;
+       }
+       
+       function formatterPrice (key, oData) 
+       {
+               var amount = $.number( oData[key], decimalPlaces, 
decimalSeparator, thousandsSeparator ) + ' ' + currency_suffix;
+               return amount;
+       }
+       
+       downloadContracts = function(oArgs){
+
+               if(!confirm("This will take some time..."))
+               {
+                       return false;
+               }
+               
+               oArgs['search_option'] = $('#contracts_search_options').val();
+               oArgs['search'] = $('#contracts_query').val();
+               oArgs['contract_type'] = $('#contract_type').val();
+               oArgs['contract_status'] = $('#contract_status').val();
+
+               var requestUrl = phpGWLink('index.php', oArgs);
+
+               window.open(requestUrl,'_self');
+       };
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]