Skip to content

Commit

Permalink
Added: UCS status alert after deleting record(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
dicarve committed Sep 22, 2012
1 parent 19278df commit 2e56f34
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 19 deletions.
40 changes: 22 additions & 18 deletions js/updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'); }
});
}
2 changes: 1 addition & 1 deletion ucnode.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2e56f34

Please sign in to comment.