[FIX] moved get_uuid call to rest methods where it belongs; changed charts API tool to use ISO dates

This commit is contained in:
mDuo13
2015-04-06 13:35:11 -07:00
parent 4a3657fbea
commit 5e4bfcb626
3 changed files with 42 additions and 39 deletions

View File

@@ -190,11 +190,6 @@ function select_request(request) {
reset_response_area();
};
//helper to fill the default payment with a new UUID
function get_uuid(callback) {
$.get(URL_BASE + "/v1/uuid").done(callback);
}
function get_path() {
s = "";
rest_url.find(".non_editable, .editable").each(function() {
@@ -270,17 +265,6 @@ $(document).ready(function() {
request_button.click(send_request);
//rest_method.change(update_method);
get_uuid(function(resp,status,xhr) {
requests["submit-payment"].body.client_resource_id = resp.uuid;
if (window.location.hash == "#submit-payment") {
//we might have already loaded the call by the time the AJAX
// completes, so refresh the default body.
// Debatably a bad idea, because if the AJAX takes so long that the
// user has already started editing the call, it'll reset it.
select_request("submit-payment");
}
});
if (window.location.hash) {
var cmd = window.location.hash.slice(1).toLowerCase();
select_request(cmd);