]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Better detection of when core is loaded twice. Fixes #5636 - Load ui.position...
authorScott González <scott.gonzalez@gmail.com>
Thu, 20 May 2010 00:33:23 +0000 (20:33 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 20 May 2010 00:33:23 +0000 (20:33 -0400)
ui/jquery.ui.core.js

index 18f0361ea414982ab6db490c7666b3b089d0d4a3..9b32e8d1e0db1f027f029d3cb686a7366fabe2b8 100644 (file)
@@ -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({