mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +00:00
.call on shared
This commit is contained in:
parent
426da8f495
commit
ff8a1ceefa
3 changed files with 8 additions and 14 deletions
|
|
@ -8,10 +8,8 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.customselect", $.mobile.widget, {
|
||||
_shared: $.mobile.selectShared,
|
||||
|
||||
_create: function() {
|
||||
var widget = this, shared = this._shared();
|
||||
var widget = this, shared = $.mobile.selectShared.call(this);
|
||||
|
||||
$.extend( widget, shared, {
|
||||
typeName: 'custom',
|
||||
|
|
|
|||
|
|
@ -26,13 +26,14 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
},
|
||||
|
||||
_create: function() {
|
||||
var menu;
|
||||
|
||||
if (this.options.nativeMenu ) {
|
||||
var menu = $( this.element ).nativeselect().data( "nativeselect" );
|
||||
menu = $( this.element ).nativeselect().data( "nativeselect" );
|
||||
} else {
|
||||
var menu = $( this.element ).customselect().data( "customselect" );
|
||||
menu = $( this.element ).customselect().data( "customselect" );
|
||||
}
|
||||
|
||||
|
||||
var self = this,
|
||||
|
||||
o = this.options,
|
||||
|
|
|
|||
|
|
@ -8,12 +8,10 @@
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.nativeselect", $.mobile.widget, {
|
||||
_shared: $.mobile.selectShared,
|
||||
|
||||
_create: function() {
|
||||
var widget = this;
|
||||
|
||||
$.extend( widget, widget._shared(), {
|
||||
$.extend( widget, $.mobile.selectShared.call(this), {
|
||||
typgeName: 'native',
|
||||
|
||||
button: $( "<div/>" )
|
||||
|
|
@ -46,11 +44,8 @@ $.widget( "mobile.nativeselect", $.mobile.widget, {
|
|||
},
|
||||
|
||||
refresh: function() {
|
||||
var self = this,
|
||||
selected = this.selected();
|
||||
|
||||
self.setButtonText();
|
||||
self.setButtonCount();
|
||||
this.setButtonText();
|
||||
this.setButtonCount();
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
|
|
|
|||
Loading…
Reference in a new issue