fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15389]


From: nelson . guerra
Subject: [Fmsystem-commits] [15389]
Date: Thu, 28 Jul 2016 00:38:55 +0000 (UTC)

Revision: 15389
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15389
Author:   nelson224
Date:     2016-07-28 00:38:55 +0000 (Thu, 28 Jul 2016)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind-2/property/js/portico/import_components.js

Modified: branches/dev-syncromind-2/property/js/portico/import_components.js
===================================================================
--- branches/dev-syncromind-2/property/js/portico/import_components.js  
2016-07-28 00:38:35 UTC (rev 15388)
+++ branches/dev-syncromind-2/property/js/portico/import_components.js  
2016-07-28 00:38:55 UTC (rev 15389)
@@ -66,6 +66,66 @@
                }
     });
        
+       $('#import_components').on('click', function ()
+       {
+               var oArgs = {menuaction: 
'property.uiimport_components.import_components'};
+               var requestUrl = phpGWLink('index.php', oArgs);
+               
+               if ($('#file_xml').val() === '')
+               {
+                       alert('no file selected');
+                       return false;
+               }
+
+               var form = document.forms.namedItem("form_components");
+               var file_data = $('#file_xml').prop('files')[0];
+               var form_data = new FormData(form);
+               form_data.append('file', file_data);
+               form_data.append('location_code', 'location_code');
+
+               $.ajax({
+                       url: requestUrl,
+                       cache: false,
+                       contentType: false,
+                       processData: false,
+                       data: form_data,
+                       type: 'post',
+                       success: function (result)
+                       {
+                               alert(result);
+                       }
+               });
+       });
+       
+       $('#import_files').on('click', function ()
+       {
+               var oArgs = {menuaction: 
'property.uiimport_components.import_component_files'};
+               var requestUrl = phpGWLink('index.php', oArgs);
+               
+               if ($('#file_excel').val() === '')
+               {
+                       alert('no file selected');
+                       return false;
+               }
+
+               var form = document.forms.namedItem("form_files");
+               var file_data = $('#file_excel').prop('files')[0];
+               var form_data = new FormData(form);
+               form_data.append('file', file_data);
+
+               $.ajax({
+                       url: requestUrl,
+                       cache: false,
+                       contentType: false,
+                       processData: false,
+                       data: form_data,
+                       type: 'post',
+                       success: function (result)
+                       {
+                               alert(result);
+                       }
+               });
+       });
 });
 
 function getLocations()




reply via email to

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