From 396a25b96fcca2795306da701fc75a0abe33deba Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 02:22:57 +0000 Subject: [PATCH] BUGFIX Renamed property "queue" to "ondemand_queue" to make compatible with jQuery 1.3 git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@92487 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/core/jquery.ondemand.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/javascript/core/jquery.ondemand.js b/javascript/core/jquery.ondemand.js index d1316ed88..1ec896249 100644 --- a/javascript/core/jquery.ondemand.js +++ b/javascript/core/jquery.ondemand.js @@ -1,6 +1,9 @@ /** * On-demand JavaScript handler * Based on http://plugins.jquery.com/files/issues/jquery.ondemand.js_.txt and modified to integrate with Sapphire + * + * Modified 2009-08-03 by Ingo Schommer, SilverStripe Ltd. - Renamed property "queue" to "ondemand_queue" + * to make compatible with jQuery 1.3 */ (function($){ @@ -16,7 +19,7 @@ routeCss : '' // choice of using this config or full path in scriptUrl argument }, // previously were useless for users which don't use '_js/' and '_css/' folders. (by PGA) - queue : [], + ondemand_queue : [], pending : null, loaded_list : null, // loaded files list - to protect against loading existed file again (by PGA) @@ -60,7 +63,7 @@ if(this.pending) { - this.queue.push(_request); + this.ondemand_queue.push(_request); return; } @@ -114,9 +117,9 @@ this.loaded_list[this.pending.url] = 1; // adding loaded file to loaded list (by PGA) this.pending = null; - if(this.queue.length > 0) + if(this.ondemand_queue.length > 0) { - var request = this.queue.shift(); + var request = this.ondemand_queue.shift(); this.requireJs(request.url, request.callback, request.opts, request.obj, request.scope); } },