centralizing options

This commit is contained in:
John Bender 2011-08-08 13:33:24 -07:00
parent 76adbc9293
commit 426da8f495
3 changed files with 17 additions and 34 deletions

View file

@ -8,23 +8,6 @@
(function( $, undefined ) {
$.widget( "mobile.customselect", $.mobile.widget, {
options: {
theme: null,
disabled: false,
icon: "arrow-d",
iconpos: "right",
inline: null,
corners: true,
shadow: true,
iconshadow: true,
menuPageTheme: "b",
overlayTheme: "a",
hidePlaceholderMenuItems: true,
closeText: "Close",
nativeMenu: true,
initSelector: "select:not(:jqmData(role='slider'))"
},
_shared: $.mobile.selectShared,
_create: function() {

View file

@ -8,23 +8,6 @@
(function( $, undefined ) {
$.widget( "mobile.nativeselect", $.mobile.widget, {
options: {
theme: null,
disabled: false,
icon: "arrow-d",
iconpos: "right",
inline: null,
corners: true,
shadow: true,
iconshadow: true,
menuPageTheme: "b",
overlayTheme: "a",
hidePlaceholderMenuItems: true,
closeText: "Close",
nativeMenu: true,
initSelector: "select:not(:jqmData(role='slider'))"
},
_shared: $.mobile.selectShared,
_create: function() {

View file

@ -11,6 +11,23 @@
var widget = this,
select = this.element.wrap( "<div class='ui-select'>" );
this.options = {
theme: null,
disabled: false,
icon: "arrow-d",
iconpos: "right",
inline: null,
corners: true,
shadow: true,
iconshadow: true,
menuPageTheme: "b",
overlayTheme: "a",
hidePlaceholderMenuItems: true,
closeText: "Close",
nativeMenu: true,
initSelector: "select:not(:jqmData(role='slider'))"
};
// if not, try to find closest theme container
// TODO move to core as findCurrentTheme
if ( !widget.options.theme ) {