Browse Source

Honors loadAmber deploy option while loading packages through ajax, as jQuery ajax disable cache by default

Laurent Laffont 13 years ago
parent
commit
162b49688e
1 changed files with 6 additions and 1 deletions
  1. 6 1
      js/amber.js

+ 6 - 1
js/amber.js

@@ -205,7 +205,12 @@ amber = (function() {
 	};
 	};
 
 
 	function loadJSViaJQuery(url, callback) {
 	function loadJSViaJQuery(url, callback) {
-		$.getScript(jsToLoad[0], callback);
+		$.ajax({
+			dataType: "script",
+			url: jsToLoad[0],
+			cache: deploy,
+			success: callback
+		});
 	};
 	};
 
 
 	function writeScriptTag(src) {
 	function writeScriptTag(src) {