From afaa03575f22bda227ac82ed3bb08bc29ba3b1be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 19 May 2010 20:33:23 -0400 Subject: [PATCH] Core: Better detection of when core is loaded twice. Fixes #5636 - Load ui.position before ui.core couse ui.core not execute. --- ui/jquery.ui.core.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ui/jquery.ui.core.js b/ui/jquery.ui.core.js index 18f0361ea41..9b32e8d1e0d 100644 --- a/ui/jquery.ui.core.js +++ b/ui/jquery.ui.core.js @@ -7,10 +7,19 @@ * * http://docs.jquery.com/UI */ -;jQuery.ui || (function($) { + +(function($) { + +// prevent duplicate loading +// this is only a problem because we proxy existing functions +// and we don't want to double proxy them +$.ui = $.ui || {}; +if ($.ui.version) { + return; +} //Helper functions and ui object -$.ui = { +$.extend($.ui, { version: "@VERSION", // $.ui.plugin is deprecated. Use the proxy pattern instead. @@ -103,7 +112,7 @@ $.ui = { UP: 38, WINDOWS: 91 // COMMAND } -}; +}); //jQuery plugins $.fn.extend({