From 678ff6326a984d4ff8e7f69fd31304c2520e66f3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Feb 2011 12:01:26 -0500 Subject: [PATCH] Added version property to plugins that were missing them. --- tests/unit/testsuite.js | 3 +++ ui/jquery.ui.autocomplete.js | 1 + ui/jquery.ui.button.js | 4 ++++ ui/jquery.ui.menu.js | 2 ++ ui/jquery.ui.spinner.js | 2 ++ ui/jquery.ui.tooltip.js | 3 ++- 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js index 9724a946f..3e4ac5bbf 100644 --- a/tests/unit/testsuite.js +++ b/tests/unit/testsuite.js @@ -64,6 +64,9 @@ window.commonWidgetTests = function( widget, settings ) { testWidgetDefaults( widget, settings.defaults ); testWidgetOverrides( widget ); testBasicUsage( widget ); + test( "version", function() { + ok( "version" in $.ui[ widget ], "version property exists" ); + }); }; }()); diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 594d59530..c35d8180c 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -410,6 +410,7 @@ $.widget( "ui.autocomplete", { }); $.extend( $.ui.autocomplete, { + version: "@VERSION", escapeRegex: function( value ) { return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); }, diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 8f63ec57a..e19a68bfe 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -313,6 +313,8 @@ $.widget( "ui.button", { } }); +$.ui.button.version = "@VERSION"; + $.widget( "ui.buttonset", { options: { items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" @@ -367,4 +369,6 @@ $.widget( "ui.buttonset", { } }); +$.ui.buttonset.version = "@VERSION"; + }( jQuery ) ); diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index c64057ee0..84ea84384 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -245,4 +245,6 @@ $.widget("ui.menu", { } }); +$.ui.menu.version = "@VERSION"; + }( jQuery )); diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index c8a76f4cf..df61a7494 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -357,4 +357,6 @@ $.widget('ui.spinner', { } }); +$.ui.spinner.version = "@VERSION"; + })(jQuery); diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 8e211c272..50e1b4437 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -130,7 +130,8 @@ $.widget("ui.tooltip", { this._trigger( "close", event ); } - }); +$.ui.tooltip.version = "@VERSION"; + })(jQuery); \ No newline at end of file -- 2.39.5