diff --git a/js/updater.js b/js/updater.js index bc2219e..195b5f2 100755 --- a/js/updater.js +++ b/js/updater.js @@ -114,26 +114,30 @@ var ucsUpload = function(strUploadHandler, strData) { return; } jQuery.ajax({ - url: strUploadHandler, - type: 'POST', - data: strData, - dataType: 'json', - success: function(ajaxRespond) { - var jsonObj = ajaxRespond; - // alert(jsonObj.status + ': ' + jsonObj.message); - alert(jsonObj.message); - }, - error: function(ajaxRespond) { - alert('UCS Upload error with message: ' + ajaxRespond.responseText); - } - }); + url: strUploadHandler, + type: 'POST', + data: strData, + dataType: 'json', + success: function(ajaxRespond) { + var jsonObj = ajaxRespond; + // alert(jsonObj.status + ': ' + jsonObj.message); + alert(jsonObj.message); + }, + error: function(ajaxRespond) { + alert('UCS Upload error with message: ' + ajaxRespond.responseText); + } + }); } /* invoke UCS record update */ var ucsUpdate = function(strURLHandler, strData) { - strData = strData.trim(); - jQuery.ajax(strURLHandler, { - type: 'POST', - data: strData - }); + strData = jQuery.trim(strData); + jQuery.ajax({ + url: strURLHandler, + type: 'POST', + data: strData, + dataType: 'json', + error: function(jqXHR, textStatus, errorThrown) { alert('Error updating UCS : ' + textStatus + ' (' + errorThrown + ')'); }, + success: function(data, textStatus, jqXHR) { alert('UCS record(s) updated'); } + }); } diff --git a/ucnode.inc.php b/ucnode.inc.php index 38601f2..dc5c4c1 100755 --- a/ucnode.inc.php +++ b/ucnode.inc.php @@ -27,7 +27,7 @@ die("can not access this file directly"); } -$ucs['serveraddr'] = 'http://127.0.0.1/ucs-2.0'; // UCS server address. NO TRAILING SLASH! for local testing on Windows machine don't use localhost, use 127.0.0.1 instead +$ucs['serveraddr'] = 'http://127.0.0.1/ucs2'; // UCS server address. NO TRAILING SLASH! for local testing on Windows machine don't use localhost, use 127.0.0.1 instead $node['id'] = 'slims-node'; // node ID $node['password'] = '2325f677e21c1613909c953eb03c57352259cc5d'; // default is s0beautifulday $node['name'] = 'SLiMS Library'; // node name