From 3f86fd756a146bab5386503dfb2ca11c46f30352 Mon Sep 17 00:00:00 2001 From: Jesse Hallett Date: Fri, 13 Dec 2013 14:08:16 -0800 Subject: Modifies fiveui.RuleSet.load to return promises --- src/js/chrome/js/platform-ajax.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/js/chrome/js/platform-ajax.js') diff --git a/src/js/chrome/js/platform-ajax.js b/src/js/chrome/js/platform-ajax.js index 32aac99..e5b4d1c 100644 --- a/src/js/chrome/js/platform-ajax.js +++ b/src/js/chrome/js/platform-ajax.js @@ -13,27 +13,12 @@ fiveui.ajax = fiveui.ajax || {}; */ fiveui.ajax.get = function(url, options) { - _.defaults(options, { - success:function() {}, - error: function() {} - }); - - jQuery.ajax(url, { + return jQuery.ajax(url, { cache: false, dataType: 'text', - success:function(text) { - // strip out everything else from the args - options.success(text); - }, - - error:function() { - // call with no context - options.error(); - }, - }); }; -- cgit v1.2.3