]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
allow data manipulation 5893/head
authorChristian Seel <cs@chsmedien.de>
Fri, 3 Oct 2014 14:21:11 +0000 (16:21 +0200)
committerChristian Seel <cs@chsmedien.de>
Fri, 3 Oct 2014 14:21:11 +0000 (16:21 +0200)
This adds the possibility to manipulate the data that is returned from the ajax request in the custom success handler.

js/foundation/foundation.reveal.js

index ab7efefa176cbe0e89c35a04681c9e164245f48e..9836abc57a2bc5cdcc492058310838b9f15d449d 100644 (file)
           $.extend(ajax_settings, {
             success: function (data, textStatus, jqXHR) {
               if ( $.isFunction(old_success) ) {
-                old_success(data, textStatus, jqXHR);
+                var result = old_success(data, textStatus, jqXHR);
+                if (typeof result == 'string') data = result;
               }
 
               modal.html(data);