spec/dummy/tmp/cache/assets/DBF/940/sprockets%2Fb13a96ae4e2f3d40ffee0d9706b0db12 in api_taster-0.4.7 vs spec/dummy/tmp/cache/assets/DBF/940/sprockets%2Fb13a96ae4e2f3d40ffee0d9706b0db12 in api_taster-0.4.8

- old
+ new

@@ -1,11 +1,19 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1340592071.0979662: @value"í{I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1341306255.65512: @value"Û{I" class:EFI"ProcessedAsset;FI"logical_path;FI"api_taster/app.js;FI" pathname;FI"M/Users/User/Projects/api_taster/app/assets/javascripts/api_taster/app.js;FI"content_type;FI"application/javascript;FI" -mtime;FI"2012-06-25T12:41:09+10:00;FI" length;Fië I" digest;F"%97c9fc1d1e60b97bee562b70a0986276I" source;FI"ë var ApiTaster = { +mtime;FI"2012-07-03T19:04:12+10:00;FI" length;FiÙ I" digest;F"%fd8bc708bf57fae1c7d09a8fcdf276fdI" source;FI"Ù var ApiTaster = { formAction: '', + disableSubmitButton: function() { + $("#submit-api").attr("disabled", true); + }, + + enableSubmitButton: function() { + $("#submit-api").attr("disabled", false); + }, + disableUrlParams: function() { $("fieldset[ref=url-params] input").prop("disabled", true); }, enableUrlParams: function() { @@ -101,20 +109,23 @@ }); }); $("#show-api-div").on("click", "#submit-api", function() { $(this).parents("form").submit(function() { + ApiTaster.disableSubmitButton(); + $(this).unbind("submit").ajaxSubmit({ beforeSubmit: function(arr, $form, options) { $form.replaceUrlParams(arr); ApiTaster.disableUrlParams(); return false; } }); }); $("form").bind("ajax:complete", function(e, xhr, status) { + ApiTaster.enableSubmitButton(); ApiTaster.enableUrlParams(); ApiTaster.restoreFormActionFor(this); if ($("#show-api-response-div:visible").length == 0) { $("#show-api-response-div").slideDown(100); @@ -135,7 +146,7 @@ $("#show-api-response-div").enableNavTabsFor("pre"); }); }); -;FI"dependency_digest;F"%944bf031adebf746f9031f99c7215b77I"required_paths;F[I"M/Users/User/Projects/api_taster/app/assets/javascripts/api_taster/app.js;FI"dependency_paths;F[{I" path;FI"M/Users/User/Projects/api_taster/app/assets/javascripts/api_taster/app.js;FI" -mtime;FI"2012-06-25T12:41:09+10:00;FI" digest;F"%97c9fc1d1e60b97bee562b70a0986276I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862 +;FI"dependency_digest;F"%528c82bf3698f805c533f41bf98ca251I"required_paths;F[I"M/Users/User/Projects/api_taster/app/assets/javascripts/api_taster/app.js;FI"dependency_paths;F[{I" path;FI"M/Users/User/Projects/api_taster/app/assets/javascripts/api_taster/app.js;FI" +mtime;FI"2012-07-03T19:04:12+10:00;FI" digest;F"%fd8bc708bf57fae1c7d09a8fcdf276fdI" _version;F"%9f3b95dd7ea3030dc35985c0a8020862 \ No newline at end of file