aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--src/topic.js45
-rw-r--r--test/data/offset/absolute.html1
-rw-r--r--test/data/offset/body.html1
-rw-r--r--test/data/offset/fixed.html1
-rw-r--r--test/data/offset/relative.html1
-rw-r--r--test/data/offset/scroll.html1
-rw-r--r--test/data/offset/static.html1
-rw-r--r--test/data/offset/table.html1
-rw-r--r--test/data/selector.html1
-rw-r--r--test/data/support/bodyBackground.html1
-rw-r--r--test/data/support/boxModelIE.html1
-rw-r--r--test/data/support/hiddenIFrameFF.html1
-rw-r--r--test/index.html2
-rw-r--r--test/unit/topic.js68
15 files changed, 1 insertions, 126 deletions
diff --git a/Makefile b/Makefile
index 2d4409f8a..b91952f60 100644
--- 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
index c856db8c2..000000000
--- a/src/topic.js
+++ /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 );
diff --git a/test/data/offset/absolute.html b/test/data/offset/absolute.html
index f8bea437b..3868d6eb2 100644
--- a/test/data/offset/absolute.html
+++ b/test/data/offset/absolute.html
@@ -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>
diff --git a/test/data/offset/body.html b/test/data/offset/body.html
index 9843937ab..1678c2b25 100644
--- a/test/data/offset/body.html
+++ b/test/data/offset/body.html
@@ -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>
diff --git a/test/data/offset/fixed.html b/test/data/offset/fixed.html
index 43ef4f68e..75e8b1f0a 100644
--- a/test/data/offset/fixed.html
+++ b/test/data/offset/fixed.html
@@ -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>
diff --git a/test/data/offset/relative.html b/test/data/offset/relative.html
index 933db9b0f..6d0bb8d3e 100644
--- a/test/data/offset/relative.html
+++ b/test/data/offset/relative.html
@@ -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>
diff --git a/test/data/offset/scroll.html b/test/data/offset/scroll.html
index b17888423..c570e6c1a 100644
--- a/test/data/offset/scroll.html
+++ b/test/data/offset/scroll.html
@@ -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>
diff --git a/test/data/offset/static.html b/test/data/offset/static.html
index 07e757004..d78a2c4ea 100644
--- a/test/data/offset/static.html
+++ b/test/data/offset/static.html
@@ -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>
diff --git a/test/data/offset/table.html b/test/data/offset/table.html
index 52e220065..83ef6c475 100644
--- a/test/data/offset/table.html
+++ b/test/data/offset/table.html
@@ -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>
diff --git a/test/data/selector.html b/test/data/selector.html
index b62e1fa4e..8ffc6c6b3 100644
--- a/test/data/selector.html
+++ b/test/data/selector.html
@@ -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>
diff --git a/test/data/support/bodyBackground.html b/test/data/support/bodyBackground.html
index 340784bb0..824fe65e4 100644
--- a/test/data/support/bodyBackground.html
+++ b/test/data/support/bodyBackground.html
@@ -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>
diff --git a/test/data/support/boxModelIE.html b/test/data/support/boxModelIE.html
index a46eee16e..59bd37b46 100644
--- a/test/data/support/boxModelIE.html
+++ b/test/data/support/boxModelIE.html
@@ -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>
diff --git a/test/data/support/hiddenIFrameFF.html b/test/data/support/hiddenIFrameFF.html
index eae438711..a21708d57 100644
--- a/test/data/support/hiddenIFrameFF.html
+++ b/test/data/support/hiddenIFrameFF.html
@@ -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>
diff --git a/test/index.html b/test/index.html
index 10c2e5f6c..17baa4894 100644
--- a/test/index.html
+++ b/test/index.html
@@ -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
index 0b126fe34..000000000
--- a/test/unit/topic.js
+++ /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" );
-});