Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[controlgroup] Moving flipClasses() into the widget following a sugge…

…stion by johnbender
  • Loading branch information...
commit 2a9f344c87c79260a044fc2b4443668d335d9830 1 parent 69f27da
@gabrielschulhof gabrielschulhof authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 js/widgets/controlgroup.js
View
18 js/widgets/controlgroup.js
@@ -12,14 +12,6 @@ define( [ "jquery",
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {
- function flipClasses( els, flCorners ) {
- els.removeClass( "ui-controlgroup-last" )
- .buttonMarkup( { corners: false, shadow: false } )
- .eq( 0 ).buttonMarkup( { corners: flCorners[ 0 ], cornerstyle: "group" } )
- .end()
- .last().buttonMarkup( { corners: flCorners[ 1 ], cornerstyle: "group" } ).addClass( "ui-controlgroup-last" );
- }
-
$.widget( "mobile.controlgroup", $.mobile.widget, {
options: {
shadow: false,
@@ -56,6 +48,14 @@ define( [ "jquery",
this.refresh();
},
+ _flipClasses: function( els, flCorners ) {
+ els.removeClass( "ui-controlgroup-last" )
+ .buttonMarkup( { corners: false, shadow: false } )
+ .eq( 0 ).buttonMarkup( { corners: flCorners[ 0 ], cornerstyle: "group" } )
+ .end()
+ .last().buttonMarkup( { corners: flCorners[ 1 ], cornerstyle: "group" } ).addClass( "ui-controlgroup-last" );
+ },
+
_setOption: function( key, value ) {
var setter = "_set" + key.charAt( 0 ).toUpperCase() + key.slice( 1 );
@@ -93,7 +93,7 @@ define( [ "jquery",
corners = ( this.options.type === "horizontal" ? [ "left", "right" ] : [ "top", "bottom" ] );
}
- flipClasses( els, corners );
+ this._flipClasses( els, corners );
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.