app/assets/javascripts/garage/docs/console.js.coffee in the_garage-2.3.1 vs app/assets/javascripts/garage/docs/console.js.coffee in the_garage-2.3.2

- old
+ new

@@ -7,20 +7,10 @@ $(".modal-close").click (ev) -> $.colorbox.close() ev.preventDefault() - $("#oauth-dialog .authenticate").click (ev) -> - $("#oauth-dialog #return_to").val(window.location.pathname + window.location.search) - $("form#oauth-authenticate").submit() - ev.preventDefault() - - $(".console .validate-token").click (ev) -> - $("#method").val('GET') - $("#location").val("/oauth/token/info") - $('.send-request').click() - buildAuthorizedUrl = (base, location, token) -> url = base + location if url.indexOf('?') > 0 url += '&' else @@ -70,10 +60,12 @@ cache: false, data: buildData($('.parameters')), dataType: 'json', complete: -> queryString = $.param({'location': $('#location').val(), 'method': $('#method').val()}) - history.pushState('', '', "#{location.pathname}?#{queryString}") + newFullpath = "#{location.pathname}?#{queryString}" + history.pushState('', '', newFullpath) + $("#oauth-dialog #return_to").val(newFullpath) success: (data, textStatus, xhr) -> $('#api-headers').text("#{xhr.status} #{xhr.statusText}\n" + xhr.getAllResponseHeaders()) $('#api-response').html buildHyperlinks(JSON.stringify(data, undefined, 2)) error: (xhr, textStatus, error) -> $('#api-headers').text("#{xhr.status} #{xhr.statusText}\n" + xhr.getAllResponseHeaders())