fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15108] Syncromind: Merge 14936:15027 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [15108] Syncromind: Merge 14936:15027 from trunk
Date: Fri, 13 May 2016 12:22:38 +0000 (UTC)

Revision: 15108
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15108
Author:   sigurdne
Date:     2016-05-13 12:22:38 +0000 (Fri, 13 May 2016)
Log Message:
-----------
Syncromind: Merge 14936:15027 from trunk

Removed Paths:
-------------
    branches/dev-syncromind-2/property/js/portico/ajax_workorder_edit.js

Deleted: branches/dev-syncromind-2/property/js/portico/ajax_workorder_edit.js
===================================================================
--- branches/dev-syncromind-2/property/js/portico/ajax_workorder_edit.js        
2016-05-13 12:22:35 UTC (rev 15107)
+++ branches/dev-syncromind-2/property/js/portico/ajax_workorder_edit.js        
2016-05-13 12:22:38 UTC (rev 15108)
@@ -1,123 +0,0 @@
-$(document).ready(function ()
-{
-
-       $("#global_category_id").change(function ()
-       {
-               var oArgs = {menuaction: 'property.boworkorder.get_category', 
cat_id: $(this).val()};
-               var requestUrl = phpGWLink('index.php', oArgs, true);
-
-               var htmlString = "";
-
-               $.ajax({
-                       type: 'POST',
-                       dataType: 'json',
-                       url: requestUrl,
-                       success: function (data)
-                       {
-                               if (data != null)
-                               {
-                                       if (data.active != 1)
-                                       {
-                                               alert('Denne kan ikke velges');
-                                       }
-                               }
-                       }
-               });
-       });
-
-
-       $("#workorder_edit").on("submit", function (e)
-       {
-
-               if ($("#lean").val() == 0)
-               {
-                       return;
-               }
-
-               e.preventDefault();
-               var thisForm = $(this);
-               var submitBnt = $(thisForm).find("input[type='submit']");
-               var requestUrl = $(thisForm).attr("action");
-               $.ajax({
-                       type: 'POST',
-                       url: requestUrl + "&phpgw_return_as=json&" + 
$(thisForm).serialize(),
-                       success: function (data)
-                       {
-                               if (data)
-                               {
-                                       if (data.sessionExpired)
-                                       {
-                                               alert('Sesjonen er utløpt - du 
må logge inn på nytt');
-                                               return;
-                                       }
-
-                                       var obj = data;
-
-                                       var submitBnt = 
$(thisForm).find("input[type='submit']");
-                                       if (obj.status == "updated")
-                                       {
-                                               $(submitBnt).val("Lagret");
-                                       }
-                                       else
-                                       {
-                                               $(submitBnt).val("Feil ved 
lagring");
-                                       }
-
-                                       // Changes text on save button back to 
original
-                                       window.setTimeout(function ()
-                                       {
-                                               $(submitBnt).val('Lagre');
-                                               
$(submitBnt).addClass("not_active");
-                                       }, 1000);
-
-                                       var ok = true;
-                                       var htmlString = "";
-                                       if (data['receipt'] != null)
-                                       {
-                                               if (data['receipt']['error'] != 
null)
-                                               {
-                                                       ok = false;
-                                                       for (var i = 0; i < 
data['receipt']['error'].length; ++i)
-                                                       {
-                                                               htmlString += 
"<div class=\"error\">";
-                                                               htmlString += 
data['receipt']['error'][i]['msg'];
-                                                               htmlString += 
'</div>';
-                                                       }
-
-                                               }
-                                               if (typeof 
(data['receipt']['message']) != 'undefined')
-                                               {
-                                                       for (var i = 0; i < 
data['receipt']['message'].length; ++i)
-                                                       {
-                                                               htmlString += 
"<div class=\"msg_good\">";
-                                                               htmlString += 
data['receipt']['message'][i]['msg'];
-                                                               htmlString += 
'</div>';
-                                                       }
-
-                                               }
-                                               $("#receipt").html(htmlString);
-                                       }
-
-                                       if (ok)
-                                       {
-                                               parent.closeJS_remote();
-                                               //      parent.hide_popupBox();
-                                       }
-                               }
-                       }
-               });
-       });
-
-       $("#workorder_cancel").on("submit", function (e)
-       {
-               if ($("#lean").val() == 0)
-               {
-                       return;
-               }
-               e.preventDefault();
-               parent.closeJS_remote();
-//             parent.hide_popupBox();
-       });
-
-});
-




reply via email to

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