diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-09 00:30:34 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-10-08 14:02:36 -0400 |
commit | a00c02513d81ed5d86b056f8734105a1c2d82ea8 (patch) | |
tree | 68fdf06a23716acb97c2cce140cc105e6fab17e2 | |
parent | de1296b98515c586d620c40b6c566129f5013208 (diff) | |
download | jquery-ui-a00c02513d81ed5d86b056f8734105a1c2d82ea8.tar.gz jquery-ui-a00c02513d81ed5d86b056f8734105a1c2d82ea8.zip |
Controlgroup: Add missing entry to demos bootstrap
-rw-r--r-- | demos/controlgroup/default.html | 14 | ||||
-rw-r--r-- | demos/controlgroup/splitbutton.html | 14 | ||||
-rw-r--r-- | demos/controlgroup/toolbar.html | 14 | ||||
-rw-r--r-- | tests/unit/controlgroup/common.js | 8 | ||||
-rw-r--r-- | tests/unit/controlgroup/controlgroup_core.js | 77 | ||||
-rw-r--r-- | tests/unit/controlgroup/core.js | 8 | ||||
-rw-r--r-- | tests/unit/controlgroup/methods.js | 8 | ||||
-rw-r--r-- | tests/unit/controlgroup/options.js | 8 | ||||
-rw-r--r-- | ui/widgets/controlgroup.js (renamed from ui/controlgroup.js) | 3 |
9 files changed, 23 insertions, 131 deletions
diff --git a/demos/controlgroup/default.html b/demos/controlgroup/default.html index 0fc963537..3206c74cb 100644 --- a/demos/controlgroup/default.html +++ b/demos/controlgroup/default.html @@ -4,23 +4,13 @@ <meta charset="utf-8"> <title>jQuery UI Controlgroup - Default Functionality</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/checkboxradio.js"></script> - <script src="../../ui/menu.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/selectmenu.js"></script> - <script src="../../ui/controlgroup.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js"> $( ".controlgroup" ).controlgroup() $( ".controlgroup-vertical" ).controlgroup({ "direction": "vertical" }); - }); </script> <style> .ui-controlgroup-vertical { diff --git a/demos/controlgroup/splitbutton.html b/demos/controlgroup/splitbutton.html index a72cefd96..763c14dad 100644 --- a/demos/controlgroup/splitbutton.html +++ b/demos/controlgroup/splitbutton.html @@ -4,18 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Controlgroup - Split Button</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/checkboxradio.js"></script> - <script src="../../ui/menu.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/selectmenu.js"></script> - <script src="../../ui/controlgroup.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="button checkboxradio selectmenu"> $( "select" ).selectmenu({ classes: { "ui-selectmenu-button": "ui-button-icon-only" @@ -28,7 +19,6 @@ $( "button" ).click(function() { $( ".output" ).append( "<li>Running Last Action...</li>" ); }); - }); </script> </head> <body> diff --git a/demos/controlgroup/toolbar.html b/demos/controlgroup/toolbar.html index fb3172418..6153dff87 100644 --- a/demos/controlgroup/toolbar.html +++ b/demos/controlgroup/toolbar.html @@ -4,18 +4,9 @@ <meta charset="utf-8"> <title>jQuery UI Controlgroup - Toolbar</title> <link rel="stylesheet" href="../../themes/base/all.css"> - <script src="../../external/jquery/jquery.js"></script> - <script src="../../ui/core.js"></script> - <script src="../../ui/widget.js"></script> - <script src="../../ui/button.js"></script> - <script src="../../ui/checkboxradio.js"></script> - <script src="../../ui/menu.js"></script> - <script src="../../ui/position.js"></script> - <script src="../../ui/selectmenu.js"></script> - <script src="../../ui/controlgroup.js"></script> <link rel="stylesheet" href="../demos.css"> - <script> - $(function() { + <script src="../../external/requirejs/require.js"></script> + <script src="../bootstrap.js" data-modules="button checkboxradio selectmenu"> var iframe = $( "<iframe id='display' contenteditable='true'>" ), contents = iframe.appendTo( "body" ); @@ -54,7 +45,6 @@ return false; }); }); - }); </script> <style> #zoom, #fontsize { diff --git a/tests/unit/controlgroup/common.js b/tests/unit/controlgroup/common.js index 421e92e71..b403e174c 100644 --- a/tests/unit/controlgroup/common.js +++ b/tests/unit/controlgroup/common.js @@ -1,9 +1,9 @@ define( [ "lib/common", - "ui/controlgroup", - "ui/checkboxradio", - "ui/selectmenu", - "ui/button" + "ui/widgets/controlgroup", + "ui/widgets/checkboxradio", + "ui/widgets/selectmenu", + "ui/widgets/button" ], function( common ) { common.testWidget( "controlgroup", { diff --git a/tests/unit/controlgroup/controlgroup_core.js b/tests/unit/controlgroup/controlgroup_core.js deleted file mode 100644 index 2177c767b..000000000 --- a/tests/unit/controlgroup/controlgroup_core.js +++ /dev/null @@ -1,77 +0,0 @@ -module( "Controlgroup: Core" ); - -function hasCornerClass( element ) { - return !!element.attr( "class" ).match( /ui-corner/g ); -} - -test( "selectmenu: open/close corners", function( assert ) { - expect( 1 ); - var element = $( ".controlgroup" ).controlgroup(), - selects = element.find( "select" ), - selectButton = selects.eq( 0 ).selectmenu( "widget" ); - - expect( 12 ); - - selects.eq( 0 ).selectmenu( "open" ); - assert.hasClasses( selectButton, "ui-corner-tl", - "Horizontal: First selectmenu gets ui-corner-tl when opened" ); - - selects.eq( 0 ).selectmenu( "close" ); - assert.hasClasses( selectButton, "ui-corner-left", - "Horizontal: First selectmenu gets ui-corner-left when closed" ); - - selectButton = selects.eq( 1 ).selectmenu( "widget" ); - selects.eq( 1 ).selectmenu( "open" ); - strictEqual( hasCornerClass( selectButton ), false, - "Horizontal: Middle selectmenu does not get corner class when opened" ); - - selects.eq( 1 ).selectmenu( "close" ); - strictEqual( hasCornerClass( selectButton ), false, - "Horizontal: Middle selectmenu does not get corner class when closed" ); - - selectButton = selects.eq( 2 ).selectmenu( "widget" ); - selects.eq( 2 ).selectmenu( "open" ); - assert.hasClasses( selectButton, "ui-corner-tr", - "Horizontal: Last selectmenu gets ui-corner-tr when opened" ); - - selects.eq( 2 ).selectmenu( "close" ); - assert.hasClasses( selectButton, "ui-corner-right", - "Horizontal: Last selectmenu gets ui-corner-right when closed" ); - - element.controlgroup( "option", "direction", "vertical" ); - selectButton = selects.eq( 0 ).selectmenu( "widget" ); - selects.eq( 0 ).selectmenu( "open" ); - assert.hasClasses( selectButton, "ui-corner-top", - "vertical: First selectmenu gets ui-corner-top when opened" ); - - selects.eq( 0 ).selectmenu( "close" ); - assert.hasClasses( selectButton, "ui-corner-top", - "vertical: First selectmenu gets ui-corner-top when closed" ); - - selectButton = selects.eq( 1 ).selectmenu( "widget" ); - selects.eq( 1 ).selectmenu( "open" ); - strictEqual( hasCornerClass( selectButton ), false, - "vertical: Middle selectmenu does not get corner class when opened" ); - - selects.eq( 1 ).selectmenu( "close" ); - strictEqual( hasCornerClass( selectButton ), false, - "vertical: Middle selectmenu does not get corner class when closed" ); - - selectButton = selects.eq( 2 ).selectmenu( "widget" ); - selects.eq( 2 ).selectmenu( "open" ); - strictEqual( hasCornerClass( selectButton ), false, - "vertical: Last selectmenu does not get corner class when opened" ); - - selects.eq( 2 ).selectmenu( "close" ); - assert.hasClasses( selectButton, "ui-corner-bottom", - "vertical: Last selectmenu gets ui-corner-bottom when closed" ); -}); -test( "invisibles excluded from corner classes", function( assert ) { - expect( 2 ); - var element = $( ".controlgroup" ).controlgroup(), - buttons = element.children( ".ui-button" ); - strictEqual( hasCornerClass( buttons.eq( 0 ) ), false, - "ExcludeInvisible: true: Hidden first element does not get a corner class" ); - assert.hasClasses( buttons.eq( 1 ), "ui-corner-left", - "ExcludeInvisible: true: First button is hidden second button get corner class" ); -});
\ No newline at end of file diff --git a/tests/unit/controlgroup/core.js b/tests/unit/controlgroup/core.js index f84136b2f..385e0cfd4 100644 --- a/tests/unit/controlgroup/core.js +++ b/tests/unit/controlgroup/core.js @@ -1,9 +1,9 @@ define( [ "jquery", - "ui/controlgroup", - "ui/checkboxradio", - "ui/selectmenu", - "ui/button" + "ui/widgets/controlgroup", + "ui/widgets/checkboxradio", + "ui/widgets/selectmenu", + "ui/widgets/button" ], function( $ ) { module( "Controlgroup: Core" ); diff --git a/tests/unit/controlgroup/methods.js b/tests/unit/controlgroup/methods.js index c691e4c46..de1d56f9d 100644 --- a/tests/unit/controlgroup/methods.js +++ b/tests/unit/controlgroup/methods.js @@ -1,9 +1,9 @@ define( [ "jquery", - "ui/controlgroup", - "ui/checkboxradio", - "ui/selectmenu", - "ui/button" + "ui/widgets/controlgroup", + "ui/widgets/checkboxradio", + "ui/widgets/selectmenu", + "ui/widgets/button" ], function( $ ) { module( "Controlgroup: methods" ); diff --git a/tests/unit/controlgroup/options.js b/tests/unit/controlgroup/options.js index 82375381a..e2e8f4ee7 100644 --- a/tests/unit/controlgroup/options.js +++ b/tests/unit/controlgroup/options.js @@ -1,9 +1,9 @@ define( [ "jquery", - "ui/controlgroup", - "ui/checkboxradio", - "ui/selectmenu", - "ui/button" + "ui/widgets/controlgroup", + "ui/widgets/checkboxradio", + "ui/widgets/selectmenu", + "ui/widgets/button" ], function( $ ) { module( "Controlgroup: options" ); diff --git a/ui/controlgroup.js b/ui/widgets/controlgroup.js index effe42d37..1614f91e4 100644 --- a/ui/controlgroup.js +++ b/ui/widgets/controlgroup.js @@ -14,8 +14,7 @@ // AMD. Register as an anonymous module. define( [ "jquery", - "./core", - "./widget" + "../widget" ], factory ); } else { |