fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [13760]


From: Nelson Guerra
Subject: [Fmsystem-commits] [13760]
Date: Sat, 22 Aug 2015 00:22:06 +0000

Revision: 13760
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13760
Author:   nelson224
Date:     2015-08-22 00:22:05 +0000 (Sat, 22 Aug 2015)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind/rental/js/rental/contract.edit.js

Modified: branches/dev-syncromind/rental/js/rental/contract.edit.js
===================================================================
--- branches/dev-syncromind/rental/js/rental/contract.edit.js   2015-08-22 
00:21:34 UTC (rev 13759)
+++ branches/dev-syncromind/rental/js/rental/contract.edit.js   2015-08-22 
00:22:05 UTC (rev 13760)
@@ -407,6 +407,41 @@
        }, data, 'POST', 'JSON');
 };
 
+removeDocument = function(oArgs, parameters){
+    
+       var oTT = TableTools.fnGetInstance( 'datatable-container_8' );
+       var selected = oTT.fnGetSelectedData();
+       var nTable = 8;
+
+       if (selected.length == 0){
+               alert('None selected');
+               return false;
+       }
+
+       var data = {};
+
+       $.each(parameters.parameter, function( i, val ) {
+               data[val.name] = {};
+       });                                                                     
                                                                
+
+       var n = 0;
+       for ( var n = 0; n < selected.length; ++n )
+       {
+               $.each(parameters.parameter, function( i, val ) {
+                       data[val.name][n] = selected[n][val.source];
+               });             
+       }
+
+       var requestUrl = phpGWLink('index.php', oArgs);
+
+       JqueryPortico.execute_ajax(requestUrl, function(result){
+               
+               JqueryPortico.show_message(nTable, result);
+               oTable8.fnDraw();
+
+       }, data, 'POST', 'JSON');
+};
+
 deleteNotification = function(oArgs, parameters){
     
        var oTT = TableTools.fnGetInstance( 'datatable-container_9' );
@@ -439,3 +474,38 @@
 
        }, data, 'POST', 'JSON');
 };
+
+addNotification = function()
+{
+       var nTable = 9;
+       var data = {};
+       
+       if ($.trim($('#notification_message').val()) == '')
+       {
+               alert('enter a message');
+               return;
+       }
+       
+       data['contract_id'] = $('#contract_id').val();
+       data['notification_recurrence'] = $('#notification_recurrence').val();
+       data['notification_message'] = $('#notification_message').val();
+       data['notification_target'] = $('#notification_target').val();
+       data['notification_location'] = $('#notification_location').val();
+       data['date_notification'] = $('#date_notification').val();
+
+       var oArgs = 
{"menuaction":"rental.uicontract.add_notification","phpgw_return_as":"json"};
+       var requestUrl = phpGWLink('index.php', oArgs);
+
+       JqueryPortico.execute_ajax(requestUrl, function(result){
+
+               $('#notification_recurrence')[0].selectedIndex = 0;
+               $('#notification_message').val('');
+               $('#notification_target')[0].selectedIndex = 0;
+               $('#notification_location')[0].selectedIndex = 0;
+               $('#date_notification').val('');
+               
+               JqueryPortico.show_message(nTable, result);
+               oTable9.fnDraw();
+       
+       }, data, 'POST', 'JSON');
+};
\ No newline at end of file




reply via email to

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