mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-25 16:44:43 +00:00
centralizing options
This commit is contained in:
parent
76adbc9293
commit
426da8f495
3 changed files with 17 additions and 34 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue