diff --git a/web/js/jquery.fuzzytoast.js b/web/js/jquery.fuzzytoast.js index af8ac70..2da5d45 100644 --- a/web/js/jquery.fuzzytoast.js +++ b/web/js/jquery.fuzzytoast.js @@ -50,7 +50,9 @@ destination : $.fuzzytoast.default_destination, method : $.fuzzytoast.default_method, append : $.fuzzytoast.default_append, + before : $.fuzzytoast.default_before, finished : $.fuzzytoast.default_finished, + complete : $.fuzzytoast.default_complete, success : $.fuzzytoast.default_success, parameters : parameters }, $.fuzzytoast.linkdata[id]); @@ -380,8 +382,11 @@ if (linkdata.success) { linkdata.success(destination, linkdata.model); } - if (linkdata.finished) { - linkdata.finished(); + if (linkdata.finished) { // NOTE: This approach is obsolete and will + linkdata.finished(); // be removed in version 2.0 + } + if (linkdata.complete) { + linkdata.complete(); } // If the link contains a "refresh" tag, we will reget the @@ -429,8 +434,11 @@ linkdata.error(errorDetails); } - if (linkdata.finished) { - linkdata.finished(); + if (linkdata.finished) { // NOTE: This approach is obsolete and will + linkdata.finished(); // be removed in version 2.0 + } + if (linkdata.complete) { + linkdata.complete(); } }; diff --git a/web/templates/instructions.html b/web/templates/instructions.html index 6965a8d..e8745fe 100644 --- a/web/templates/instructions.html +++ b/web/templates/instructions.html @@ -87,10 +87,10 @@
- finished
+ complete
- A function called after either the success
or
error
callbacks. Defaults to
- $.fuzzytoast.default_finished
+ $.fuzzytoast.default_complete
@@ -98,7 +98,8 @@
destination
,
which allows a spinner to be inserted while the data is being
- acquired.
+ acquired. Defaults to
+ $.fuzzytoast.default_before
$.ajax()
calls as a beforeSend
@@ -155,10 +156,10 @@
- $.fuzzytoast.default_finished
+ $.fuzzytoast.default_complete
- A function name to be used for all
- finished
- requests.
+ complete
d requests. Called after
+ any success
or error
calls.