WIP javascript client

This commit is contained in:
John Woodlock
2012-06-26 22:38:30 +10:00
parent b91bbf1e01
commit b120778e8e
-40
View File
@@ -390,21 +390,6 @@ setClientListingContent("content");
//HOME list clients functionality
$("#tabs").tabs({
/* "ajaxOptions": {
type: 'GET',
dataType: 'json',
contentType: 'application/json; charset=utf-8',
cache: false,
beforeSend: function(xhr) {
console.log("before send");
xhr.setRequestHeader("Authorization", "Basic " + base64);
},
success: function(data, status, xhr) {
},
error: function(xhr, status, index, anchor) {
$(anchor.hash).html("error occured while ajax loading.");
}
},*/
select: function(event, ui) {
console.log("selected..");
},
@@ -413,8 +398,6 @@ setClientListingContent("content");
},
show: function(event, ui) {
console.log("show..");
var successFunction = function(data) {
var clientObject = new Object();
clientObject.clients = data;
@@ -429,29 +412,6 @@ setClientListingContent("content");
};
executeAjaxRequest(baseApiUrl + 'clients', 'GET', "", base64, successFunction, errorFunction);
/*
var jqxhr = $.ajax({
url: baseApiUrl + 'clients',
type: 'GET',
contentType: 'application/json',
dataType: 'json',
cache: false,
beforeSend: function(xhr) {
xhr.setRequestHeader("Authorization", "Basic " + base64);
},
success: function(data) {
var clientObject = new Object();
clientObject.clients = data;
console.log(clientObject);
var tableHtml = $("#clientSearchTabTemplate").render(clientObject);
$("#searchtab").html(tableHtml);
},
error: function(jqXHR, textStatus, errorThrown) {
handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors");
}
});
*/
}
});