mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-24 06:03:43 +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 ) {
|
(function( $, undefined ) {
|
||||||
|
|
||||||
$.widget( "mobile.customselect", $.mobile.widget, {
|
$.widget( "mobile.customselect", $.mobile.widget, {
|
||||||
_shared: $.mobile.selectShared,
|
|
||||||
|
|
||||||
_create: function() {
|
_create: function() {
|
||||||
var widget = this, shared = this._shared();
|
var widget = this, shared = $.mobile.selectShared.call(this);
|
||||||
|
|
||||||
$.extend( widget, shared, {
|
$.extend( widget, shared, {
|
||||||
typeName: 'custom',
|
typeName: 'custom',
|
||||||
|
|
|
||||||
|
|
@ -26,13 +26,14 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
||||||
},
|
},
|
||||||
|
|
||||||
_create: function() {
|
_create: function() {
|
||||||
|
var menu;
|
||||||
|
|
||||||
if (this.options.nativeMenu ) {
|
if (this.options.nativeMenu ) {
|
||||||
var menu = $( this.element ).nativeselect().data( "nativeselect" );
|
menu = $( this.element ).nativeselect().data( "nativeselect" );
|
||||||
} else {
|
} else {
|
||||||
var menu = $( this.element ).customselect().data( "customselect" );
|
menu = $( this.element ).customselect().data( "customselect" );
|
||||||
}
|
}
|
||||||
|
|
||||||
var self = this,
|
var self = this,
|
||||||
|
|
||||||
o = this.options,
|
o = this.options,
|
||||||
|
|
|
||||||
|
|
@ -8,12 +8,10 @@
|
||||||
(function( $, undefined ) {
|
(function( $, undefined ) {
|
||||||
|
|
||||||
$.widget( "mobile.nativeselect", $.mobile.widget, {
|
$.widget( "mobile.nativeselect", $.mobile.widget, {
|
||||||
_shared: $.mobile.selectShared,
|
|
||||||
|
|
||||||
_create: function() {
|
_create: function() {
|
||||||
var widget = this;
|
var widget = this;
|
||||||
|
|
||||||
$.extend( widget, widget._shared(), {
|
$.extend( widget, $.mobile.selectShared.call(this), {
|
||||||
typgeName: 'native',
|
typgeName: 'native',
|
||||||
|
|
||||||
button: $( "<div/>" )
|
button: $( "<div/>" )
|
||||||
|
|
@ -46,11 +44,8 @@ $.widget( "mobile.nativeselect", $.mobile.widget, {
|
||||||
},
|
},
|
||||||
|
|
||||||
refresh: function() {
|
refresh: function() {
|
||||||
var self = this,
|
this.setButtonText();
|
||||||
selected = this.selected();
|
this.setButtonCount();
|
||||||
|
|
||||||
self.setButtonText();
|
|
||||||
self.setButtonCount();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue