mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Controlgroup: Add missing entry to demos bootstrap
This commit is contained in:
parent
de1296b985
commit
a00c02513d
@ -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 {
|
||||
|
@ -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>
|
||||
|
@ -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 {
|
||||
|
@ -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", {
|
||||
|
@ -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" );
|
||||
});
|
@ -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" );
|
||||
|
@ -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" );
|
||||
|
@ -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" );
|
||||
|
@ -14,8 +14,7 @@
|
||||
// AMD. Register as an anonymous module.
|
||||
define( [
|
||||
"jquery",
|
||||
"./core",
|
||||
"./widget"
|
||||
"../widget"
|
||||
], factory );
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user