fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16152] more on rental


From: sigurdne
Subject: [Fmsystem-commits] [16152] more on rental
Date: Wed, 11 Jan 2017 14:04:25 -0500 (EST)

Revision: 16152
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16152
Author:   sigurdne
Date:     2017-01-11 14:04:25 -0500 (Wed, 11 Jan 2017)
Log Message:
-----------
more on rental

Added Paths:
-----------
    trunk/rental/js/rental/email_out.edit.js

Added: trunk/rental/js/rental/email_out.edit.js
===================================================================
--- trunk/rental/js/rental/email_out.edit.js                            (rev 0)
+++ trunk/rental/js/rental/email_out.edit.js    2017-01-11 19:04:25 UTC (rev 
16152)
@@ -0,0 +1,87 @@
+var oArgs = {
+       menuaction: 'rental.uicomposite.index',
+       type: 'all_composites',
+       furnished_status: 4,
+       has_contract: 'has_contract',
+       is_active: 'active'
+};
+var strURL = phpGWLink('index.php', oArgs, true);
+JqueryPortico.autocompleteHelper(strURL, 'composite_name', 'composite_id', 
'composite_container', 'name');
+
+$(window).on('load', function ()
+{
+       composite_id = $('#composite_id').val();
+       if (composite_id)
+       {
+               composite_id_selection = composite_id;
+       }
+       $("#composite_name").on("autocompleteselect", function (event, ui)
+       {
+               var composite_id = ui.item.value;
+//             if (composite_id != composite_id_selection)
+//             {
+               populateCandidates('composite', composite_id);
+//             }
+       });
+});
+
+function populateCandidates(type, composite_id)
+{
+       composite_id = composite_id || $('#composite_id').val();
+
+       if (!composite_id)
+       {
+               return;
+       }
+
+       oArgs = {
+               menuaction: 'rental.uiemail_out.get_candidates',
+               type: type,
+               id: composite_id
+       };
+
+       var requestUrl = phpGWLink('index.php', oArgs, true);
+       JqueryPortico.updateinlineTableHelper(oTable1, requestUrl);
+
+}
+
+this.onActionsClick_candidates = function (type, ids)
+{
+//             console.log(ids);
+       oArgs = {
+               menuaction: 'rental.uiemail_out.set_candidates',
+               id: $('#id').val()
+       };
+
+       var requestUrl = phpGWLink('index.php', oArgs, true);
+
+       $.ajax({
+               type: 'POST',
+               dataType: 'json',
+               url: requestUrl,
+               data: {ids: ids, type: type},
+               success: function (data)
+               {
+                       if (data != null)
+                       {
+
+                       }
+                       oArgs = {
+                               menuaction: 'rental.uiemail_out.get_recipients',
+                               id: $('#id').val()
+                       };
+
+                       var requestUrl = phpGWLink('index.php', oArgs, true);
+                       JqueryPortico.updateinlineTableHelper(oTable2, 
requestUrl);
+                       oArgs = {
+                               menuaction: 'rental.uiemail_out.get_candidates',
+                               type: 'dummy',
+                               id: 0
+                       };
+
+                       var requestUrl = phpGWLink('index.php', oArgs, true);
+                       JqueryPortico.updateinlineTableHelper(oTable1, 
requestUrl);
+               }
+       });
+
+}




reply via email to

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