Skip to content

Button classes #1415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 107 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
a864172
Build: Add qunit-assert-classes plug-in for classes tests
arschmitz Feb 3, 2015
2f20d0e
Widget: Add classes option and _add/_remove/_toggleClass methods
arschmitz Dec 3, 2014
11d25df
Button: Add classes option to please the tests
arschmitz Feb 3, 2015
ef85562
Autocomplete: Add classes option
arschmitz Dec 3, 2014
dbbbc9c
Accordion: Add classes option
arschmitz Dec 3, 2014
8ba1c7c
Dialog: Add classes option
arschmitz Dec 3, 2014
521fdc3
Draggable: Add classes option
arschmitz Jan 1, 2015
45c70dc
Droppable: Add classes option
arschmitz Jan 1, 2015
23f8ad4
Menu: Add classes option
arschmitz Dec 3, 2014
a83f5e4
Progressbar: Add classes option
arschmitz Dec 3, 2014
eca3d19
Resizable: Add classes option
arschmitz Jan 1, 2015
df4cd8b
Selectable: Add classes option
arschmitz Jan 1, 2015
1f10a51
Selectmenu: Add classes option
arschmitz Dec 3, 2014
b0c8245
Slider: Add classes option
arschmitz Dec 3, 2014
f512e20
Sortable: Add classes option
arschmitz Jan 1, 2015
6cf24a4
Spinner: Add classes option
arschmitz Dec 3, 2014
585898c
Tabs: Add classes option
arschmitz Dec 3, 2014
ee04b63
Tooltip: Add classes option
arschmitz Dec 3, 2014
f8d4ea8
Accordion: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
660768b
Autocomplete: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
6707e37
Button: Use new has/lacksClasses assertions for all class checks
arschmitz Feb 3, 2015
97e6081
Datepicker: Use new has/lacksClasses assertions for all class checks
arschmitz Feb 3, 2015
0f5402f
Dialog: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
ca982e3
Draggable: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
0617abb
Droppable: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
271a34b
Effects: Use new has/lacksClasses assertions for all class checks
arschmitz Feb 3, 2015
37cd809
Menu: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
5b1fca1
Progressbar: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
10da9ed
Resizable: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
5360abe
Selectable: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
903e99b
Selectmenu: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
a6c2da7
Slider: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
97c7b63
Sortable: Use new has/lacksClasses assertions for all class checks
arschmitz Feb 3, 2015
667c69c
Spinner: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
057f07c
Tabs: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
d1ff1ac
Tooltip: Use new has/lacksClasses assertions for all class checks
arschmitz Jan 30, 2015
d981b81
Widget: Use new has/lacksClasses assertions for all class checks
arschmitz Feb 3, 2015
8aaf24d
Droppable: Deprecate activeClass and hoverClass options use classes
arschmitz Feb 3, 2015
23f84c2
Resizable: Add backcompat for ghost option
arschmitz Feb 3, 2015
e80ca9f
Build: add box-sizing: false to .csslintrc
arschmitz Nov 8, 2014
82f1695
Button: Inital commit of button refactor
arschmitz Jan 22, 2014
dbe22dd
Button: comment out test thats failing only in phantom
arschmitz Jul 16, 2014
e492eb6
Button: Move all dom minipulation in _create into its own method
arschmitz Aug 22, 2014
1b7128b
Button: remove outdated demos
arschmitz Aug 28, 2014
5c0c399
Button: Adding classes option
arschmitz Sep 3, 2014
8704c70
Button: Fixed the height of icon-only buttons in controlgroups
jaspermdegroot Sep 4, 2014
3860f48
Button: Added user-select none
jaspermdegroot Sep 8, 2014
8a43b72
Button: Fixup from PR Review
arschmitz Sep 23, 2014
0e12103
Button: backcompat for old button widget
arschmitz Oct 22, 2014
50fba69
Dialog: Updating dialog and tests for new button API
arschmitz Mar 28, 2014
1446952
Selectmenu: update to use button css
arschmitz Aug 22, 2014
e7ea1fd
Tests: Make it possible to not have a default element in common tests
arschmitz Nov 8, 2014
739e51a
Checkboxradio: inital commit of new widget
arschmitz Aug 28, 2014
0793f65
Checkboxradio: add visual focus outline to checkbox and radio buttons
arschmitz Jul 24, 2014
9502dad
Checkboxradio: allow the parent of the input to be the label
arschmitz Jul 23, 2014
e7ec68e
Checkboxradio: Fixup demos
arschmitz Nov 8, 2014
70996e6
Checkboxradio: Remove default element
arschmitz Nov 8, 2014
eb66748
Checkboxradio: add classes option
arschmitz Sep 3, 2014
2e725bc
Checkboxradio: Added new product selector demo
arschmitz Sep 3, 2014
f76bbbd
Checkboxradio: change all classes to be prefixed with ui-checkboxradio
arschmitz Oct 23, 2014
3041530
Controlgroup: Inital commit of new widget
arschmitz Aug 23, 2014
47beebb
Controlgroup: add classes option
arschmitz Sep 3, 2014
2a03748
Controlgroup: Add extension points for special options and refresh
arschmitz Oct 22, 2014
696fbb0
Button: breakup deprecated tests
arschmitz Nov 12, 2014
46e444b
Button: Add backcompat tests and fix backcompat issues
arschmitz Dec 3, 2014
540f91f
Checkboxradio: formatting
arschmitz Dec 3, 2014
e824c5c
Button: Updates based on new classes api
arschmitz Jan 8, 2015
0365ebd
Checkboxradio: updates based on new classes api
arschmitz Jan 8, 2015
c5364e6
Controlgroup: updates based on new classes api
arschmitz Jan 8, 2015
a83a284
Selectmenu: updates based on new classes implementation in button
arschmitz Jan 8, 2015
84b9aec
Spinner: Updates for new button widget and classes option
arschmitz Jan 8, 2015
93bd806
Checkboxradio: ensure we are escaping the id before its use in selector
arschmitz Jan 8, 2015
4fd59f5
Controlgroup: Switch to using float instead of inline-block
arschmitz Jan 8, 2015
57894ea
Button: Add comment about filtering for performance
arschmitz Jan 8, 2015
a481cfe
Checkboxradio: Moving radio group to be private instance method
arschmitz Jan 8, 2015
9a4004d
Checkboxradio: Fixing refrence to ownerDocument
arschmitz Jan 8, 2015
cbf7fcc
Controlgroup: Adjust selectmenu styling
arschmitz Feb 4, 2015
417e760
Checkboxradio: Fix reference to ownerDocument and remove argument
arschmitz Feb 4, 2015
6d138dc
Button: Switch to placing contents in the flow rather then positioning
arschmitz Feb 4, 2015
2a00b4e
Button: Switch to use inline icons
arschmitz Feb 7, 2015
5f78188
Checkboxradio: Use inline icons
arschmitz Feb 7, 2015
b62430d
Dialog: switch to inline icons
arschmitz Feb 7, 2015
64a9d29
Checkboxradio: Update theme for icons for checkboxes for new theme
arschmitz Feb 7, 2015
1d16a7a
Controlgroup: Fixup demos
arschmitz Feb 7, 2015
1349f28
Controlgroup: Add to unit test index
arschmitz Feb 7, 2015
fe204ff
Controlgroup: update to avoid dom traversal in refresh
arschmitz Feb 7, 2015
88df484
Checkboxradio: Rename demo based on new default icon value
arschmitz Feb 7, 2015
5f51ed7
Controlgroup: fixup
arschmitz Feb 8, 2015
2c45224
Button: Test fixup
arschmitz Feb 8, 2015
0d1b12e
Checkboxradio: Fixup
arschmitz Feb 8, 2015
d43cb8a
Checkboxradio: update tests
arschmitz Feb 11, 2015
ed4141c
Button: update tests
arschmitz Feb 11, 2015
b6f5101
Controlgroup: update tests
arschmitz Feb 11, 2015
7aa61c4
Selectmenu: update tests for button
arschmitz Feb 11, 2015
a47b891
Button: update visual test
arschmitz Feb 11, 2015
c632dc9
Button: Add proper support comments
arschmitz Feb 11, 2015
ad5357e
Controlgroup: fixup
arschmitz Feb 11, 2015
df03e5d
Button: fixup
arschmitz Feb 11, 2015
e169835
Checkboxradio: fixup
arschmitz Feb 11, 2015
e75d06f
Controlgroup: fixup
arschmitz Feb 11, 2015
84df374
Dialog: Fixup
arschmitz Feb 11, 2015
24a6efd
Selectmenu: Fixup
arschmitz Feb 11, 2015
ff2c3b3
Checkboxradio: remove unneeded visual test
arschmitz Feb 11, 2015
992a69f
Checkboxradio: remove unneeded visual test
arschmitz Feb 11, 2015
aacfe99
Dialog: fixup
arschmitz Feb 11, 2015
c76731c
Button: fixup
arschmitz Feb 11, 2015
45cba0f
Controlgroup: fixup
arschmitz Feb 11, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .csslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"important": false,
"outline-none": false,
"overqualified-elements": false,
"text-indent": false
"text-indent": false,
"box-sizing": false
}
3 changes: 3 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ grunt.initConfig({
"qunit/qunit.css": "qunit/qunit/qunit.css",
"qunit/MIT-LICENSE.txt": "qunit/MIT-LICENSE.txt",

"qunit-assert-classes/qunit-assert-classes.js": "qunit-assert-classes/qunit-assert-classes.js",
"qunit-assert-classes/LICENSE.txt": "qunit-assert-classes/LICENSE",

"jquery-mousewheel/jquery.mousewheel.js": "jquery-mousewheel/jquery.mousewheel.js",
"jquery-mousewheel/LICENSE.txt": "jquery-mousewheel/LICENSE.txt",

Expand Down
1 change: 1 addition & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"jquery-simulate": "1.0.0",
"jshint": "2.4.4",
"qunit": "1.17.1",
"qunit-assert-classes": "0.1.5",

"jquery-1.7.0": "jquery#1.7.0",
"jquery-1.7.1": "jquery#1.7.1",
Expand Down
4 changes: 3 additions & 1 deletion demos/autocomplete/combobox.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
source: $.proxy( this, "_source" )
})
.tooltip({
tooltipClass: "ui-state-highlight"
classes: {
"ui-tooltip": "ui-state-highlight"
}
});

this._on( this.input, {
Expand Down
37 changes: 0 additions & 37 deletions demos/button/checkbox.html

This file was deleted.

25 changes: 17 additions & 8 deletions demos/button/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,33 @@
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "input[type=submit], a, button" )
.button()
.click(function( event ) {
event.preventDefault();
});
$( ".widget input[type=submit], .widget a, .widget button" ).button();
$( "button, input, a" ).click( function( event ) {
event.preventDefault();
});
});
</script>
</head>
<body>
<div class="widget">
<h1>Widget Buttons</h1>
<button>A button element</button>

<button>A button element</button>
<input type="submit" value="A submit button">

<input type="submit" value="A submit button">
<a href="#">An anchor</a>
</div>
<h1>CSS Buttons</h1>
<button class="ui-button ui-widget ui-corner-all">A button element</button>

<input class="ui-button ui-widget ui-corner-all" type="submit" value="A submit button">

<a href="#">An anchor</a>
<a class="ui-button ui-widget ui-corner-all" href="#">An anchor</a>

<div class="demo-description">
<p>Examples of the markup that can be used for buttons: A button element, an input of type submit and an anchor.</p>
<p>Buttons can be styled via the button widget for by adding the classes yourself to avoid the javascript overhead if you dont need any of the methods provided by the button widget</p>
<p>Here you can see examples of buttons using the button widget and styled with css only.</p>
</div>
</body>
</html>
63 changes: 41 additions & 22 deletions demos/button/icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,56 @@
<link rel="stylesheet" href="../demos.css">
<script>
$(function() {
$( "button:first" ).button({
icons: {
primary: "ui-icon-locked"
},
text: false
$( ".widget button, .widget a" ).first().button({
icon: "ui-icon-gear",
showLabel: false
}).next().button({
icons: {
primary: "ui-icon-locked"
}
icon: "ui-icon-gear"
}).next().button({
icons: {
primary: "ui-icon-gear",
secondary: "ui-icon-triangle-1-s"
}
icon: "ui-icon-gear",
iconPosition: "end"
}).next().button({
icons: {
primary: "ui-icon-gear",
secondary: "ui-icon-triangle-1-s"
},
text: false
icon: "ui-icon-gear",
iconPosition: "bottom"
}).next().button({
icon: "ui-icon-gear",
iconPosition: "top"
});
});
</script>
</head>
<body>
<div class="widget">
<h1>Widget</h1>
<a href="#">Button with icon only</a>
<button>Button with icon on the left</button>
<button>Button with icon on the right</button>
<button>Button with icon on the bottom</button>
<button>Button with icon on the top</button>
</div>
<div class="css">
<h1>CSS</h1>
<button class="ui-button ui-widget ui-corner-all ui-button-icon-only" title="Button with icon only">
<span class="ui-icon ui-icon-gear"></span>Button with icon only
</button>
<button class="ui-button ui-widget ui-corner-all ui-icon-beginning">
Button with no text
</button>
<button class="ui-button ui-widget ui-corner-all ui-icon-beginning">
<span class="ui-icon ui-icon-triangle-1-w"></span>Button with icon on the left
</button>
<button class="ui-button ui-widget ui-corner-all ui-icon-end">
Button with icon on the right<span class="ui-icon ui-icon-triangle-1-e"></span>
</button>
<button class="ui-button ui-widget ui-corner-all">
Button with icon on bottom<span class="ui-icon ui-icon-triangle-1-s ui-icon-display-block"></span>
</button>
<button class="ui-button ui-widget ui-corner-all">
<span class="ui-icon ui-icon-triangle-1-n ui-icon-display-block"></span>Button with icon on top
</button>
<button class="ui-button ui-widget ui-corner-all"><span class="ui-icon ui-icon-triangle-1-n ui-icon-display-block"></span><span class="ui-icon ui-icon-triangle-1-w"></span>Button with many icons<span class="ui-icon ui-icon-triangle-1-e"></span><span class="ui-icon ui-icon-triangle-1-s ui-icon-display-block"></span></button>

<button>Button with icon only</button>
<button>Button with icon on the left</button>
<button>Button with two icons</button>
<button>Button with two icons and no text</button>

</div>
<div class="demo-description">
<p>Some buttons with various combinations of text and icons.</p>
</div>
Expand Down
4 changes: 0 additions & 4 deletions demos/button/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@

<ul>
<li><a href="default.html">Default functionality</a></li>
<li><a href="radio.html">Radios</a></li>
<li><a href="checkbox.html">Checkboxes</a></li>
<li><a href="icons.html">Icons</a></li>
<li><a href="toolbar.html">Toolbar</a></li>
<li><a href="splitbutton.html">Split Button</a></li>
</ul>

</body>
Expand Down
32 changes: 0 additions & 32 deletions demos/button/radio.html

This file was deleted.

69 changes: 0 additions & 69 deletions demos/button/splitbutton.html

This file was deleted.

Loading