From: Alexander Schmitz Date: Wed, 15 Jul 2015 01:57:20 +0000 (-0400) Subject: Button: Move button into widgets folder X-Git-Tag: 1.12.0-beta.1~211 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dd6a99f1400a3636467f9c775a2aba4bfa7e19d0;p=jquery-ui.git Button: Move button into widgets folder Ref #13885 --- diff --git a/demos/bootstrap.js b/demos/bootstrap.js index 71d2e4ef3..a2ce072ea 100644 --- a/demos/bootstrap.js +++ b/demos/bootstrap.js @@ -26,7 +26,8 @@ var effectsAll = [ ]; var widgets = [ "accordion", - "autocomplete" + "autocomplete", + "button" ]; function getPath( module ) { diff --git a/tests/unit/button/common.js b/tests/unit/button/common.js index d376f4f05..0372cddbf 100644 --- a/tests/unit/button/common.js +++ b/tests/unit/button/common.js @@ -1,6 +1,6 @@ define( [ "lib/common", - "ui/button" + "ui/widgets/button" ], function( common ) { common.testWidget( "button", { diff --git a/tests/unit/button/core.js b/tests/unit/button/core.js index 8539464ba..f3ae2e583 100644 --- a/tests/unit/button/core.js +++ b/tests/unit/button/core.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/button" + "ui/widgets/button" ], function( $ ) { module("button: core"); diff --git a/tests/unit/button/events.js b/tests/unit/button/events.js index 63550e2f8..d778b4a2b 100644 --- a/tests/unit/button/events.js +++ b/tests/unit/button/events.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/button" + "ui/widgets/button" ], function( $ ) { module("button: events"); diff --git a/tests/unit/button/methods.js b/tests/unit/button/methods.js index be36096b2..29e917022 100644 --- a/tests/unit/button/methods.js +++ b/tests/unit/button/methods.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/button" + "ui/widgets/button" ], function( $ ) { module("button: methods"); diff --git a/tests/unit/button/options.js b/tests/unit/button/options.js index 23020fc10..ad4169e14 100644 --- a/tests/unit/button/options.js +++ b/tests/unit/button/options.js @@ -1,6 +1,6 @@ define( [ "jquery", - "ui/button" + "ui/widgets/button" ], function( $ ) { module( "button: options" ); diff --git a/ui/button.js b/ui/button.js deleted file mode 100644 index bc391810f..000000000 --- a/ui/button.js +++ /dev/null @@ -1,421 +0,0 @@ -/*! - * jQuery UI Button @VERSION - * http://jqueryui.com - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license. - * http://jquery.org/license - */ - -//>>label: Button -//>>group: Widgets -//>>description: Enhances a form with themeable buttons. -//>>docs: http://api.jqueryui.com/button/ -//>>demos: http://jqueryui.com/button/ -//>>css.structure: ../themes/base/core.css -//>>css.structure: ../themes/base/button.css -//>>css.theme: ../themes/base/theme.css - -(function( factory ) { - if ( typeof define === "function" && define.amd ) { - - // AMD. Register as an anonymous module. - define([ - "jquery", - "./data", - "./keycode", - "./labels", - "./version", - "./widget" - ], factory ); - } else { - - // Browser globals - factory( jQuery ); - } -}(function( $ ) { - -var lastActive, - baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", - typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", - formResetHandler = function() { - var form = $( this ); - setTimeout(function() { - form.find( ":ui-button" ).button( "refresh" ); - }, 1 ); - }, - radioGroup = function( radio ) { - var name = radio.name, - form = radio.form, - radios = $( [] ); - if ( name ) { - name = name.replace( /'/g, "\\'" ); - if ( form ) { - radios = $( form ).find( "[name='" + name + "'][type=radio]" ); - } else { - radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument ) - .filter(function() { - return !this.form; - }); - } - } - return radios; - }; - -$.widget( "ui.button", { - version: "@VERSION", - defaultElement: "