From 35defa381bb627de04d8d4ed49a4761c4fde7ef6 Mon Sep 17 00:00:00 2001 From: john-mark-wilkinson Date: Mon, 9 Jun 2014 13:47:00 -0700 Subject: [PATCH] Update framework.js Added prepend option '^' for AJAX framework "data-request-update" parameter --- modules/system/assets/js/framework.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/system/assets/js/framework.js b/modules/system/assets/js/framework.js index ed4332e21..d6e3ae576 100644 --- a/modules/system/assets/js/framework.js +++ b/modules/system/assets/js/framework.js @@ -161,6 +161,8 @@ if (window.jQuery === undefined) var selector = (options.update[partial]) ? options.update[partial] : partial if (jQuery.type(selector) == 'string' && selector.charAt(0) == '@') { $(selector.substring(1)).append(data[partial]).trigger('ajaxUpdate', [context, data, textStatus, jqXHR]) + } else if(jQuery.type(selector) == 'string' && selector.charAt(0) == '^'){ + $(selector.substring(1)).prepend(data[partial]).trigger('ajaxUpdate', [context, data, textStatus, jqXHR]); } else $(selector).html(data[partial]).trigger('ajaxUpdate', [context, data, textStatus, jqXHR]) } @@ -379,4 +381,4 @@ if (window.jQuery === undefined) $(document).on('render', callback) } -}(window.jQuery); \ No newline at end of file +}(window.jQuery);