]> source.dussan.org Git - jquery.git/commitdiff
Removing topic.js as it will be a plugin
authortimmywil <timmywillisn@gmail.com>
Tue, 13 Sep 2011 00:11:19 +0000 (20:11 -0400)
committertimmywil <timmywillisn@gmail.com>
Mon, 19 Sep 2011 19:42:30 +0000 (15:42 -0400)
15 files changed:
Makefile
src/topic.js [deleted file]
test/data/offset/absolute.html
test/data/offset/body.html
test/data/offset/fixed.html
test/data/offset/relative.html
test/data/offset/scroll.html
test/data/offset/static.html
test/data/offset/table.html
test/data/selector.html
test/data/support/bodyBackground.html
test/data/support/boxModelIE.html
test/data/support/hiddenIFrameFF.html
test/index.html
test/unit/topic.js [deleted file]

index 2d4409f8ab47c91a30d5fc98253122b64e9fb860..b91952f6065dd83265644fecdd0d78b2bef70db2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,6 @@ POST_COMPILER = ${JS_ENGINE} ${BUILD_DIR}/post-compile.js
 BASE_FILES = ${SRC_DIR}/core.js\
        ${SRC_DIR}/callbacks.js\
        ${SRC_DIR}/deferred.js\
-       ${SRC_DIR}/topic.js\
        ${SRC_DIR}/support.js\
        ${SRC_DIR}/data.js\
        ${SRC_DIR}/queue.js\
diff --git a/src/topic.js b/src/topic.js
deleted file mode 100644 (file)
index c856db8..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-(function( jQuery ) {
-
-       var topics = {},
-               sliceTopic = [].slice;
-
-       jQuery.Topic = function( id ) {
-               var callbacks,
-                       method,
-                       topic = id && topics[ id ];
-               if ( !topic ) {
-                       callbacks = jQuery.Callbacks();
-                       topic = {
-                               publish: callbacks.fire,
-                               subscribe: callbacks.add,
-                               unsubscribe: callbacks.remove
-                       };
-                       if ( id ) {
-                               topics[ id ] = topic;
-                       }
-               }
-               return topic;
-       };
-
-       jQuery.extend({
-               subscribe: function( id ) {
-                       var topic = jQuery.Topic( id ),
-                               args = sliceTopic.call( arguments, 1 );
-                       topic.subscribe.apply( topic, args );
-                       return {
-                               topic: topic,
-                               args: args
-                       };
-               },
-               unsubscribe: function( id ) {
-                       var topic = id && id.topic || jQuery.Topic( id );
-                       topic.unsubscribe.apply( topic, id && id.args ||
-                                       sliceTopic.call( arguments, 1 ) );
-               },
-               publish: function( id ) {
-                       var topic = jQuery.Topic( id );
-                       topic.publish.apply( topic, sliceTopic.call( arguments, 1 ) );
-               }
-       });
-
-})( jQuery );
index f8bea437b50bf4fdbee425ea64fc5f38eb62113e..3868d6eb2415865bfc8829b80259d46f1c701a04 100644 (file)
@@ -18,7 +18,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/sizzle/sizzle.js"></script>
                <script src="../../../src/sizzle-jquery.js"></script>
index 9843937ab97c4df49a35382fa58428cdb113d325..1678c2b25f1c63d8dd4385831b0f1c2b9b0d8301 100644 (file)
@@ -11,7 +11,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/sizzle/sizzle.js"></script>
                <script src="../../../src/sizzle-jquery.js"></script>
index 43ef4f68e975963b0467691696e7faa8afeca7e2..75e8b1f0a5620d5585000b0dfc3d2a1bf1f66308 100644 (file)
@@ -15,7 +15,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/sizzle/sizzle.js"></script>
                <script src="../../../src/sizzle-jquery.js"></script>
index 933db9b0f92c4c07d7c74a426842b31dd211e8be..6d0bb8d3e3dfbb49b01db5017b0c4bf3896059fc 100644 (file)
@@ -13,7 +13,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/sizzle/sizzle.js"></script>
                <script src="../../../src/sizzle-jquery.js"></script>
index b178884234f6c0dc9467dfe0d10a54f3816e846b..c570e6c1a9ee7a83679bbfc695892ad3adb7c3dd 100644 (file)
@@ -16,7 +16,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/sizzle/sizzle.js"></script>
                <script src="../../../src/sizzle-jquery.js"></script>
index 07e75700429df5fad88cad9b74d3766d653c946f..d78a2c4ea1e5e28a9caf811ef7d3613da96d231f 100644 (file)
@@ -13,7 +13,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/sizzle/sizzle.js"></script>
                <script src="../../../src/sizzle-jquery.js"></script>
index 52e2200657c9ea402c7ec8ef8365cb7916e0616e..83ef6c475737219addf3431d609a3c3a36e3bae5 100644 (file)
@@ -13,7 +13,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/sizzle/sizzle.js"></script>
                <script src="../../../src/sizzle-jquery.js"></script>
index b62e1fa4e713c2f9969e03041c0e034b9325dbe7..8ffc6c6b3eeb5ccd1e7de1c9ab1d0cc0a89975f9 100644 (file)
@@ -5,6 +5,7 @@
        <title>jQuery selector</title>
 
        <script src="../../src/core.js"></script>
+       <script src="../../src/callbacks.js"></script>
        <script src="../../src/deferred.js"></script>
        <script src="../../src/support.js"></script>
        <script src="../../src/data.js"></script>
index 340784bb0223907af98a2c367cb5811492761a54..824fe65e45d869f7993dec45c96c60db163b4150 100644 (file)
@@ -13,7 +13,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/data.js"></script>
                <script src="../../../src/queue.js"></script>
index a46eee16e0c676cdbc00cfd2b778c8e098aeed18..59bd37b4635c77f3130818811d66381f770aa6ba 100644 (file)
@@ -4,7 +4,6 @@
        <script src="../../../src/core.js"></script>
        <script src="../../../src/callbacks.js"></script>
        <script src="../../../src/deferred.js"></script>
-       <script src="../../../src/topic.js"></script>
        <script src="../../../src/support.js"></script>
        <script src="../../../src/data.js"></script>
        <script src="../../../src/queue.js"></script>
index eae43871197700aa2f77a1b36ea1bc7d65bd81ce..a21708d574d4cd177f60362be3bc281a735cc241 100644 (file)
@@ -3,7 +3,6 @@
                <script src="../../../src/core.js"></script>
                <script src="../../../src/callbacks.js"></script>
                <script src="../../../src/deferred.js"></script>
-               <script src="../../../src/topic.js"></script>
                <script src="../../../src/support.js"></script>
                <script src="../../../src/data.js"></script>
                <script src="../../../src/queue.js"></script>
index 10c2e5f6cc82867660e274631717bd1b314ae79f..17baa4894fae8f51a52dca6845d2b4f80769f779 100644 (file)
@@ -11,7 +11,6 @@
        <script src="../src/core.js"></script>
        <script src="../src/callbacks.js"></script>
        <script src="../src/deferred.js"></script>
-       <script src="../src/topic.js"></script>
        <script src="../src/support.js"></script>
        <script src="../src/data.js"></script>
        <script src="../src/queue.js"></script>
@@ -39,7 +38,6 @@
        <script src="unit/support.js"></script>
        <script src="unit/callbacks.js"></script>
        <script src="unit/deferred.js"></script>
-       <script src="unit/topic.js"></script>
        <script src="unit/data.js"></script>
        <script src="unit/queue.js"></script>
        <script src="unit/attributes.js"></script>
diff --git a/test/unit/topic.js b/test/unit/topic.js
deleted file mode 100644 (file)
index 0b126fe..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-module("topic", { teardown: moduleTeardown });
-
-test( "jQuery.Topic - Anonymous Topic", function() {
-
-       expect( 4 );
-
-       var topic = jQuery.Topic(),
-               count = 0;
-
-       function firstCallback( value ) {
-               strictEqual( count, 1, "Callback called when needed" );
-               strictEqual( value, "test", "Published value received" );
-       }
-
-       count++;
-       topic.subscribe( firstCallback );
-       topic.publish( "test" );
-       topic.unsubscribe( firstCallback );
-       count++;
-       topic.subscribe(function( value ) {
-               strictEqual( count, 2, "Callback called when needed" );
-               strictEqual( value, "test", "Published value received" );
-       });
-       topic.publish( "test" );
-
-});
-
-test( "jQuery.Topic - Named Topic", function() {
-
-       expect( 2 );
-
-       function callback( value ) {
-               ok( true, "Callback called" );
-               strictEqual( value, "test", "Proper value received" );
-       }
-
-       jQuery.Topic( "test" ).subscribe( callback );
-       jQuery.Topic( "test" ).publish( "test" );
-       jQuery.Topic( "test" ).unsubscribe( callback );
-       jQuery.Topic( "test" ).publish( "test" );
-});
-
-test( "jQuery.Topic - Helpers", function() {
-
-       expect( 4 );
-
-       function callback( value ) {
-               ok( true, "Callback called" );
-               strictEqual( value, "test", "Proper value received" );
-       }
-
-       jQuery.subscribe( "test", callback );
-       jQuery.publish( "test" , "test" );
-       jQuery.unsubscribe( "test", callback );
-       jQuery.publish( "test" , "test" );
-
-
-       var test = true,
-               subscription = jQuery.subscribe( "test", function() {
-                       ok( test, "first callback called" );
-               }, function() {
-                       ok( test, "second callback called" );
-               });
-       jQuery.publish( "test" );
-       test = false;
-       jQuery.unsubscribe( subscription );
-       jQuery.publish( "test" );
-});