]> source.dussan.org Git - jquery.git/commitdiff
Fixed bug #147, required some (ugly) modifications: changed function jQuery(...)...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 15 Sep 2006 14:51:55 +0000 (14:51 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 15 Sep 2006 14:51:55 +0000 (14:51 +0000)
Makefile
build.xml
src/intro.js [new file with mode: 0644]
src/jquery/jquery.js
src/outro.js [new file with mode: 0644]

index 4f753866910c936b53d0616be3ad80e273ef3100..31f31825a6c1149ef5010d459195e74fbc3da756 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,10 +6,12 @@ DOCS_DIR = ${PREFIX}/docs
 TEST_DIR = ${PREFIX}/test
 DIST_DIR = ${PREFIX}/dist
 
-MODULES = ${SRC_DIR}/jquery/*\
+MODULES = ${SRC_DIR}/intro.js\
+       ${SRC_DIR}/jquery/*\
        ${SRC_DIR}/event/*\
        ${SRC_DIR}/fx/*\
        ${SRC_DIR}/ajax/*
+       ${SRC_DIR}/outro.js\
 
 JQ = ${DIST_DIR}/jquery.js
 JQ_LITE = ${DIST_DIR}/jquery.lite.js
index 1c85a8cdcec74a47e9737dc52ac93735a5819386..7cf2ab93d2a8c39e942ff7944d411ec036d7fe41 100644 (file)
--- a/build.xml
+++ b/build.xml
     <target name="jquery">
         <echo message="Building ${JQ}" />
         <mkdir dir="${DIST_DIR}" />
-        <concat destfile="${JQ}">
+        <concat destfile="${JQ}">\r
+               <fileset dir="${SRC_DIR}" includes="intro.js" />
             <fileset dir="${SRC_DIR}" includes="jquery/*.js" />
             <fileset dir="${SRC_DIR}" includes="event/*.js" />
             <fileset dir="${SRC_DIR}" includes="fx/*.js" />
-            <fileset dir="${SRC_DIR}" includes="ajax/*.js" />
+            <fileset dir="${SRC_DIR}" includes="ajax/*.js" />\r
+               <fileset dir="${SRC_DIR}" includes="outro.js" />
         </concat>
         <echo message="${JQ} built." />
     </target>
diff --git a/src/intro.js b/src/intro.js
new file mode 100644 (file)
index 0000000..c26ac36
--- /dev/null
@@ -0,0 +1,2 @@
+/* prevent execution of jQuery if included more then once */\r
+if(typeof window.jQuery == "undefined") {\r
index b094acf0866b78f8f8e54576c30daf7a4da59d5a..9b5bf8d444600874d315a30b99266b95c081eac2 100644 (file)
@@ -28,7 +28,7 @@ window.undefined = window.undefined;
  * @name jQuery
  * @cat Core
  */
-function jQuery(a,c) {
+jQuery = function(a,c) {
 
        // Shortcut for document ready (because $(document).each() is silly)
        if ( a && a.constructor == Function && jQuery.fn.ready )
@@ -67,7 +67,7 @@ function jQuery(a,c) {
        // If so, execute it in context
        if ( fn && fn.constructor == Function )
                this.each(fn);
-}
+};
 
 // Map over the $ in case of overwrite
 if ( typeof $ != "undefined" )
diff --git a/src/outro.js b/src/outro.js
new file mode 100644 (file)
index 0000000..deda25d
--- /dev/null
@@ -0,0 +1 @@
+} // close: if(typeof window.jQuery == "undefined") {
\ No newline at end of file